igb: Add support for ETF offload
authorJesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Tue, 3 Jul 2018 22:42:59 +0000 (15:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jul 2018 13:30:28 +0000 (22:30 +0900)
commit3048cf84d152344f874e993558770bba73a65c8f
tree0868b2697eef23b320c513bb5daccece9ccf477f
parent1b9231e7e148520a3ba63a604b27f11093f21bee
igb: Add support for ETF offload

Implement HW offload support for SO_TXTIME through igb's Launchtime
feature. This is done by extending igb_setup_tc() so it supports
TC_SETUP_QDISC_ETF and configuring i210 so time based transmit
arbitration is enabled.

The FQTSS transmission mode added before is extended so strict
priority (SP) queues wait for stream reservation (SR) ones.
igb_config_tx_modes() is extended so it can support enabling/disabling
Launchtime following the previous approach used for the credit-based
shaper (CBS).

As the previous flow, FQTSS transmission mode is enabled automatically
by the driver once Launchtime (or CBS, as before) is enabled.
Similarly, it's automatically disabled when the feature is disabled
for the last queue that had it setup on.

The driver just consumes the transmit times from the skbuffs directly,
so no special handling is done in case an 'invalid' time is provided.
We assume this has been handled by the ETF qdisc already.

Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/igb/e1000_defines.h
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_main.c