All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tyler J. Stachecki" <stachecki.tyler@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: fankaixi.li@bytedance.com, stachecki.tyler@gmail.com,
	xiexiaohui.xxh@bytedance.com, cong.wang@bytedance.com,
	Pravin B Shelar <pshelar@ovn.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, dev@openvswitch.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ovs: Only clear tstamp when changing namespaces
Date: Sun, 19 Sep 2021 11:43:37 -0400	[thread overview]
Message-ID: <20210919154337.9243-1-stachecki.tyler@gmail.com> (raw)

As of "ovs: clear skb->tstamp in forwarding path", the
tstamp is now being cleared unconditionally to fix fq qdisc
operation with ovs vports.

While this is mostly correct and fixes forwarding for that
use case, a slight adjustment is necessary to ensure that
the tstamp is cleared *only when the forwarding is across
namespaces*.

Signed-off-by: Tyler J. Stachecki <stachecki.tyler@gmail.com>
---
 net/openvswitch/vport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index cf2ce5812489..c2d32a5c3697 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -507,7 +507,8 @@ void ovs_vport_send(struct vport *vport, struct sk_buff *skb, u8 mac_proto)
 	}
 
 	skb->dev = vport->dev;
-	skb->tstamp = 0;
+	if (dev_net(skb->dev))
+		skb->tstamp = 0;
 	vport->ops->send(skb);
 	return;
 
-- 
2.20.1


             reply	other threads:[~2021-09-19 15:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19 15:43 Tyler J. Stachecki [this message]
2021-09-19 23:33 ` [PATCH] ovs: Only clear tstamp when changing namespaces Cong Wang
2021-09-20  5:44   ` Tyler Stachecki
2021-09-20 16:40     ` Cong Wang

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=20210919154337.9243-1-stachecki.tyler@gmail.com \
    --to=stachecki.tyler@gmail.com \
    --cc=cong.wang@bytedance.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=fankaixi.li@bytedance.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.org \
    --cc=xiexiaohui.xxh@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.