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

Ilya Maximets i.maximets at ovn.org
Tue Apr 20 10:11:35 UTC 2021


On 4/13/21 2:17 PM, Michal Kazior wrote:
> From: Michal Kazior <michal at plume.com>
> 
> Some older wireless drivers - ones relying on the
> old and long deprecated wireless extension ioctl
> system - can generate quite a bit of IFLA_WIRELESS
> events depending on their configuration and
> runtime conditions. These are delivered as
> RTNLGRP_LINK via RTM_NEWLINK messages.
> 
> These tend to be relatively easily identifiable
> because they report the change mask being 0. This
> isn't guaranteed but in practice it shouldn't be a
> problem. None of the wireless events that I ever
> observed actually carry any unique information
> about netdev states that ovs-vswitchd is
> interested in. Hence ignoring these shouldn't
> cause any problems.
> 
> These events can be responsible for a significant
> CPU churn as ovs-vswitchd attempts to do plenty of
> work for each and every netlink message regardless
> of what that message carries. On low-end devices
> such as consumer-grade routers these can lead to a
> lot of CPU cycles being wasted, adding up to heat
> output and reducing performance.
> 
> It could be argued that wireless drivers in
> question should be fixed, but that isn't exactly a
> trivial thing to do. Patching ovs seems far more
> viable while still making sense.
> 
> Signed-off-by: Michal Kazior <michal at plume.com>
> ---
> 
> Notes:
>     v6:
>      - move change->irrelevant init to function start [Ilya]
>     
>     v5:
>      - added checks to avoid null deref of `change` [Ilya]
>      - added missing period at end of comment [Ilya]
>      - moved some checks closer to rtnetlink_parse() [Ilya]
>      - made sure change->irrelevant is always initialized [Ilya]
>     
>     v4:
>      - fixed comment-too-long checkpatch warnin [0day robot]
>     
>     v3:
>      - dont change rtnetlink_parse() semantics, instead
>        extend rtnetlink_change struct and update its
>        consumers [Ilya]
>      - adjusted commit log to reflect different approach
>        [Ilya]
>     
>     v2:
>      - fix bracing style [0day robot / checkpatch]
> 
>  lib/if-notifier.c  |  7 ++++++-
>  lib/netdev-linux.c |  3 ++-
>  lib/route-table.c  |  4 ++++
>  lib/rtnetlink.c    | 20 ++++++++++++++++++++
>  lib/rtnetlink.h    |  3 +++
>  5 files changed, 35 insertions(+), 2 deletions(-)

Thanks!  Applied to master.

Best regards, Ilya Maximets.


More information about the dev mailing list