Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: Kurt Kanzenbach <kurt@linutronix.de>,
	Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	bridge@lists.linux-foundation.org, netdev@vger.kernel.org
Subject: Re: [RFC PATCH] net: bridge: Don't reset time stamps on SO_TXTIME enabled sockets
Date: Thu, 20 Aug 2020 14:23:12 +0300	[thread overview]
Message-ID: <5affe98d-bb16-0744-5266-db708fb9dc16@cumulusnetworks.com> (raw)
In-Reply-To: <20200820105737.5089-1-kurt@linutronix.de>

On 8/20/20 1:57 PM, Kurt Kanzenbach wrote:
> When using the ETF Qdisc in combination with a bridge and DSA, then all packets
> gets dropped due to invalid time stamps. The setup looks like this:
> 
> Transmit path:
> 
> Application -> bridge (br0) -> DSA slave ports (lan0, lan1) -> ETF Qdisc
>              -> ethernet (eth0)
> 
> The user space application uses SO_TXTIME to attach a sending time stamp for
> each packet using the corresponding interface. That time stamp is then attached
> to the skb in the kernel. The first network device involved in the chain is the
> bridge device. However, in br_forward_finish() the time stamp is reset to zero
> unconditionally. Meaning when the skb arrives at the ETF Qdisc, it's dropped as
> invalid because the time stamp is zero.
> 
> The reset of the time stamp in the bridge code is there for a good reason. See
> commit 41d1c8839e5f ("net: clear skb->tstamp in bridge forwarding path")
> Therefore, add a conditional for SO_TXTIME enabled sockets.
> 
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
>   net/bridge/br_forward.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> RFC, because I don't know if that's the correct way to solve that issue.
> 


The new conditionals will be for all forwarded packets, not only the ones that are transmitted through
the bridge master device. If you'd like to do this please limit it to the bridge dev transmit.

Thanks,
  Nik

  reply	other threads:[~2020-08-20 11:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 10:57 Kurt Kanzenbach
2020-08-20 11:23 ` Nikolay Aleksandrov [this message]
2020-08-21  7:47   ` Kurt Kanzenbach

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=5affe98d-bb16-0744-5266-db708fb9dc16@cumulusnetworks.com \
    --to=nikolay@cumulusnetworks.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --subject='Re: [RFC PATCH] net: bridge: Don'\''t reset time stamps on SO_TXTIME enabled sockets' \
    /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

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).