From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesus Sanchez-Palencia Subject: [PATCH v1 net-next] igb: Use an advanced ctx descriptor for launchtime Date: Thu, 26 Jul 2018 10:20:38 -0700 Message-ID: <20180726172038.11330-1-jesus.sanchez-palencia@intel.com> Cc: netdev@vger.kernel.org, jeffrey.t.kirsher@intel.com, Jesus Sanchez-Palencia To: intel-wired-lan@lists.osuosl.org Return-path: Received: from mga04.intel.com ([192.55.52.120]:12029 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730095AbeGZSn7 (ORCPT ); Thu, 26 Jul 2018 14:43:59 -0400 Sender: netdev-owner@vger.kernel.org List-ID: 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 --- drivers/net/ethernet/intel/igb/igb_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index e3a0c02721c9..fa1089defcd5 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) if (skb->ip_summed != CHECKSUM_PARTIAL) { csum_failed: - if (!(first->tx_flags & IGB_TX_FLAGS_VLAN)) + if (!(first->tx_flags & IGB_TX_FLAGS_VLAN) + && !tx_ring->launchtime_enable) return; goto no_csum; } -- 2.18.0