mbox series

[0/3] SOF_TIMESTAMPING_OPT_ID backport to 4.14 and 4.19

Message ID 20220406192956.3291614-1-vladimir.oltean@nxp.com
Headers show
Series SOF_TIMESTAMPING_OPT_ID backport to 4.14 and 4.19 | expand

Message

Vladimir Oltean April 6, 2022, 7:29 p.m. UTC
As discussed with Willem here:
https://lore.kernel.org/netdev/CA+FuTSdQ57O6RWj_Lenmu_Vd3NEX9xMzMYkB0C3rKMzGgcPc6A@mail.gmail.com/T/

the kernel silently doesn't act upon the SOF_TIMESTAMPING_OPT_ID socket
option in several cases on older kernels, yet user space has no way to
find out about this, practically resulting in broken functionality.

This patch set backports the support towards linux-4.14.y and linux-4.19.y,
which fixes the issue described above by simply making the kernel act
upon SOF_TIMESTAMPING_OPT_ID as expected.

Testing was done with the most recent (not the vintage-correct one)
kselftest script at:
tools/testing/selftests/networking/timestamping/txtimestamp.sh
with the message "OK. All tests passed".

I tried to backport the changes to linux-4.9.y as well, but something
apparently unrelated is broken there, and I didn't investigate further
so I'm not targeting that stable branch:

./txtimestamp.sh
protocol:     TCP
payload:      10
server port:  9000

family:       INET
test SND
    USR: 1581090724 s 856088 us (seq=0, len=0)
./txtimestamp: poll

Willem de Bruijn (2):
  ipv6: add missing tx timestamping on IPPROTO_RAW
  net: add missing SOF_TIMESTAMPING_OPT_ID support

 include/net/sock.h     | 25 +++++++++++++++++++++----
 net/can/raw.c          |  2 +-
 net/ipv4/raw.c         |  2 +-
 net/ipv6/raw.c         |  7 +++++--
 net/packet/af_packet.c |  6 +++---
 5 files changed, 31 insertions(+), 11 deletions(-)

Comments

Vladimir Oltean April 8, 2022, 3:29 p.m. UTC | #1
Hello Greg, Sasha,

On Wed, Apr 06, 2022 at 10:29:53PM +0300, Vladimir Oltean wrote:
> As discussed with Willem here:
> https://lore.kernel.org/netdev/CA+FuTSdQ57O6RWj_Lenmu_Vd3NEX9xMzMYkB0C3rKMzGgcPc6A@mail.gmail.com/T/
> 
> the kernel silently doesn't act upon the SOF_TIMESTAMPING_OPT_ID socket
> option in several cases on older kernels, yet user space has no way to
> find out about this, practically resulting in broken functionality.
> 
> This patch set backports the support towards linux-4.14.y and linux-4.19.y,
> which fixes the issue described above by simply making the kernel act
> upon SOF_TIMESTAMPING_OPT_ID as expected.
> 
> Testing was done with the most recent (not the vintage-correct one)
> kselftest script at:
> tools/testing/selftests/networking/timestamping/txtimestamp.sh
> with the message "OK. All tests passed".

Could you please pick up these backports for "stable"? Thanks.
Greg KH April 29, 2022, 8:38 a.m. UTC | #2
On Fri, Apr 08, 2022 at 03:29:30PM +0000, Vladimir Oltean wrote:
> Hello Greg, Sasha,
> 
> On Wed, Apr 06, 2022 at 10:29:53PM +0300, Vladimir Oltean wrote:
> > As discussed with Willem here:
> > https://lore.kernel.org/netdev/CA+FuTSdQ57O6RWj_Lenmu_Vd3NEX9xMzMYkB0C3rKMzGgcPc6A@mail.gmail.com/T/
> > 
> > the kernel silently doesn't act upon the SOF_TIMESTAMPING_OPT_ID socket
> > option in several cases on older kernels, yet user space has no way to
> > find out about this, practically resulting in broken functionality.
> > 
> > This patch set backports the support towards linux-4.14.y and linux-4.19.y,
> > which fixes the issue described above by simply making the kernel act
> > upon SOF_TIMESTAMPING_OPT_ID as expected.
> > 
> > Testing was done with the most recent (not the vintage-correct one)
> > kselftest script at:
> > tools/testing/selftests/networking/timestamping/txtimestamp.sh
> > with the message "OK. All tests passed".
> 
> Could you please pick up these backports for "stable"? Thanks.

Do you not already see these in a released kernel?  If not, please
resubmit what is missing as I think they are all there...

thanks,

greg k-h
Vladimir Oltean April 29, 2022, 9:54 a.m. UTC | #3
On Fri, Apr 29, 2022 at 10:38:42AM +0200, Greg Kroah-Hartman wrote:
> On Fri, Apr 08, 2022 at 03:29:30PM +0000, Vladimir Oltean wrote:
> > Hello Greg, Sasha,
> > 
> > On Wed, Apr 06, 2022 at 10:29:53PM +0300, Vladimir Oltean wrote:
> > > As discussed with Willem here:
> > > https://lore.kernel.org/netdev/CA+FuTSdQ57O6RWj_Lenmu_Vd3NEX9xMzMYkB0C3rKMzGgcPc6A@mail.gmail.com/T/
> > > 
> > > the kernel silently doesn't act upon the SOF_TIMESTAMPING_OPT_ID socket
> > > option in several cases on older kernels, yet user space has no way to
> > > find out about this, practically resulting in broken functionality.
> > > 
> > > This patch set backports the support towards linux-4.14.y and linux-4.19.y,
> > > which fixes the issue described above by simply making the kernel act
> > > upon SOF_TIMESTAMPING_OPT_ID as expected.
> > > 
> > > Testing was done with the most recent (not the vintage-correct one)
> > > kselftest script at:
> > > tools/testing/selftests/networking/timestamping/txtimestamp.sh
> > > with the message "OK. All tests passed".
> > 
> > Could you please pick up these backports for "stable"? Thanks.
> 
> Do you not already see these in a released kernel?  If not, please
> resubmit what is missing as I think they are all there...

They're there, thanks.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.14.y&id=add668be8f5e53f4471a075edaa70a7cb85fd036
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.14.y&id=a96c57a72f477b42ab238fad3c2c1f8e8c091256
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=cd7295d0bea3f56a3f024f1b22d50a0f3fc727f1