bonding: add support for numa-only in lacp mode
[vpp.git] / src / vnet / bonding / device.c
index b76396a..c9e8b4a 100644 (file)
@@ -699,6 +699,11 @@ VNET_DEVICE_CLASS_TX_FN (bond_dev_class) (vlib_main_t * vm,
       goto done;
     }
 
+  /* if have at least one slave on local numa node, only slaves on local numa
+     node will transmit pkts when bif->local_numa_only is enabled */
+  if (bif->n_numa_slaves >= 1)
+    n_slaves = bif->n_numa_slaves;
+
   if (bif->lb == BOND_LB_L2)
     bond_tx_inline (vm, bif, bufs, hashes, n_left, n_slaves, BOND_LB_L2);
   else if (bif->lb == BOND_LB_L34)