diff mbox series

[PATCHv3,net-next,04/10] docs: bridge: Add kAPI/uAPI fields

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

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/codegen success Generated files up to date
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1122 this patch: 1122
netdev/cc_maintainers warning 3 maintainers not CCed: linux-doc@vger.kernel.org bridge@lists.linux.dev corbet@lwn.net
netdev/build_clang success Errors and warnings before: 1143 this patch: 1143
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1149 this patch: 1149
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 46 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 3 this patch: 1
netdev/source_inline success Was 0 now: 0

Commit Message

Hangbin Liu Nov. 28, 2023, 8:49 a.m. UTC
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(+)

Comments

Stephen Hemminger Nov. 28, 2023, 10:47 p.m. UTC | #1
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.
Florian Fainelli Nov. 29, 2023, 4:11 a.m. UTC | #2
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 mbox series

Patch

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