netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vedang Patel <vedang.patel@intel.com>
To: netdev@vger.kernel.org
Cc: jeffrey.t.kirsher@intel.com, davem@davemloft.net,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
	intel-wired-lan@lists.osuosl.org, vinicius.gomes@intel.com,
	l@dorileo.org, Vedang Patel <vedang.patel@intel.com>
Subject: [PATCH net-next v3 1/6] igb: clear out tstamp after sending the packet.
Date: Mon, 17 Jun 2019 12:31:05 -0700	[thread overview]
Message-ID: <1560799870-18956-2-git-send-email-vedang.patel@intel.com> (raw)
In-Reply-To: <1560799870-18956-1-git-send-email-vedang.patel@intel.com>

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 <vedang.patel@intel.com>
---
 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 fc925adbd9fa..f66dae72fe37 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -5688,6 +5688,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;
-- 
2.7.3


  reply	other threads:[~2019-06-17 19:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 19:31 [PATCH net-next v3 0/6] net/sched: Add txtime-assist support for taprio Vedang Patel
2019-06-17 19:31 ` Vedang Patel [this message]
2019-06-21  1:50   ` [Intel-wired-lan] [PATCH net-next v3 1/6] igb: clear out tstamp after sending the packet Brown, Aaron F
2019-06-17 19:31 ` [PATCH net-next v3 2/6] etf: Add skip_sock_check Vedang Patel
2019-06-18  9:28   ` Sergei Shtylyov
2019-06-19 16:55     ` Patel, Vedang
2019-06-17 19:31 ` [PATCH net-next v3 3/6] taprio: calculate cycle_time when schedule is installed Vedang Patel
2019-06-17 19:31 ` [PATCH net-next v3 4/6] taprio: Add support for txtime-assist mode Vedang Patel
2019-06-17 23:22   ` David Miller
2019-06-19 16:54     ` Patel, Vedang
2019-06-17 19:31 ` [PATCH net-next v3 5/6] taprio: make clock reference conversions easier Vedang Patel
2019-06-17 23:23   ` David Miller
2019-06-17 19:31 ` [PATCH net-next v3 6/6] taprio: Adjust timestamps for TCP packets Vedang Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1560799870-18956-2-git-send-email-vedang.patel@intel.com \
    --to=vedang.patel@intel.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=l@dorileo.org \
    --cc=netdev@vger.kernel.org \
    --cc=vinicius.gomes@intel.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).