linux/drivers/net
Jacob Keller 1d1a79b5b9 ixgbe: Check PTP Rx timestamps via BPF filter
This patch fixes a potential Rx timestamp deadlock that causes the Rx
timestamping to stall indefinitely. The issue could occur when a PTP packet is
timestamped by hardware but never reaches the Rx queue. In order to prevent a
permanent loss of timestamping, the RXSTMP(L/H) registers have to be read to
unlock them. (This used to only occur when a packet that was timestamped
reached the software.) However the registers can't be read early otherwise
there is no way to correlate them to the packet.

This patch introduces a filter function which can be used to determine if a
packet should have been timestamped. Supplied with the filter setup by the
hwtstamp ioctl, check to make sure the PTP protocol and message type match the
expected values. If so, then read the timestamp registers (to free them.) At
this point check the descriptor bit, if the bit is set then we know this
packet correlates to the timestamp stored in the RXTSTAMP registers.
Otherwise, assume that packet was dropped by the hardware, and ignore this
timestamp value. However, we have at least unlocked the rxtstamp registers for
future timestamping.

Due to the way the driver handles skb data, it cannot be directly accessed. In
order to work around this, a copy of the skb data into a linear buffer is
made. From this buffer it becomes possible to read the data correctly

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-14 03:13:48 -07:00
..
appletalk drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
arcnet arcnet: rimi: Fix device name in debug output 2012-04-17 22:22:43 -04:00
bonding bonding: drop_monitor aware 2012-06-13 16:00:26 -07:00
caif caif: include linux/io.h 2012-04-21 15:28:47 -04:00
can can: c_can: Add support for Bosch D_CAN controller 2012-06-07 10:02:27 +02:00
cris
dsa
ethernet ixgbe: Check PTP Rx timestamps via BPF filter 2012-06-14 03:13:48 -07:00
fddi drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
hamradio drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
hippi hippi: fix printk format in rrunner.c 2012-04-16 23:48:38 -04:00
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-06-06 15:06:41 -07:00
irda drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-06-12 21:59:18 -07:00
plip
ppp ppp: avoid false drop_monitor false positives 2012-05-19 02:32:30 -04:00
slip drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
team team: add per-port option for enabling/disabling ports 2012-04-21 16:26:33 -04:00
usb usbnet: don't initialize transfer buffer before submit status URB 2012-06-12 18:51:08 -07:00
vmxnet3 drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
wan drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
wimax drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-06-12 21:59:18 -07:00
xen-netback xen/netback: Calculate the number of SKB slots required correctly 2012-05-24 16:22:53 -04:00
dummy.c dummy: fix rcu_sched self-detected stalls 2012-06-11 01:12:04 -07:00
eql.c
ifb.c
Kconfig tokenring: delete all remaining driver support 2012-05-15 20:23:16 -04:00
LICENSE.SRC
loopback.c
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-16 22:17:37 -04:00
macvtap.c macvtap: use prepare_to_wait/finish_wait to ensure mb 2012-06-07 13:18:54 -07:00
Makefile tokenring: delete all remaining driver support 2012-05-15 20:23:16 -04:00
mdio.c
mii.c
netconsole.c
rionet.c
sb1000.c
Space.c drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
sungem_phy.c
tun.c drivers/net: Convert compare_ether_addr to ether_addr_equal 2012-05-10 23:33:01 -04:00
veth.c
virtio_net.c virtio-net: fix a race on 32bit arches 2012-06-10 20:23:20 -07:00
xen-netfront.c xen: do not disable netfront in dom0 2012-05-22 16:50:28 -04:00