Re: [PATCH iproute2-next v5] iplink: bridge: Add support for bridge FDB learning limits

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

 



On 10/18/23 10:04, Johannes Nixdorf wrote:
Support setting the FDB limit through ip link. The arguments is:
  - fdb_max_learned: A 32-bit unsigned integer specifying the maximum
                     number of learned FDB entries, with 0 disabling
                     the limit.

Also support reading back the current number of learned FDB entries in
the bridge by this count. The returned value's name is:
  - fdb_n_learned: A 32-bit unsigned integer specifying the current number
                   of learned FDB entries.

Example:

  # ip -d -j -p link show br0
[ {
...
         "linkinfo": {
             "info_kind": "bridge",
             "info_data": {
...
                 "fdb_n_learned": 2,
                 "fdb_max_learned": 0,
...
             }
         },
...
     } ]
  # ip link set br0 type bridge fdb_max_learned 1024
  # ip -d -j -p link show br0
[ {
...
         "linkinfo": {
             "info_kind": "bridge",
             "info_data": {
...
                 "fdb_n_learned": 2,
                 "fdb_max_learned": 1024,
...
             }
         },
...
     } ]

Signed-off-by: Johannes Nixdorf <jnixdorf-oss@xxxxxx>
---
The corresponding kernel changes are in net-next.git as commit
ddd1ad68826d ("net: bridge: Add netlink knobs for number / max learned
FDB entries").
---
Changes in v5:
  - Removed the RFC status again, as the kernel changes landed.
  - Link to v4: https://lore.kernel.org/r/20230919-fdb_limit-v4-1-b4d2dc4df30f@xxxxxx

Changes in v4:
  - Removed _entries from the names. (from review)
  - Removed the UAPI change, to be synced from linux separately by the
    maintainer. (from review)
    For local testing e.g. `make CCOPTS="-O2 -pipe
    -I${path_to_dev_kernel_headers}"` works as a workaround.
  - Downgraded to an RFC until the kernel changes land.
  - Link to v3: https://lore.kernel.org/netdev/20230905-fdb_limit-v3-1-34bb124556d8@xxxxxx/

Changes in v3:
  - Properly split the net-next and iproute2-next threads. (from review)
  - Changed to *_n_* instead of *_cur_*. (from review)
  - Use strcmp() instead of matches(). (from review)
  - Made names in code and documentation consistent. (from review)
  - Various documentation fixes. (from review)
  - Link to v2: https://lore.kernel.org/netdev/20230619071444.14625-1-jnixdorf-oss@xxxxxx/

Changes in v2:
  - Sent out the first corresponding iproute2 patches.
  - Link to v1: https://lore.kernel.org/netdev/20230515085046.4457-1-jnixdorf-oss@xxxxxx/
---
  ip/iplink_bridge.c    | 21 +++++++++++++++++++++
  man/man8/ip-link.8.in | 10 ++++++++++
  2 files changed, 31 insertions(+)


Acked-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>





[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