[ovs-dev] [PATCH v2] netlink: ignore IFLA_WIRELESS events

Michał Kazior kazikcz at gmail.com
Tue Mar 2 09:19:00 UTC 2021

On Mon, Mar 1, 2021 at 8:40 PM Ilya Maximets <i.maximets at ovn.org> wrote:
> On 1/14/21 10:09 AM, Michal Kazior wrote:
> > From: Michal Kazior <michal at plume.com>
> Hi, Michal.  Thanks for working on this!
> The idea seems reasonable to me.  Some comments for the implementation
> inline.
> > diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c
> > index 125802925..316524c0f 100644
> > --- a/lib/rtnetlink.c
> > +++ b/lib/rtnetlink.c
> > @@ -82,7 +82,7 @@ rtnetlink_parse_link_info(const struct nlattr *nla,
> >  /* Parses a rtnetlink message 'buf' into 'change'.  If 'buf' is unparseable,
> >   * leaves 'change' untouched and returns false.  Otherwise, populates 'change'
> >   * and returns true. */
> Comment above is no longer correct with this change.
> In general, changing the semantics of a 'parse' method looks
> a bit tricky.  Maybe we can do this a bit differently?
> I'd suggest to keep the 'rtnetlink_parse' almost as is, but
> add some extra flag to 'struct rtnetlink_change', that will
> be set for change events that are not interesting for OVS.
> Something like 'bool irrelevant;'  'rtnetlink_parse' will set
> it to 'true' for wireless events with a fair comment that
> "wireless events never really change interface state".
> So, 'nln_run' will only report events if this flag is not
> set and netdev-linux will check for:
>   if (rtnetlink_parse(&buf, &change) && !change->irrelevant)
> What do you think?

It does sound reasonable. I think I did consider that back when I was
cooking this but apparently I discarded the idea for some reason that
I no longer remember. I'll give it a try.


More information about the dev mailing list