Message ID | 20231128084943.637091-5-liuhangbin@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Doc: update bridge doc | expand |
On Tue, 28 Nov 2023 16:49:37 +0800 Hangbin Liu <liuhangbin@gmail.com> wrote: > > +Bridge kAPI > +=========== > + > +Here are some core structures of bridge code. > + > +.. kernel-doc:: net/bridge/br_private.h > + :identifiers: net_bridge_vlan Add a reminder that kAPI is unstable, and can be changed at any time.
On 11/28/2023 12:49 AM, Hangbin Liu wrote: > Add kAPI/uAPI field for bridge doc. Update struct net_bridge_vlan > comments to fix doc build warning. > > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> > --- > Documentation/networking/bridge.rst | 26 ++++++++++++++++++++++++++ > net/bridge/br_private.h | 2 ++ > 2 files changed, 28 insertions(+) > > diff --git a/Documentation/networking/bridge.rst b/Documentation/networking/bridge.rst > index de112e92a305..5d6d3c0c15c1 100644 > --- a/Documentation/networking/bridge.rst > +++ b/Documentation/networking/bridge.rst > @@ -12,6 +12,32 @@ independent way. Packets are forwarded based on Layer 2 destination Ethernet > address, rather than IP address (like a router). Since forwarding is done > at Layer 2, all Layer 3 protocols can pass through a bridge transparently. > > +Bridge kAPI > +=========== > + > +Here are some core structures of bridge code. > + > +.. kernel-doc:: net/bridge/br_private.h > + :identifiers: net_bridge_vlan > + > +Bridge uAPI > +=========== > + > +Modern Linux bridge uAPI is accessed via Netlink interface. You can find > +below files where the bridge and bridge port netlink attributes are defined. You dropped the sysfs documentation upon Nikolay's request which is fine, maybe a note here that sysfs is deprecated and only provided for backward compatibility. Looks good otherwise: Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff --git a/Documentation/networking/bridge.rst b/Documentation/networking/bridge.rst index de112e92a305..5d6d3c0c15c1 100644 --- a/Documentation/networking/bridge.rst +++ b/Documentation/networking/bridge.rst @@ -12,6 +12,32 @@ independent way. Packets are forwarded based on Layer 2 destination Ethernet address, rather than IP address (like a router). Since forwarding is done at Layer 2, all Layer 3 protocols can pass through a bridge transparently. +Bridge kAPI +=========== + +Here are some core structures of bridge code. + +.. kernel-doc:: net/bridge/br_private.h + :identifiers: net_bridge_vlan + +Bridge uAPI +=========== + +Modern Linux bridge uAPI is accessed via Netlink interface. You can find +below files where the bridge and bridge port netlink attributes are defined. + +Bridge netlink attributes +------------------------- + +.. kernel-doc:: include/uapi/linux/if_link.h + :doc: Bridge enum definition + +Bridge port netlink attributes +------------------------------ + +.. kernel-doc:: include/uapi/linux/if_link.h + :doc: Bridge port enum definition + FAQ === diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 6b7f36769d03..051ea81864ac 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -186,6 +186,7 @@ enum { * struct net_bridge_vlan - per-vlan entry * * @vnode: rhashtable member + * @tnode: rhashtable member * @vid: VLAN id * @flags: bridge vlan flags * @priv_flags: private (in-kernel) bridge vlan flags @@ -196,6 +197,7 @@ enum { * @refcnt: if MASTER flag set, this is bumped for each port referencing it * @brvlan: if MASTER flag unset, this points to the global per-VLAN context * for this VLAN entry + * @tinfo: bridge tunnel info * @br_mcast_ctx: if MASTER flag set, this is the global vlan multicast context * @port_mcast_ctx: if MASTER flag unset, this is the per-port/vlan multicast * context
Add kAPI/uAPI field for bridge doc. Update struct net_bridge_vlan comments to fix doc build warning. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> --- Documentation/networking/bridge.rst | 26 ++++++++++++++++++++++++++ net/bridge/br_private.h | 2 ++ 2 files changed, 28 insertions(+)