All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@nvidia.com>
To: Felix Fietkau <nbd@nbd.name>, <netdev@vger.kernel.org>
Subject: Re: [RFC 1/2] net: bridge: add knob for filtering rx/tx BPDU packets on a port
Date: Fri, 11 Feb 2022 10:16:30 +0200	[thread overview]
Message-ID: <50f74e7b-1b20-bf02-f5a8-b1667b834190@nvidia.com> (raw)
In-Reply-To: <8feee888-491a-9324-6437-07f33d0d5584@nbd.name>

(resending, for some reason my first email didn't make it to the mailing list)

On 10/02/2022 18:06, Felix Fietkau wrote:
> 
> On 10.02.22 15:55, Nikolay Aleksandrov wrote:
>> On 10/02/2022 16:24, Felix Fietkau wrote:
>>> Some devices (e.g. wireless APs) can't have devices behind them be part of
>>> a bridge topology with redundant links, due to address limitations.
>>> Additionally, broadcast traffic on these devices is somewhat expensive, due to
>>> the low data rate and wakeups of clients in powersave mode.
>>> This knob can be used to ensure that BPDU packets are never sent or forwarded
>>> to/from these devices
>>>
>>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>>> ---
>>>  include/linux/if_bridge.h    | 1 +
>>>  include/uapi/linux/if_link.h | 1 +
>>>  net/bridge/br_forward.c      | 5 +++++
>>>  net/bridge/br_input.c        | 2 ++
>>>  net/bridge/br_netlink.c      | 6 +++++-
>>>  net/bridge/br_stp_bpdu.c     | 9 +++++++--
>>>  net/core/rtnetlink.c         | 4 +++-
>>>  7 files changed, 24 insertions(+), 4 deletions(-)
>>>
>>
>> Why can't netfilter or tc be used to filter these frames?
> netfilter is slow as hell, and even adding a tc rule that has to look at all frames to check for useless BPDU packets costs a lot more CPU cycles than simply suppressing them at the source.
> 
> - Felix

You can use XDP, should be much faster. I don't want new tests in the fast path
for something that is already solved and doesn't need anything bridge-specific.
 
Tomorrow someone will try the same with some other packet type,
sorry but absolutely unacceptable.

Cheers,
 Nik


  reply	other threads:[~2022-02-11  8:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 14:24 [RFC 1/2] net: bridge: add knob for filtering rx/tx BPDU packets on a port Felix Fietkau
2022-02-10 14:24 ` [RFC 2/2] net: bridge: add a software fast-path implementation Felix Fietkau
2022-02-10 15:02   ` Nikolay Aleksandrov
2022-02-10 16:53     ` Felix Fietkau
2022-02-11  8:50       ` Nikolay Aleksandrov
2022-03-28 15:15         ` Felix Fietkau
2022-03-28 18:20           ` Nikolay Aleksandrov
2022-03-29 11:07             ` Felix Fietkau
2022-02-10 14:55 ` [RFC 1/2] net: bridge: add knob for filtering rx/tx BPDU packets on a port Nikolay Aleksandrov
2022-02-10 16:06   ` Felix Fietkau
2022-02-11  8:16     ` Nikolay Aleksandrov [this message]
2022-02-11 17:01   ` Stephen Hemminger

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=50f74e7b-1b20-bf02-f5a8-b1667b834190@nvidia.com \
    --to=nikolay@nvidia.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    /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.