From patchwork Tue May 28 17:46:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vedang Patel X-Patchwork-Id: 1106991 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45DQ0q2C6Pz9s55 for ; Wed, 29 May 2019 19:10:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E1E9187E46; Wed, 29 May 2019 09:10:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lpLpBYBazkEH; Wed, 29 May 2019 09:10:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6E2FE87E49; Wed, 29 May 2019 09:10:32 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id F298C1BF973 for ; Tue, 28 May 2019 17:47:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EFD3322654 for ; Tue, 28 May 2019 17:47:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P731OUxwk6zx for ; Tue, 28 May 2019 17:47:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by silver.osuosl.org (Postfix) with ESMTPS id 74A8722FC6 for ; Tue, 28 May 2019 17:47:01 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 10:47:01 -0700 X-ExtLoop1: 1 Received: from vpatel-desk.jf.intel.com (HELO localhost.localdomain) ([10.7.159.52]) by orsmga002.jf.intel.com with ESMTP; 28 May 2019 10:47:01 -0700 From: Vedang Patel To: netdev@vger.kernel.org Date: Tue, 28 May 2019 10:46:42 -0700 Message-Id: <1559065608-27888-2-git-send-email-vedang.patel@intel.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1559065608-27888-1-git-send-email-vedang.patel@intel.com> References: <1559065608-27888-1-git-send-email-vedang.patel@intel.com> X-Mailman-Approved-At: Wed, 29 May 2019 09:10:29 +0000 Subject: [Intel-wired-lan] [PATCH net-next v1 1/7] igb: clear out tstamp after sending the packet. X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jiri@resnulli.us, l@dorileo.org, jhs@mojatatu.com, intel-wired-lan@lists.osuosl.org, xiyou.wangcong@gmail.com, davem@davemloft.net MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" skb->tstamp is being used at multiple places. On the transmit side, it is used to determine the launchtime of the packet. It is also used to determine the software timestamp after the packet has been transmitted. So, clear out the tstamp value after it has been read so that we do not report false software timestamp on the receive side. Signed-off-by: Vedang Patel --- drivers/net/ethernet/intel/igb/igb_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 39f33afc479c..005c1693efc8 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -5687,6 +5687,7 @@ static void igb_tx_ctxtdesc(struct igb_ring *tx_ring, */ if (tx_ring->launchtime_enable) { ts = ns_to_timespec64(first->skb->tstamp); + first->skb->tstamp = 0; context_desc->seqnum_seed = cpu_to_le32(ts.tv_nsec / 32); } else { context_desc->seqnum_seed = 0;