sfc: support unicast PTP
authorÍñigo Huguet <ihuguet@redhat.com>
Fri, 31 Mar 2023 11:14:03 +0000 (13:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Apr 2023 02:02:51 +0000 (19:02 -0700)
commit49ed35a0b6aafacd5e4d7c24ed6c02fbfbadaedc
tree1e916b85f4fb773b02788c94aae1b35edeb44867
parent75687cd06620e5229a74c127e6a46048aa6307f3
sfc: support unicast PTP

When sending a PTP event packet, add the correct filters that will make
that future incoming unicast PTP event packets will be timestamped.
The unicast address for the filter is gotten from the outgoing skb
before sending it.

Until now they were not timestamped because only filters that match with
the PTP multicast addressed were being configured into the NIC for the
PTP special channel. Packets received through different channels are not
timestamped, getting "received SYNC without timestamp" error in ptp4l.

Note that the inserted filters are never removed unless the NIC is stopped
or reconfigured, so efx_ptp_stop is called. Removal of old filters will
be handled by the next patch.

Additionally, cleanup a bit efx_ptp_xmit_skb_mc to use the reverse xmas
tree convention and remove an unnecessary assignment to rc variable in
void function.

Reported-by: Yalin Li <yalli@redhat.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/ptp.c