Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-05-08 Thread Martin Pecka
Hi Hagbin, I just back from holiday. Sorry I forgot to check the errno returned by ioctl. I saw Martin has send the fix for this issue. It would be good if you could check the fix does not break your use-case. Also, if you had any idea how to check for the VLAN over bond support without usin

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-05-08 Thread Hangbin Liu
Hi Richard, Martin, I just back from holiday. Sorry I forgot to check the errno returned by ioctl. I saw Martin has send the fix for this issue. Thanks Hangbin On Mon, May 01, 2023 at 09:08:30PM -0700, Richard Cochran wrote: > On Mon, May 01, 2023 at 06:29:59PM +0200, Martin Pecka wrote: > > >

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-05-01 Thread Richard Cochran
On Mon, May 01, 2023 at 06:29:59PM +0200, Martin Pecka wrote: > > A driver which supports hardware time stamping must support the > > SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with > > the actual values as described in the section on SIOCSHWTSTAMP. It > > should also supp

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-05-01 Thread Erez
Did blame. commit afeabf3c90edf6699d7e0d058593835ec258be46 Author: Hangbin Liu Date: Wed May 25 14:46:16 2022 +0800 ptp4l: add VLAN over bond support Perhaps Hangbin Liu can assist? Erez On Tue, 2 May 2023 at 00:08, Erez wrote: > > > On Mon, 1 May 2023 at 18:30, Martin Pecka wrote:

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-05-01 Thread Erez
On Mon, 1 May 2023 at 18:30, Martin Pecka wrote: > > This code in hwts_init is wrong: > > cfg.flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX; > /* Fall back without flag if user run new build on old kernel */ > if (ioctl(fd, SIOCGHWTSTAMP, &ifreq) == -EINVAL) > init_ifreq(

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-05-01 Thread Martin Pecka
This code in hwts_init is wrong: cfg.flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX; /* Fall back without flag if user run new build on old kernel */ if (ioctl(fd, SIOCGHWTSTAMP, &ifreq) == -EINVAL) init_ifreq(&ifreq, &cfg, device); As `man ioctl` says: RETUR

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-05-01 Thread Erez
On Sun, 30 Apr 2023 at 23:26, Richard Cochran wrote: > On Thu, Mar 30, 2023 at 11:16:44AM +0800, Hangbin Liu wrote: > > Richard, what do you think? > > This code in hwts_init is wrong: > > cfg.flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX; > /* Fall back without flag if user run new buil

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-04-30 Thread Richard Cochran
On Thu, Mar 30, 2023 at 11:16:44AM +0800, Hangbin Liu wrote: > Richard, what do you think? This code in hwts_init is wrong: cfg.flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX; /* Fall back without flag if user run new build on old kernel */ if (ioctl(fd, SIOCGHWTSTAMP, &ifreq) ==

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-03-30 Thread Erez
On Thu, 30 Mar 2023 at 03:03, Martin Pecka wrote: > > > The kernel is 1 year and 3 month old, it should work. > > You mean this device: https://developer.nvidia.com/embedded/jetson-tx2 > Yes. NVidia Jetson TX2. > > > > > > The device's NIC uses eqos driver and reports all the timestamping > >

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-03-29 Thread Hangbin Liu
On Thu, Mar 30, 2023 at 03:03:44AM +0200, Martin Pecka wrote: > I have a suspicion regarding the code in sk.c: > > ```c++ >     cfg.flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX; >     /* Fall back without flag if user run new build on old kernel */ >     if (ioctl(fd, SIOCGHWTSTAMP, &ifreq) == -EINVAL)

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-03-29 Thread Martin Pecka
The kernel is 1 year and 3 month old, it should work. You mean this device: https://developer.nvidia.com/embedded/jetson-tx2 Yes. NVidia Jetson TX2. The device's NIC uses eqos driver and reports all the timestamping capabilities required for ptp4l: I do not find any 'eqos' driver i

Re: [Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-03-29 Thread Erez
On Wed, 29 Mar 2023 at 11:27, Martin Pecka wrote: > Hello, > > I'm using linuxptp from master branch on a Jetson TX2 device, where > unfortunately only kernel 4.9.299 is available from the manufacturer. > commit 224d99f50f25ec3234b99556c0076a7130e230c6 (tag: v4.9.299) Author: Greg Kroah-Hartman

[Linuxptp-devel] Bug caused by commit afeabf3 "ptp4l: add VLAN over bond support" on kernel 4.9

2023-03-29 Thread Martin Pecka
Hello, I'm using linuxptp from master branch on a Jetson TX2 device, where unfortunately only kernel 4.9.299 is available from the manufacturer. The device's NIC uses eqos driver and reports all the timestamping capabilities required for ptp4l: $ ethtool -T eth0 Time stamping parameters for