linux_dsm_epyc7002/drivers/net
Jacob Keller 3a6a4edaa5 ixgbe: Hardware Timestamping + PTP Hardware Clock (PHC)
This patch enables hardware timestamping for use with PTP software by
extracting a ns counter from an arbitrary fixed point cycles counter.
The hardware generates SYSTIME registers using the DMA tick which
changes based on the current link speed. These SYSTIME registers are
converted to ns using the cyclecounter and timecounter structures
provided by the kernel. Using the SO_TIMESTAMPING api, software can
enable and access timestamps for PTP packets.

The SO_TIMESTAMPING API has space for 3 different kinds of timestamps,
SYS, RAW, and SOF. SYS hardware timestamps are hardware ns values that
are then scaled to the software clock. RAW hardware timestamps are the
direct raw value of the ns counter. SOF software timestamps are the
software timestamp calculated as close as possible to the software
transmit, but are not offloaded to the hardware. This patch only
supports the RAW hardware timestamps due to inefficiency of the SYS
design.

This patch also enables the PHC subsystem features for atomically
adjusting the cycle register, and adjusting the clock frequency in
parts per billion. This frequency adjustment works by slightly
adjusting the value added to the cycle registers each DMA tick. This
causes the hardware registers to overflow rapidly (approximately once
every 34 seconds, when at 10gig link). To solve this, the timecounter
structure is used, along with a timer set for every 25 seconds. This
allows for detecting register overflow and converting the cycle
counter registers into ns values needed for providing useful
timestamps to the network stack.

Only the basic required clock functions are supported at this time,
although the hardware supports some ancillary features and these could
easily be enabled in the future.

Note that use of this hardware timestamping requires modifying daemon
software to use the SO_TIMESTAMPING API for timestamps, and the
ptp_clock PHC framework for accessing the clock. The timestamps have
no relation to the system time at all, so software must use the posix
clock generated by the PHC framework instead.

Signed-off-by: Jacob E Keller <jacob.e.keller@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-05-09 22:48:51 -07:00
..
appletalk
arcnet arcnet: rimi: Fix device name in debug output 2012-04-17 22:22:43 -04:00
bonding bonding: bond_update_speed_duplex() can return void since no callers check its return 2012-04-27 00:03:35 -04:00
caif caif: include linux/io.h 2012-04-21 15:28:47 -04:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-23 23:15:17 -04:00
cris
dsa
ethernet ixgbe: Hardware Timestamping + PTP Hardware Clock (PHC) 2012-05-09 22:48:51 -07:00
fddi
hamradio
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-04-23 23:15:17 -04:00
irda NET: smsc-ircc2: mark non-experimental 2012-04-27 00:03:35 -04:00
phy netdev/of/phy: Add MDIO bus multiplexer driven by GPIO lines. 2012-05-07 22:58:09 -04:00
plip
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-15 13:19:04 -04:00
slip
team team: add per-port option for enabling/disabling ports 2012-04-21 16:26:33 -04:00
tokenring drivers/net: decouple ISA and ISA_DMA_API 2012-04-21 15:28:48 -04:00
usb smsc75xx: let EEPROM determine GPIO/LED settings 2012-05-07 23:43:57 -04:00
vmxnet3
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-23 23:15:17 -04:00
wimax skb: Add inline helper for getting the skb end offset from head 2012-05-06 13:13:19 -04:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-07 23:35:40 -04:00
xen-netback
dummy.c dummy: Add ndo_uninit(). 2012-04-16 23:56:36 -04:00
eql.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c macvlan: add FDB bridge ops and macvlan flags 2012-04-15 13:06:05 -04:00
macvtap.c macvtap: zerocopy: validate vectors before building skb 2012-05-02 18:22:21 +03:00
Makefile
mdio.c
mii.c
netconsole.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c
veth.c
virtio_net.c virtio-net: send gratuitous packets when needed 2012-04-15 03:23:31 -04:00
xen-netfront.c