From: "Michael S. Tsirkin" <mst@redhat•com>
To: Saeed Mahameed <saeedm@mellanox•com>
Cc: "toke@toke•dk" <toke@toke•dk>,
"dsahern@gmail•com" <dsahern@gmail•com>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
"pstaszewski@itcare•pl" <pstaszewski@itcare•pl>,
"davem@davemloft•net" <davem@davemloft•net>,
"jasowang@redhat•com" <jasowang@redhat•com>,
"brouer@redhat•com" <brouer@redhat•com>
Subject: Re: consistency for statistics with XDP mode
Date: Fri, 30 Nov 2018 15:30:37 -0500 [thread overview]
Message-ID: <20181130152857-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <9e71ad873f5c3b13bf41246d854ff4c0afd10ce9.camel@mellanox.com>
On Fri, Nov 30, 2018 at 08:10:58PM +0000, Saeed Mahameed wrote:
> On Thu, 2018-11-22 at 18:00 +0100, Toke Høiland-Jørgensen wrote:
> > David Ahern <dsahern@gmail•com> writes:
> >
> > > On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote:
> > > > Saeed Mahameed <saeedm@mellanox•com> writes:
> > > >
> > > > > > > I'd say it sounds reasonable to include XDP in the normal
> > > > > > > traffic
> > > > > > > counters, but having the detailed XDP-specific counters is
> > > > > > > quite
> > > > > > > useful
> > > > > > > as well... So can't we do both (for all drivers)?
> > > > > > >
> > > > >
> > > > > What are you thinking ?
> > > > > reporting XDP_DROP in interface dropped counter ?
> > > > > and XDP_TX/REDIRECT in the TX counter ?
> > > > > XDP_ABORTED in the err/drop counter ?
> > > > >
> > > > > how about having a special XDP command in the .ndo_bpf that
> > > > > would query
> > > > > the standardized XDP stats ?
> > > > the XDP-specific stats are useful to have separately as well :)
> > > >
> > >
> > > I would like to see basic packets, bytes, and dropped counters
> > > tracked
> > > for Rx and Tx via the standard netdev counters for all devices.
>
> The problem of reporting XDP_DROP in the netedev drop counter is that
> they don't fit this counter description : "no space in linux buffers"
> and it will be hard for the user to determine whether these drops are
> coming from XDP or because no buffer is available, which will make it
> impossible to estimate packet rate performance without looking at
> ethtool stats.
> And reporting XDP_DROP in the netdev rx packets counter is somehow
> misleading.. since those packets never made it out of this driver..
>
>
> And reporting XDP_DROP in the netdev rx packets counter is somehow
> misleading.. since those packets never made it out of this driver..
I think I agree. XDP needs minimal overhead - if user wants to do
counters then user can via maps. And in a sense XDP dropping packet
is much like e.g. TCP dropping packet - it is not counted
against the driver since it's not driver's fault.
> > > for ease in accounting as well as speed and simplicity for bumping
> > > counters for virtual devices from bpf helpers.
> > >
> > > From there, the XDP ones can be in the driver private stats as they
> > > are
> > > currently but with some consistency across drivers for redirects,
> > > drops,
> > > any thing else.
> > >
> > > So not a radical departure from where we are today, just getting
> > > the
> > > agreement for consistency and driver owners to make the changes.
> >
> > Sounds good to me :)
> >
> > -Toke
next prev parent reply other threads:[~2018-12-01 7:41 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 21:06 consistency for statistics with XDP mode David Ahern
2018-11-21 21:14 ` Toke Høiland-Jørgensen
2018-11-21 21:29 ` Paweł Staszewski
2018-11-22 0:21 ` Saeed Mahameed
2018-11-22 8:26 ` Toke Høiland-Jørgensen
2018-11-22 16:51 ` David Ahern
2018-11-22 17:00 ` Toke Høiland-Jørgensen
2018-11-30 20:10 ` Saeed Mahameed
2018-11-30 20:30 ` Michael S. Tsirkin [this message]
2018-11-30 20:35 ` David Ahern
2018-12-01 4:41 ` Jakub Kicinski
2018-12-01 11:14 ` Jesper Dangaard Brouer
2018-12-03 15:56 ` David Ahern
2018-12-03 19:32 ` David Miller
2018-11-30 23:54 ` Saeed Mahameed
2018-12-01 11:22 ` Jesper Dangaard Brouer
2018-12-03 15:45 ` David Ahern
2018-12-03 19:30 ` David Miller
2018-12-03 19:41 ` Arnaldo Carvalho de Melo
2018-12-03 20:00 ` Toke Høiland-Jørgensen
2018-12-04 0:00 ` David Miller
2018-12-04 0:15 ` David Ahern
2018-12-04 0:36 ` David Miller
2018-12-04 7:03 ` Toke Høiland-Jørgensen
2018-12-04 7:24 ` Jakub Kicinski
2018-12-04 9:29 ` Jesper Dangaard Brouer
2018-12-04 17:56 ` Jakub Kicinski
2018-12-04 18:06 ` Michael S. Tsirkin
2018-11-24 7:07 ` David Miller
2018-11-22 0:53 ` Toshiaki Makita
2018-11-22 16:43 ` David Ahern
2018-11-26 1:37 ` Toshiaki Makita
2018-11-27 7:04 ` Toshiaki Makita
2018-11-28 4:03 ` Jason Wang
2018-11-28 5:09 ` Toshiaki Makita
2018-11-26 22:15 ` 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=20181130152857-mutt-send-email-mst@kernel.org \
--to=mst@redhat$(echo .)com \
--cc=brouer@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@gmail$(echo .)com \
--cc=jasowang@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pstaszewski@itcare$(echo .)pl \
--cc=saeedm@mellanox$(echo .)com \
--cc=toke@toke$(echo .)dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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