linux/drivers/net/ethernet
Laurence Evans c939a31645 sfc: PTP changes to support improved UUID filtering mode
There is a long-standing problem with the packet-timestamp matching in
the driver. When a PTP packet is received by the MC, the FPGA
timestamps the packet and the MC sends the timestamp and 6 bytes of
the UUID to the driver. The driver then matches the timestamp against
received packets using the same 6 bytes of UUID.

The problem comes from the choice of which 6 bytes to use. The PTP
spec is slightly contradictory and misleading in one of the two places
where the UUIDs are discussed. From section 7.2.2.2 of the spec, a
PTPD2 UUID can be either a EUI-64 or a EUI-64 constructed from a
EUI-48. The typical ethernet based implementation uses a EUI-64
constructed from a EUI-48. This works by taking the first 3 bytes of
the MAC address of the NIC being used for PTP (the OUI), then
inserting 0xFF, 0xFE, then taking the last 3 bytes of the MAC address
giving
          MAC[0], MAC[1], MAC[2], 0xFF, 0xFE, MAC[3], MAC[4], MAC[5]
The current MC firmware and driver discard the first two bytes of this
UUID and packets are matched against timestamps using bytes 2 to 7 so
there is a small risk that in a deployment of Solarflare PTP NICs used
with other vendors NICs, that a PTP packet could be matched against
the wrong timestamp. This applies to all other organisations whose
third byte of the OUI is 0x53. It's a long list but I notice that it
includes Cisco.

The necessary modifications to use bytes 0-2 and 5-7 of the UUID to
match against are quite small but introduce incompatibility between
older version of the firmware and driver.

When PTP is enabled via SO_TIMESTAMPING specifying PTP V2, the driver
will try to enable PTP in the firmware using the enhanced mode
(above). If the firmware returns an error, the driver will enable PTP
in the firmware using the old mode.

[bwh: Fix some style errors; remove private ioctl bits]
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-03-07 20:21:55 +00:00
..
3com Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-01-29 15:32:13 -05:00
8390 Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
adaptec drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
adi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-01-15 15:05:59 -05:00
aeroflex net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
alteon drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
amd drivers: net: Remove remaining alloc/OOM messages 2013-02-08 17:44:39 -05:00
apple net/apple: remove __dev* attributes 2012-12-03 11:16:54 -08:00
atheros Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
broadcom bnx2x: use the default NAPI weight 2013-03-05 23:40:01 -05:00
brocade bna: Driver Version Updated to 3.1.2.1 2012-12-11 18:25:53 -05:00
cadence net: macb: use module_platform_driver_probe() 2013-03-05 23:39:13 -05:00
calxeda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-01-29 15:32:13 -05:00
chelsio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
cirrus net: cs89x0: use module_platform_driver_probe() 2013-03-05 23:39:13 -05:00
cisco enic: change sprintf() to snprintf() 2013-01-18 14:34:48 -05:00
davicom ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
dec Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
dlink drivers/net: delete old parallel port de600/de620 drivers 2013-01-22 10:39:49 -05:00
emulex be2net: remove BUG_ON() in be_mcc_compl_is_new() 2013-02-13 13:52:55 -05:00
faraday net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
freescale net: fec: fix build error in no MXC platform 2013-03-04 14:12:07 -05:00
fujitsu Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
hp drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
i825xx Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
ibm net: ehea module param description fix 2013-02-18 12:26:36 -05:00
icplus drivers/net/ethernet/icplus: remove depends on CONFIG_EXPERIMENTAL 2013-01-22 12:01:33 -08:00
intel hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
marvell Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
mellanox hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
micrel net: ks8851: convert to threaded IRQ 2013-01-29 13:32:00 -05:00
microchip Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
myricom ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
natsemi Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
neterion remove init of dev->perm_addr in drivers 2013-01-08 18:00:48 -08:00
nuvoton ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
nvidia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-01-15 15:05:59 -05:00
nxp net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
octeon ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
oki-semi pch_gbe, ptp_pch: Fix the dependency direction between these drivers 2012-11-17 22:11:45 -05:00
packetengines Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
pasemi net/pasemi: Fix missing coding style 2013-02-24 21:22:47 -05:00
qlogic hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
rdc r6040: check MDIO register busy waiting result 2013-03-06 15:40:53 -05:00
realtek r8169: honor jumbo settings when chipset is requested to start. 2013-02-28 15:37:29 -05:00
renesas ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
seeq Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
sfc sfc: PTP changes to support improved UUID filtering mode 2013-03-07 20:21:55 +00:00
sgi ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
silan Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
sis remove init of dev->perm_addr in drivers 2013-01-08 18:00:48 -08:00
smsc drivers: net: Remove remaining alloc/OOM messages 2013-02-08 17:44:39 -05:00
stmicro Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
sun hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
tehuti ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
ti drivers: net: ethernet: cpsw: consider number of slaves in interation 2013-02-26 17:26:11 -05:00
tile net: remove unnecessary NET_ADDR_RANDOM "bitclean" 2013-01-03 22:37:36 -08:00
toshiba net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
tundra
via Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-05 14:12:20 -05:00
wiznet net: remove unnecessary NET_ADDR_RANDOM "bitclean" 2013-01-03 22:37:36 -08:00
xilinx ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
xircom ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
xscale net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
Kconfig drivers/net: delete old 8 bit ISA Racal ni5010 support. 2013-01-22 10:39:52 -05:00
Makefile drivers/net: delete old 8 bit ISA Racal ni5010 support. 2013-01-22 10:39:52 -05:00
dnet.c net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
dnet.h
ethoc.c ethoc: Cleanup driver format 2013-01-29 14:07:05 -05:00
fealnx.c drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
jme.c jme: remove __dev* attributes 2012-12-03 11:16:54 -08:00
jme.h
korina.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
lantiq_etop.c net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
netx-eth.c ARM: netx: move platform_data definitions 2012-09-14 11:17:36 +02:00
s6gmac.c net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00