Re: [PATCH net-next] net: bridge: fdb: eliminate extra port state tests from fast-path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nikolay Aleksandrov <nikolay@xxxxxxxxxxxxxxxxxxx>
Date: Mon,  4 Nov 2019 11:36:51 +0200

> When commit df1c0b8468b3 ("[BRIDGE]: Packets leaking out of
> disabled/blocked ports.") introduced the port state tests in
> br_fdb_update() it was to avoid learning/refreshing from STP BPDUs, it was
> also used to avoid learning/refreshing from user-space with NTF_USE. Those
> two tests are done for every packet entering the bridge if it's learning,
> but for the fast-path we already have them checked in br_handle_frame() and
> is unnecessary to do it again. Thus push the checks to the unlikely cases
> and drop them from br_fdb_update(), the new nbp_state_should_learn() helper
> is used to determine if the port state allows br_fdb_update() to be called.
> The two places which need to do it manually are:
>  - user-space add call with NTF_USE set
>  - link-local packet learning done in __br_handle_local_finish()
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@xxxxxxxxxxxxxxxxxxx>

Applied, thank you.



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux