bonding: activate also on port-rx-eth arc 28/42828/18
authorVratko Polak <[email protected]>
Fri, 2 May 2025 15:04:58 +0000 (17:04 +0200)
committerDamjan Marion <[email protected]>
Wed, 7 May 2025 13:35:36 +0000 (13:35 +0000)
CSIT tests bonding with AVF, but no longer with plugins/avf.
And plugins/dev_iavf is sensitive only to port-rx-eth arc,
not to device-input arc.

Not sure changing bonding is the correct fix,
but it is easier than making vnet/dev work on device-input arc.

- The indentation is a compromise with "make fixstyle".

Ticket: vpp-3602
Type: fix

Change-Id: I9744d9560661cae208a273155aee7e1b3decdd15
Signed-off-by: Vratko Polak <[email protected]>
src/vnet/bonding/cli.c
src/vnet/bonding/node.c

index 33a313b..60c8541 100644 (file)
@@ -308,6 +308,9 @@ bond_delete_neighbor (vlib_main_t * vm, bond_if_t * bif, member_if_t * mif)
   vnet_feature_enable_disable ("device-input", "bond-input",
                               mif->sw_if_index, 0, 0, 0);
 
+  vnet_feature_enable_disable ("port-rx-eth", "bond-input", mif->sw_if_index,
+                              0, 0, 0);
+
   /* Put back the old mac */
   vnet_hw_interface_change_mac_address (vnm, mif_hw->hw_if_index,
                                        mif->persistent_hw_address);
@@ -762,13 +765,20 @@ bond_add_member (vlib_main_t * vm, bond_add_member_args_t * args)
 
   args->rv = vnet_feature_enable_disable ("device-input", "bond-input",
                                          mif->sw_if_index, 1, 0, 0);
+  if (args->rv)
+  {
+    args->error = clib_error_return (
+      0, "Error encountered on device input feature arc enable");
+  }
+
+  args->rv = vnet_feature_enable_disable ("port-rx-eth", "bond-input",
+                                         mif->sw_if_index, 1, 0, 0);
 
   if (args->rv)
-    {
-      args->error =
-       clib_error_return (0,
-                          "Error encountered on input feature arc enable");
-    }
+  {
+    args->error =
+      clib_error_return (0, "Error encountered on port rx feature arc enable");
+  }
 }
 
 static clib_error_t *
index 347aa56..821535d 100644 (file)
@@ -414,13 +414,18 @@ VLIB_REGISTER_NODE (bond_input_node) = {
 
 VLIB_INIT_FUNCTION (bond_input_init);
 
-VNET_FEATURE_INIT (bond_input, static) =
-{
+VNET_FEATURE_INIT (bond_input_device, static) = {
   .arc_name = "device-input",
   .node_name = "bond-input",
   .runs_before = VNET_FEATURES ("ethernet-input"),
 };
 
+VNET_FEATURE_INIT (bond_input_rx, static) = {
+  .arc_name = "port-rx-eth",
+  .node_name = "bond-input",
+  .runs_before = VNET_FEATURES ("ethernet-input"),
+};
+
 static clib_error_t *
 bond_sw_interface_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags)
 {