* [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled
@ 2019-04-28 5:45 Stephen Mallon
2019-04-28 15:19 ` Richard Cochran
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Mallon @ 2019-04-28 5:45 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, stephen.mallon
Ensure that the unique timestamp identifier is incremented for skb hardware
timestamps, not just software timestamps.
Signed-off-by: Stephen Mallon <stephen.mallon@sydney.edu.au>
---
net/ipv4/ip_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c80188875f39..96ef1d467ba7 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -891,7 +891,7 @@ static int __ip_append_data(struct sock *sk,
mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize;
paged = !!cork->gso_size;
- if (cork->tx_flags & SKBTX_ANY_SW_TSTAMP &&
+ if (cork->tx_flags & SKBTX_ANY_TSTAMP &&
sk->sk_tsflags & SOF_TIMESTAMPING_OPT_ID)
tskey = sk->sk_tskey++;
--
2.18.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled
2019-04-28 5:45 [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled Stephen Mallon
@ 2019-04-28 15:19 ` Richard Cochran
2019-04-29 2:57 ` Willem de Bruijn
0 siblings, 1 reply; 7+ messages in thread
From: Richard Cochran @ 2019-04-28 15:19 UTC (permalink / raw)
To: Stephen Mallon; +Cc: David S. Miller, netdev
On Sun, Apr 28, 2019 at 03:45:21PM +1000, Stephen Mallon wrote:
> Ensure that the unique timestamp identifier is incremented for skb hardware
> timestamps, not just software timestamps.
Thanks for fixing this. It has been at the back of my mind for a long
time, but since I don't use this feature... oh well.
This patch would be a candidate for stable kernels. Can you please
add a Fixes: tag?
Thanks,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled
2019-04-28 15:19 ` Richard Cochran
@ 2019-04-29 2:57 ` Willem de Bruijn
2019-04-29 15:02 ` Richard Cochran
0 siblings, 1 reply; 7+ messages in thread
From: Willem de Bruijn @ 2019-04-29 2:57 UTC (permalink / raw)
To: Richard Cochran; +Cc: Stephen Mallon, David S. Miller, Network Development
On Sun, Apr 28, 2019 at 11:22 AM Richard Cochran
<richardcochran@gmail.com> wrote:
>
> On Sun, Apr 28, 2019 at 03:45:21PM +1000, Stephen Mallon wrote:
> > Ensure that the unique timestamp identifier is incremented for skb hardware
> > timestamps, not just software timestamps.
>
> Thanks for fixing this. It has been at the back of my mind for a long
> time, but since I don't use this feature... oh well.
>
> This patch would be a candidate for stable kernels. Can you please
> add a Fixes: tag?
It is debatable whether this is a fix or a new feature. It extends
SOF_TIMESTAMPING_OPT_ID to hardware timestamps. I don't think this
would be a stable candidate.
More importantly, note that __ip6_append_data has similar logic. For
consistency the two should be updated at the same time.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled
2019-04-29 2:57 ` Willem de Bruijn
@ 2019-04-29 15:02 ` Richard Cochran
2019-04-29 15:32 ` Willem de Bruijn
0 siblings, 1 reply; 7+ messages in thread
From: Richard Cochran @ 2019-04-29 15:02 UTC (permalink / raw)
To: Willem de Bruijn; +Cc: Stephen Mallon, David S. Miller, Network Development
On Sun, Apr 28, 2019 at 10:57:57PM -0400, Willem de Bruijn wrote:
> It is debatable whether this is a fix or a new feature. It extends
> SOF_TIMESTAMPING_OPT_ID to hardware timestamps. I don't think this
> would be a stable candidate.
Was the original series advertised as SW timestamping only?
If so, I missed that at the time. After seeing it not work, I meant
to fix it, but never got around to it. So to me this is a known
issue.
> More importantly, note that __ip6_append_data has similar logic. For
> consistency the two should be updated at the same time.
+1
Thanks,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled
2019-04-29 15:02 ` Richard Cochran
@ 2019-04-29 15:32 ` Willem de Bruijn
2019-04-30 1:17 ` Stephen Mallon
0 siblings, 1 reply; 7+ messages in thread
From: Willem de Bruijn @ 2019-04-29 15:32 UTC (permalink / raw)
To: Richard Cochran; +Cc: Stephen Mallon, David S. Miller, Network Development
On Mon, Apr 29, 2019 at 11:02 AM Richard Cochran
<richardcochran@gmail.com> wrote:
>
> On Sun, Apr 28, 2019 at 10:57:57PM -0400, Willem de Bruijn wrote:
> > It is debatable whether this is a fix or a new feature. It extends
> > SOF_TIMESTAMPING_OPT_ID to hardware timestamps. I don't think this
> > would be a stable candidate.
>
> Was the original series advertised as SW timestamping only?
I did not intend to cover hardware timestamps at the time.
> If so, I missed that at the time. After seeing it not work, I meant
> to fix it, but never got around to it. So to me this is a known
> issue.
Understood. I certainly understand that view. I never use hw
timestamps, so it is a bit of a blind spot for me. If this is a safe
and predictable change, I don't care strongly about net vs net-next. I
don't think it meets the bar for stable, but that is not my call.
> > More importantly, note that __ip6_append_data has similar logic. For
> > consistency the two should be updated at the same time.
>
> +1
>
> Thanks,
> Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled
2019-04-29 15:32 ` Willem de Bruijn
@ 2019-04-30 1:17 ` Stephen Mallon
2019-04-30 2:54 ` Richard Cochran
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Mallon @ 2019-04-30 1:17 UTC (permalink / raw)
To: Willem de Bruijn
Cc: Richard Cochran, David S. Miller, Network Development, Stephen Mallon
On Mon, Apr 29, 2019 at 11:32:08AM -0400, Willem de Bruijn wrote:
> On Mon, Apr 29, 2019 at 11:02 AM Richard Cochran
> <richardcochran@gmail.com> wrote:
> >
> > On Sun, Apr 28, 2019 at 10:57:57PM -0400, Willem de Bruijn wrote:
> > > It is debatable whether this is a fix or a new feature. It extends
> > > SOF_TIMESTAMPING_OPT_ID to hardware timestamps. I don't think this
> > > would be a stable candidate.
> >
> > Was the original series advertised as SW timestamping only?
>
> I did not intend to cover hardware timestamps at the time.
>
> > If so, I missed that at the time. After seeing it not work, I meant
> > to fix it, but never got around to it. So to me this is a known
> > issue.
>
> Understood. I certainly understand that view. I never use hw
> timestamps, so it is a bit of a blind spot for me. If this is a safe
> and predictable change, I don't care strongly about net vs net-next. I
> don't think it meets the bar for stable, but that is not my call.
I've found that SOF_TIMESTAMPING_OPT_ID already works with hardware timestamps
for TCP just not datagram sockets and so I though this was a fix.
> > > More importantly, note that __ip6_append_data has similar logic. For
> > > consistency the two should be updated at the same time.
> >
> > +1
> >
> > Thanks,
> > Richard
Thanks for the feedback, I'll update with __ip6_append_data.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled
2019-04-30 1:17 ` Stephen Mallon
@ 2019-04-30 2:54 ` Richard Cochran
0 siblings, 0 replies; 7+ messages in thread
From: Richard Cochran @ 2019-04-30 2:54 UTC (permalink / raw)
To: Stephen Mallon; +Cc: Willem de Bruijn, David S. Miller, Network Development
On Tue, Apr 30, 2019 at 11:17:32AM +1000, Stephen Mallon wrote:
>
> I've found that SOF_TIMESTAMPING_OPT_ID already works with hardware timestamps
> for TCP just not datagram sockets and so I though this was a fix.
Right, so if HW time stamping worked for TCP but not for UDP, then I
would call it a regression to be fixed in stable.
Thanks,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-04-30 2:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-28 5:45 [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled Stephen Mallon
2019-04-28 15:19 ` Richard Cochran
2019-04-29 2:57 ` Willem de Bruijn
2019-04-29 15:02 ` Richard Cochran
2019-04-29 15:32 ` Willem de Bruijn
2019-04-30 1:17 ` Stephen Mallon
2019-04-30 2:54 ` Richard Cochran
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.