]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bridge: uapi: Add neigh_forward_grat netlink attributes
authorDanielle Ratson <danieller@nvidia.com>
Mon, 11 May 2026 06:59:31 +0000 (09:59 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 May 2026 10:42:11 +0000 (12:42 +0200)
Add netlink attributes for controlling gratuitous ARP and unsolicited NA
forwarding when neighbor suppression is enabled.

Add IFLA_BRPORT_NEIGH_FORWARD_GRAT for port-level control and
BRIDGE_VLANDB_ENTRY_NEIGH_FORWARD_GRAT for per-VLAN control.

The new attributes provide independent control of gratuitous ARP and
unsolicited NA packets. Operators can enable forwarding for those packets
for fast mobility across VTEPs while keeping general neighbor suppression
active.

Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Link: https://patch.msgid.link/20260511065936.4173106-2-danieller@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Documentation/netlink/specs/rt-link.yaml
include/uapi/linux/if_bridge.h
include/uapi/linux/if_link.h
net/core/rtnetlink.c

index f23aa5f229c50006d466ea779484af559cc994ad..79c89f20441527fdfa9f11fdfb5644fee0740640 100644 (file)
@@ -1700,6 +1700,9 @@ attribute-sets:
       -
         name: backup-nhid
         type: u32
+      -
+        name: neigh-forward-grat
+        type: u8
   -
     name: linkinfo-gre-attrs
     name-prefix: ifla-gre-
index e52f8207ab278d82b62c856f26b2b0b7bc60df65..21a700c02ef7670916e26ac029699bd3f819f575 100644 (file)
@@ -526,6 +526,7 @@ enum {
        BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS,
        BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS,
        BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS,
+       BRIDGE_VLANDB_ENTRY_NEIGH_FORWARD_GRAT,
        __BRIDGE_VLANDB_ENTRY_MAX,
 };
 #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
index 79ce4bc24cba6b01a94074e1b5052f30e4c06d3c..46413392b402cba3d970eec56adb25250e3a9e17 100644 (file)
@@ -1085,6 +1085,22 @@ enum {
  *   Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS*
  *   is enabled for a given port.
  *
+ * @IFLA_BRPORT_NEIGH_FORWARD_GRAT
+ *   Controls whether gratuitous ARP packets and unsolicited Neighbor
+ *   Advertisement packets are forwarded on a given port even when neighbor
+ *   suppression is enabled.
+ *   By default this flag is off, meaning gratuitous ARP and unsolicited NA
+ *   packets will be suppressed when neighbor suppression is enabled.
+ *   Setting this flag to on allows these packets to be forwarded even
+ *   when *IFLA_BRPORT_NEIGH_SUPPRESS* or *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS*
+ *   is enabled.
+ *
+ *   Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS*
+ *   or *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS* is enabled for a given port.
+ *   When *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS* is set, this port-level flag is
+ *   ignored and per-VLAN control is available via
+ *   *BRIDGE_VLANDB_ENTRY_NEIGH_FORWARD_GRAT*.
+ *
  * @IFLA_BRPORT_BACKUP_NHID
  *   The FDB nexthop object ID to attach to packets being redirected to a
  *   backup port that has VLAN tunnel mapping enabled (via the
@@ -1137,6 +1153,7 @@ enum {
        IFLA_BRPORT_MCAST_MAX_GROUPS,
        IFLA_BRPORT_NEIGH_VLAN_SUPPRESS,
        IFLA_BRPORT_BACKUP_NHID,
+       IFLA_BRPORT_NEIGH_FORWARD_GRAT,
        __IFLA_BRPORT_MAX
 };
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
index 70fde922b3718d753caf4874047d0b55ec649ef2..6a5e9ace55a0880d7b1e4303d12dc0a8b8b7c5ed 100644 (file)
@@ -63,7 +63,7 @@
 #include "dev.h"
 
 #define RTNL_MAX_TYPE          50
-#define RTNL_SLAVE_MAX_TYPE    44
+#define RTNL_SLAVE_MAX_TYPE    45
 
 struct rtnl_link {
        rtnl_doit_func          doit;