diff options
author | Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com> | 2018-07-26 13:20:38 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-08-24 11:52:35 -0400 |
commit | a798fbac33c4cbfe7d539298623b7af6c3f9525a (patch) | |
tree | 0b979f2a3de6dc99b44151de43980cce0690b95b /drivers/net/ethernet/intel/igb/igb_main.c | |
parent | ee400a3f1bfe7004a3e14b81c38ccc5583c26295 (diff) |
igb: Use an advanced ctx descriptor for launchtime
On i210, Launchtime (TxTime) requires the usage of an "Advanced
Transmit Context Descriptor" for retrieving the timestamp of a packet.
The igb driver correctly builds such descriptor on the segmentation
flow (i.e. igb_tso()) or on the checksum one (i.e. igb_tx_csum()), but the
feature is broken for AF_PACKET if the IGB_TX_FLAGS_VLAN is not set,
which happens due to an early return on igb_tx_csum().
This flag is only set by the kernel when a VLAN interface is used,
thus we can't just rely on it. Here we are fixing this issue by checking
if launchtime is enabled for the current tx_ring before performing the
early return.
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index d03c2f0d7592..74416f8a9446 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -5816,7 +5816,8 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first) | |||
5816 | 5816 | ||
5817 | if (skb->ip_summed != CHECKSUM_PARTIAL) { | 5817 | if (skb->ip_summed != CHECKSUM_PARTIAL) { |
5818 | csum_failed: | 5818 | csum_failed: |
5819 | if (!(first->tx_flags & IGB_TX_FLAGS_VLAN)) | 5819 | if (!(first->tx_flags & IGB_TX_FLAGS_VLAN) && |
5820 | !tx_ring->launchtime_enable) | ||
5820 | return; | 5821 | return; |
5821 | goto no_csum; | 5822 | goto no_csum; |
5822 | } | 5823 | } |