[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Jul 2023 15:06:10 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Ilya Maximets <i.maximets@....org>
Cc: Eric Garver <eric@...ver.life>, Aaron Conole <aconole@...hat.com>,
netdev@...r.kernel.org, dev@...nvswitch.org, Paolo Abeni
<pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, "David S. Miller"
<davem@...emloft.net>, Adrian Moreno <amorenoz@...hat.com>, Eelco Chaudron
<echaudro@...hat.com>
Subject: Re: [ovs-dev] [PATCH net-next 2/2] net: openvswitch: add drop
action
On Fri, 7 Jul 2023 18:04:36 +0200 Ilya Maximets wrote:
> >> That already exists, right? Johannes added it in the last release for WiFi.
> >
> > I'm not sure. The SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE behaves similarly
> > to that on a surface. However, looking closer, any value that can be passed
> > into ieee80211_rx_handlers_result() and ends up in the kfree_skb_reason() is
> > kind of defined in net/mac80211/drop.h, unless I'm missing something (very
> > possible, because I don't really know wifi code).
> >
> > The difference, I guess, is that for openvswitch values will be provided by
> > the userpsace application via netlink interface. It'll be just a number not
> > defined anywhere in the kernel. Only the subsystem itself will be defined
> > in order to occupy the range. Garbage in, same garbage out, from the kernel's
> > perspective.
>
> To be clear, I think, not defining them in this particular case is better.
> Definition of every reason that userspace can come up with will add extra
> uAPI maintenance cost/issues with no practical benefits. Values are not
> going to be used for anything outside reporting a drop reason and subsystem
> offset is not part of uAPI anyway.
Ah, I see. No, please don't stuff user space defined values into
the drop reason. The reasons are for debugging the kernel stack
itself. IOW it'd be abuse not reuse.
Powered by blists - more mailing lists