mbox series

[net-next,v5,0/3] sfc: add support for PTP over IPv6 and 802.3

Message ID 20220905082323.11241-1-ihuguet@redhat.com (mailing list archive)
Headers show
Series sfc: add support for PTP over IPv6 and 802.3 | expand

Message

Íñigo Huguet Sept. 5, 2022, 8:23 a.m. UTC
Most recent cards (8000 series and newer) had enough hardware support
for this, but it was not enabled in the driver. The transmission of PTP
packets over these protocols was already added in commit bd4a2697e5e2
("sfc: use hardware tx timestamps for more than PTP"), but receiving
them was already unsupported so synchronization didn't happen.

These patches add support for timestamping received packets over
IPv6/UPD and IEEE802.3.

v2: fixed weird indentation in efx_ptp_init_filter
v3: fixed bug caused by usage of htons in PTP_EVENT_PORT definition.
    It was used in more places, where htons was used too, so using it
    2 times leave it again in host order. I didn't detected it in my
    tests because it only affected if timestamping through the MC, but
    the model I used do it through the MAC. Detected by kernel test
    robot <lkp@intel.com>
v4: removed `inline` specifiers from 2 local functions
v5: restored deleted comment with useful explanation about packets
    reordering. Deleted useless whitespaces.

Íñigo Huguet (3):
  sfc: allow more flexible way of adding filters for PTP
  sfc: support PTP over IPv6/UDP
  sfc: support PTP over Ethernet

 drivers/net/ethernet/sfc/filter.h |  22 +++++
 drivers/net/ethernet/sfc/ptp.c    | 128 +++++++++++++++++++++---------
 2 files changed, 111 insertions(+), 39 deletions(-)

Comments

Edward Cree Sept. 5, 2022, 4:08 p.m. UTC | #1
On 05/09/2022 09:23, Íñigo Huguet wrote:
> Most recent cards (8000 series and newer) had enough hardware support
> for this, but it was not enabled in the driver. The transmission of PTP
> packets over these protocols was already added in commit bd4a2697e5e2
> ("sfc: use hardware tx timestamps for more than PTP"), but receiving
> them was already unsupported so synchronization didn't happen.
> 
> These patches add support for timestamping received packets over
> IPv6/UPD and IEEE802.3.
> 
> v2: fixed weird indentation in efx_ptp_init_filter
> v3: fixed bug caused by usage of htons in PTP_EVENT_PORT definition.
>     It was used in more places, where htons was used too, so using it
>     2 times leave it again in host order. I didn't detected it in my
>     tests because it only affected if timestamping through the MC, but
>     the model I used do it through the MAC. Detected by kernel test
>     robot <lkp@intel.com>
> v4: removed `inline` specifiers from 2 local functions
> v5: restored deleted comment with useful explanation about packets
>     reordering. Deleted useless whitespaces.
> 
> Íñigo Huguet (3):
>   sfc: allow more flexible way of adding filters for PTP
>   sfc: support PTP over IPv6/UDP
>   sfc: support PTP over Ethernet
> 
>  drivers/net/ethernet/sfc/filter.h |  22 +++++
>  drivers/net/ethernet/sfc/ptp.c    | 128 +++++++++++++++++++++---------
>  2 files changed, 111 insertions(+), 39 deletions(-)

For the series:
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>

(and thanks for doing this work :)
-ed
patchwork-bot+netdevbpf@kernel.org Sept. 7, 2022, 11:40 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon,  5 Sep 2022 10:23:20 +0200 you wrote:
> Most recent cards (8000 series and newer) had enough hardware support
> for this, but it was not enabled in the driver. The transmission of PTP
> packets over these protocols was already added in commit bd4a2697e5e2
> ("sfc: use hardware tx timestamps for more than PTP"), but receiving
> them was already unsupported so synchronization didn't happen.
> 
> These patches add support for timestamping received packets over
> IPv6/UPD and IEEE802.3.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,1/3] sfc: allow more flexible way of adding filters for PTP
    https://git.kernel.org/netdev/net-next/c/313aa13a0717
  - [net-next,v5,2/3] sfc: support PTP over IPv6/UDP
    https://git.kernel.org/netdev/net-next/c/621918c45fdc
  - [net-next,v5,3/3] sfc: support PTP over Ethernet
    https://git.kernel.org/netdev/net-next/c/e4616f64726b

You are awesome, thank you!