All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: David Miller <davem@davemloft.net>, toke@toke.dk
Cc: brouer@redhat.com, saeedm@mellanox.com, mst@redhat.com,
	netdev@vger.kernel.org, pstaszewski@itcare.pl,
	jasowang@redhat.com
Subject: Re: consistency for statistics with XDP mode
Date: Mon, 3 Dec 2018 17:15:03 -0700	[thread overview]
Message-ID: <551e2a00-6d00-8ba1-71e9-1ea0a165b15f@gmail.com> (raw)
In-Reply-To: <20181203.160045.348991720664159909.davem@davemloft.net>

On 12/3/18 5:00 PM, David Miller wrote:
> From: Toke Høiland-Jørgensen <toke@toke.dk>
> Date: Mon, 03 Dec 2018 22:00:32 +0200
> 
>> I wonder if it would be possible to support both the "give me user
>> normal stats" case and the "let me do whatever I want" case by a
>> combination of userspace tooling and maybe a helper or two?
>>
>> I.e., create a "do_stats()" helper (please pick a better name), which
>> will either just increment the desired counters, or set a flag so the
>> driver can do it at napi poll exit. With this, the userspace tooling
>> could have a "--give-me-normal-stats" switch (or some other interface),
>> which would inject a call instruction to that helper at the start of the
>> program.
>>
>> This would enable the normal counters in a relatively painless way,
>> while still letting people opt out if they don't want to pay the cost in
>> terms of overhead. And having the userspace tooling inject the helper
>> call helps support the case where the admin didn't write the XDP
>> programs being loaded.
>>
>> Any reason why that wouldn't work?
> 
> I think this is a good idea, or even an attribute tag that gets added
> to the XDP program that controls stats handling.
> 

My argument is that the ebpf program writer should *not* get that
choice; the admin of the box should. Program writers make mistakes. Box
admins / customer support are the ones that have to deal with those
mistakes. Program writers - especially for xdp - are going to be focused
on benchmarks; admins are focused on the big picture and should be given
the option of trading a small amount of performance for simpler management.

So, instead of a program tag which the program writer controls, how
about some config knob that an admin controls that says at attach time
use standard stats?

  reply	other threads:[~2018-12-04  0:15 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
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 [this message]
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=551e2a00-6d00-8ba1-71e9-1ea0a165b15f@gmail.com \
    --to=dsahern@gmail.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pstaszewski@itcare.pl \
    --cc=saeedm@mellanox.com \
    --cc=toke@toke.dk \
    /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.