summaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding/node.h
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-09-27 20:06:26 -0700
committerDamjan Marion <dmarion@me.com>2018-09-28 19:39:50 +0000
commitc4e99c5d6f19cf7c026b021266e309f29de1ac7f (patch)
tree760eb9f8c6cd365521edac14b731635063562ad5 /src/vnet/bonding/node.h
parent9be93c8f85d752930566a1d37e9f4841ca78861f (diff)
bond: tx performance enhancement part deux
- Reduce per packet cost by buffering the output packet buffer indexes in the queue and process the queue outside the packet processing loop. - Move unnecessary variable initialization outside of the while loop. - There is no need to save the old interface if tracing is not enabled. Test result for 256 bytes packet comparison. Other packet size shows similar improvement. With the patch -------------- BondEthernet0-output active 52836 13526016 0 1.71e1 256.00 BondEthernet0-tx active 52836 13526016 0 2.68e1 256.00 TenGigabitEthernet6/0/0-output active 52836 6762896 0 9.17e0 127.99 TenGigabitEthernet6/0/0-tx active 52836 6762896 0 6.97e1 127.99 TenGigabitEthernet6/0/1-output active 52836 6763120 0 9.40e0 128.00 TenGigabitEthernet6/0/1-tx active 52836 6763120 0 7.00e1 128.00 bond-input active 52836 13526016 0 1.76e1 256.00 Without the patch ----------------- BondEthernet0-output active 60858 15579648 0 1.73e1 256.00 BondEthernet0-tx active 60858 15579648 0 2.94e1 256.00 TenGigabitEthernet6/0/0-output active 60858 7789626 0 9.29e0 127.99 TenGigabitEthernet6/0/0-tx active 60858 7789626 0 7.01e1 127.99 TenGigabitEthernet6/0/1-output active 60858 7790022 0 9.31e0 128.00 TenGigabitEthernet6/0/1-tx active 60858 7790022 0 7.10e1 128.00 bond-input active 60858 15579648 0 1.77e1 256.00 Change-Id: Ib6d73a63ceeaa2f1397ceaf4c5391c57fd865b04 Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/vnet/bonding/node.h')
-rw-r--r--src/vnet/bonding/node.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/vnet/bonding/node.h b/src/vnet/bonding/node.h
index 104b7b15700..6b13a46a355 100644
--- a/src/vnet/bonding/node.h
+++ b/src/vnet/bonding/node.h
@@ -139,9 +139,15 @@ typedef CLIB_PACKED (struct
typedef struct
{
- vlib_frame_t **frame;
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+ u32 buffers[VLIB_FRAME_SIZE];
+ u32 n_buffers;
+} bond_per_port_queue_t;
-} bond_if_per_thread_t;
+typedef struct
+{
+ bond_per_port_queue_t *per_port_queue;
+} bond_per_thread_data_t;
typedef struct
{
@@ -175,7 +181,6 @@ typedef struct
u8 hw_address[6];
clib_spinlock_t lockp;
- bond_if_per_thread_t *per_thread_info;
} bond_if_t;
typedef struct
@@ -292,7 +297,7 @@ typedef struct
/* pool of bonding interfaces */
bond_if_t *interfaces;
- /* pool of lacp neighbors */
+ /* pool of slave interfaces */
slave_if_t *neighbors;
/* rapidly find a bond by vlib software interface index */
@@ -308,6 +313,8 @@ typedef struct
lacp_enable_disable_func lacp_enable_disable;
uword *slave_by_sw_if_index;
+
+ bond_per_thread_data_t *per_thread_data;
} bond_main_t;
/* bond packet trace capture */