On Mon, Mar 1, 2021 at 8:40 PM Ilya Maximets <[email protected]> wrote: > > On 1/14/21 10:09 AM, Michal Kazior wrote: > > From: Michal Kazior <[email protected]> [...] > 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. Michał _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
