Bug 343 - Couldn't receive LACP PDU when enable dedicated queue
Summary: Couldn't receive LACP PDU when enable dedicated queue
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: 17.11
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Chas Williams
URL:
Depends on:
Blocks:
 
Reported: 2019-09-04 14:29 CEST by chen tom
Modified: 2023-03-29 04:39 CEST (History)
3 users (show)



Attachments

Description chen tom 2019-09-04 14:29:53 CEST
Run bond with mode4:
if disable dedicated queue, bond can be setup by LACP proto negotiation.
if enable dedicated queue, LACP PDU can't be received and handle, so bond can not be setup successfully.
Comment 1 chen tom 2019-09-04 14:43:14 CEST
I have tracking the ixgbe pmd code, the function _recv_raw_pkts_vec in the ixgbe_rxtx_vec_sse.c, before read mbuf from queue,  use RTE_ALIGN_FLOOR to change the nb_pkts, that will align it with 4.

but when LACP dedicated queue enabled, it will receive mbuf with one packet per time, so it will be align to ZERo, and make it do nothing in _recv_raw_pkts_vec.

that's why LACP PDU is not received.

Changes I made:

-	struct rte_mbuf *lacp_pkt = NULL;
+	struct rte_mbuf *lacp_pkt[32] = { NULL };
  
 	uint8_t i, slave_id;
  
@@ -891,20 +891,24 @@ bond_mode_8023ad_periodic_cb(void *arg)
 			 * it is done in function that queued packet
 			 */
 			int retval = rte_ring_dequeue(port->rx_ring,
-					(void **)&lacp_pkt);
+					(void **)&lacp_pkt[0]);
  
 			if (retval != 0)
-				lacp_pkt = NULL;
+				lacp_pkt[0] = NULL;
  
-			rx_machine_update(internals, slave_id, lacp_pkt);
+			rx_machine_update(internals, slave_id, lacp_pkt[0]);
 		} 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);
+					&lacp_pkt[0], 32);
+
+			if (rx_count == 1) {
+				uint16_t j = 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);
 		}
Comment 2 Ajit Khaparde 2019-09-04 20:47:56 CEST
Can you please take a look? Thanks
Comment 3 zhujunhao 2023-03-29 04:39:21 CEST
Hi,Is this bug handled by anyone? I encountered the same problem. This patch is also effective. Why has no reply for a long time? Is there any other reason?

Note You need to log in before you can comment on or make changes to this bug.