From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Alexander Lobakin <alexandr.lobakin@intel.com>
Cc: Michal Kubecek <mkubecek@suse.cz>, Andrew Lunn <andrew@lunn.ch>,
Song Liu <songliubraving@fb.com>,
Vladyslav Tarasiuk <vladyslavt@nvidia.com>,
Sameeh Jubran <sameehj@amazon.com>,
"Michael S. Tsirkin" <mst@redhat.com>, Yonghong Song <yhs@fb.com>,
Alexei Starovoitov <ast@kernel.org>,
Zheng Yongjun <zhengyongjun3@huawei.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Petr Vorel <petr.vorel@gmail.com>,
Alexander Duyck <alexanderduyck@fb.com>,
Jian Shen <shenjian15@huawei.com>,
Arthur Kiyanovski <akiyano@amazon.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org,
John Fastabend <john.fastabend@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Michal Kubiak <michal.kubiak@intel.com>,
Andrii Nakryiko <andrii@kernel.org>,
Martin Habets <habetsm.xilinx@gmail.com>,
virtualization@lists.linux-foundation.org,
Guy Tzalik <gtzalik@amazon.com>,
YueHaibing <yuehaibing@huawei.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Ido Schimmel <idosch@nvidia.com>,
Lukasz Czapnik <lukasz.czapnik@intel.com>,
KP Singh <kpsingh@kernel.org>, Saeed Mahameed <saeed@kernel.org>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Alexander Lobakin <alexandr.lobakin@intel.com>,
Dan Murphy <dmurphy@ti.com>, Jakub Kicinski <kuba@kernel.org>,
Shay Agroskin <shayagr@amazon.com>,
Marcin Wojtas <mw@semihalf.com>,
Johannes Berg <johannes@sipsolutions.net>,
Danielle Ratson <danieller@nvidia.com>,
Michal Swiatkowski <michal.swiatkowski@intel.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>,
Edward Cree <ecree.xilinx@gmail.com>,
Netanel Belgazal <netanel@amazon.com>,
Marcin Kubiak <marcin.kubiak@intel.com>,
Yangbo Lu <yangbo.lu@nxp.com>, Saeed Bishara <saeedb@amazon.com>,
Andrew Morton <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net-next 03/21] ethtool, stats: introduce standard XDP statistics
Date: Mon, 08 Nov 2021 19:09:08 +0100 [thread overview]
Message-ID: <87cznar03f.fsf@toke.dk> (raw)
In-Reply-To: <20211108132113.5152-1-alexandr.lobakin@intel.com>
Alexander Lobakin <alexandr.lobakin@intel.com> writes:
> From: Toke Høiland-Jørgensen <toke@redhat.com>
> Date: Mon, 08 Nov 2021 12:37:54 +0100
>
>> Alexander Lobakin <alexandr.lobakin@intel.com> writes:
>>
>> > From: Alexander Lobakin <alexandr.lobakin@intel.com>
>> > Date: Tue, 26 Oct 2021 11:23:23 +0200
>> >
>> >> From: Saeed Mahameed <saeed@kernel.org>
>> >> Date: Tue, 03 Aug 2021 16:57:22 -0700
>> >>
>> >> [ snip ]
>> >>
>> >> > XDP is going to always be eBPF based ! why not just report such stats
>> >> > to a special BPF_MAP ? BPF stack can collect the stats from the driver
>> >> > and report them to this special MAP upon user request.
>> >>
>> >> I really dig this idea now. How do you see it?
>> >> <ifindex:channel:stat_id> as a key and its value as a value or ...?
>> >
>> > Ideas, suggestions, anyone?
>>
>> I don't like the idea of putting statistics in a map instead of the
>> regular statistics counters. Sure, for bespoke things people want to put
>> into their XDP programs, use a map, but for regular packet/byte
>> counters, update the regular counters so XDP isn't "invisible".
>
> I wanted to provide an `ip link` command for getting these stats
> from maps and printing them in a usual format as well, but seems
> like that's an unneeded overcomplication of things since using
> maps for "regular"/"generic" XDP stats really has no reason except
> for "XDP means eBPF means maps".
Yeah, don't really see why it would have to: to me, one of the benefits
of XDP is being integrated closely with the kernel so we can have a
"fast path" *without* reinventing everything...
>> As Jesper pointed out, batching the updates so the global counters are
>> only updated once per NAPI cycle is the way to avoid a huge performance
>> overhead of this...
>
> That's how I do things currently, seems to work just fine.
Awesome!
-Toke
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
prev parent reply other threads:[~2021-11-08 18:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210803163641.3743-1-alexandr.lobakin@intel.com>
[not found] ` <20210803163641.3743-4-alexandr.lobakin@intel.com>
[not found] ` <20210803134900.578b4c37@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
[not found] ` <ec0aefbc987575d1979f9102d331bd3e8f809824.camel@kernel.org>
[not found] ` <20210804053650.22aa8a5b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
2021-08-04 16:17 ` [PATCH net-next 03/21] ethtool, stats: introduce standard XDP statistics David Ahern
[not found] ` <20210804094432.08d0fa86@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
2021-08-04 17:28 ` David Ahern
[not found] ` <11091d33ff7803257e38ee921e4ba9597acfccfc.camel@kernel.org>
2021-08-05 0:43 ` David Ahern
[not found] ` <20211026092323.165-1-alexandr.lobakin@intel.com>
[not found] ` <20211105164453.29102-1-alexandr.lobakin@intel.com>
2021-11-08 11:37 ` Toke Høiland-Jørgensen
[not found] ` <20211108132113.5152-1-alexandr.lobakin@intel.com>
2021-11-08 18:09 ` Toke Høiland-Jørgensen [this message]
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=87cznar03f.fsf@toke.dk \
--to=toke@redhat.com \
--cc=akiyano@amazon.com \
--cc=akpm@linux-foundation.org \
--cc=alexanderduyck@fb.com \
--cc=alexandr.lobakin@intel.com \
--cc=andrew@lunn.ch \
--cc=andrii@kernel.org \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=claudiu.manoil@nxp.com \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=dmurphy@ti.com \
--cc=ecree.xilinx@gmail.com \
--cc=gtzalik@amazon.com \
--cc=habetsm.xilinx@gmail.com \
--cc=hawk@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=idosch@nvidia.com \
--cc=ioana.ciornei@nxp.com \
--cc=johannes@sipsolutions.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lukasz.czapnik@intel.com \
--cc=maciej.fijalkowski@intel.com \
--cc=marcin.kubiak@intel.com \
--cc=michal.kubiak@intel.com \
--cc=michal.swiatkowski@intel.com \
--cc=mkubecek@suse.cz \
--cc=mst@redhat.com \
--cc=mw@semihalf.com \
--cc=netanel@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=petr.vorel@gmail.com \
--cc=saeed@kernel.org \
--cc=saeedb@amazon.com \
--cc=sameehj@amazon.com \
--cc=shayagr@amazon.com \
--cc=shenjian15@huawei.com \
--cc=songliubraving@fb.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=vladyslavt@nvidia.com \
--cc=yangbo.lu@nxp.com \
--cc=yhs@fb.com \
--cc=yuehaibing@huawei.com \
--cc=zhengyongjun3@huawei.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).