Skip to content

Commit

Permalink
patch: add dpdk 20.11.1 bonding mode 4 patch for mlx5
Browse files Browse the repository at this point in the history
Signed-off-by: ywc689 <[email protected]>
  • Loading branch information
ywc689 committed Jun 24, 2021
1 parent 82f66c5 commit 5e23cc9
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From fc25cda5bab943feac5455779fb6a6f00ee2a87d Mon Sep 17 00:00:00 2001
From: wencyu <[email protected]>
Date: Thu, 17 Jun 2021 20:39:55 +0800
Subject: [PATCH 1/4] kni: use netlink event for multicast (driver part)
Subject: [PATCH 1/5] kni: use netlink event for multicast (driver part)

Kni driver sends netlink event every time hw-multicast list updated by
kernel, the user kni app should capture the event and update multicast
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6a99af8a3f9067a18211d15b4a65bcafa9430875 Mon Sep 17 00:00:00 2001
From: wencyu <[email protected]>
Date: Fri, 18 Jun 2021 10:20:45 +0800
Subject: [PATCH 2/4] pdump: change dpdk-pdump tool for dpvs
Subject: [PATCH 2/5] pdump: change dpdk-pdump tool for dpvs

Signed-off-by: wencyu <[email protected]>
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 906f4690d1f3cadca260b23fd1c839d12db9e629 Mon Sep 17 00:00:00 2001
From: wencyu <[email protected]>
Date: Fri, 18 Jun 2021 11:43:07 +0800
Subject: [PATCH 3/4] [for debug only] enable dpdk eal memory debug
Subject: [PATCH 3/5] [for debug only] enable dpdk eal memory debug

The patch is used for memory debug. To use the patch, configure meson with option
-Dc_args="-DRTE_MALLOC_DEBUG" when building dpdk. For example,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 83ba9cf5e6eb111f8becc1e9c05301fabb40e16b Mon Sep 17 00:00:00 2001
From: wencyu <[email protected]>
Date: Fri, 18 Jun 2021 14:00:24 +0800
Subject: [PATCH 4/4] ixgbe_flow: patch ixgbe fdir rte_flow for dpvs
Subject: [PATCH 4/5] ixgbe_flow: patch ixgbe fdir rte_flow for dpvs

1. Ignore fdir flow rule priority attribute.
2. Use different fdir soft-id for flow rules configured for the same queue.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
From b83dc422e4de55dbaa2f1376d56254d8fa00dbea Mon Sep 17 00:00:00 2001
From: wencyu <[email protected]>
Date: Thu, 24 Jun 2021 17:24:51 +0800
Subject: [PATCH 5/5] Fix bonding mode 4 problem caused by LACP failure.

The problem is disscussed in Issue #725 of iqiyi/dpvs in detail.
https://github.com/iqiyi/dpvs/issues/725

Signed-off-by: wencyu <[email protected]>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 5fe004e..52bd960 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -831,7 +831,6 @@
struct port *port;
struct rte_eth_link link_info;
struct rte_ether_addr slave_addr;
- struct rte_mbuf *lacp_pkt = NULL;
uint16_t slave_id;
uint16_t i;

@@ -903,6 +902,7 @@
/* Find LACP packet to this port. Do not check subtype,
* it is done in function that queued packet
*/
+ struct rte_mbuf *lacp_pkt = NULL;
int retval = rte_ring_dequeue(port->rx_ring,
(void **)&lacp_pkt);

@@ -911,15 +911,17 @@

rx_machine_update(internals, slave_id, lacp_pkt);
} else {
- uint16_t rx_count = rte_eth_rx_burst(slave_id,
- internals->mode4.dedicated_queues.rx_qid,
- &lacp_pkt, 1);
-
- if (rx_count == 1)
- bond_mode_8023ad_handle_slow_pkt(internals,
- slave_id, lacp_pkt);
- else
+ uint16_t rx_count, j;
+ struct rte_mbuf *lacp_pkt[16] = { NULL };
+
+ rx_count = rte_eth_rx_burst(slave_id, internals->mode4.dedicated_queues.rx_qid,
+ &lacp_pkt[0], sizeof(lacp_pkt)/sizeof(struct rte_mbuf *));
+ if (rx_count > 0) {
+ for (j = 0; j < rx_count; j++)
+ bond_mode_8023ad_handle_slow_pkt(internals, slave_id, lacp_pkt[j]);
+ } else {
rx_machine_update(internals, slave_id, NULL);
+ }
}

periodic_machine(internals, slave_id);
--
1.8.3.1

0 comments on commit 5e23cc9

Please sign in to comment.