From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Jonathan Toppins <jtoppins@redhat.com>,
Veaceslav Falico <vfalico@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [PATCH net] veth: Add updating of trans_start
Date: Tue, 21 Jun 2022 18:42:19 -0700 [thread overview]
Message-ID: <15667.1655862139@famine> (raw)
In-Reply-To: <20220621125233.1d36737b@kicinski-fedora-PC1C0HJN>
Jakub Kicinski <kuba@kernel.org> wrote:
>On Fri, 17 Jun 2022 17:55:50 -0700 Jakub Kicinski wrote:
>> > >I presume it needs it to check if the device has transmitted anything
>> > >in the last unit of time, can we look at the device stats for LLTX for
>> > >example?
>> >
>> > Yes, that's the use case.
>> >
>> > Hmm. Polling the device stats would likely work for software
>> > devices, although the unit of time varies (some checks are fixed at one
>> > unit, but others can be N units depending on the missed_max option
>> > setting).
>> >
>> > Polling hardware devices might not work; as I recall, some
>> > devices only update the statistics on timespans on the order of seconds,
>> > e.g., bnx2 and tg3 appear to update once per second. But those do
>> > update trans_start.
>>
>> Right, unfortunately.
>>
>> > The question then becomes how to distinguish a software LLTX
>> > device from a hardware LLTX device.
>>
>> If my way of thinking about trans_start is correct then we can test
>> for presence of ndo_tx_timeout. Anything that has the tx_timeout NDO
>> must be maintaining trans_start.
>
>So what's your thinking Jay? Keep this as an immediate small fix
>for net but work on using a different approach in net-next?
Sorry, was out for the three day weekend.
I had a quick look and I think you're probably right that
anything with a ndo_tx_timeout will deal with trans_start, and anything
without ndo_tx_timeout will be a software device not subject to delayed
batching of stats updates.
And, yes, if there are no objections, what I'd like to do now is
apply the veth change to get things working and work up the bifurcated
approach separately (which would ultimately include removing the
trans_start updates from veth and tun).
-J
---
-Jay Vosburgh, jay.vosburgh@canonical.com
next prev parent reply other threads:[~2022-06-22 1:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 19:26 [PATCH net] veth: Add updating of trans_start Jay Vosburgh
2022-06-17 10:40 ` patchwork-bot+netdevbpf
2022-06-17 15:45 ` Jakub Kicinski
2022-06-17 16:42 ` Jay Vosburgh
2022-06-17 19:44 ` Jakub Kicinski
2022-06-18 0:27 ` Jay Vosburgh
2022-06-18 0:55 ` Jakub Kicinski
2022-06-21 19:52 ` Jakub Kicinski
2022-06-22 1:42 ` Jay Vosburgh [this message]
2022-06-22 4:38 ` Jakub Kicinski
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=15667.1655862139@famine \
--to=jay.vosburgh@canonical.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jtoppins@redhat.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vfalico@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).