Bug 1138 - net/i40e all packets dropped after rte_eth_dev_flow_ctrl_set
Summary: net/i40e all packets dropped after rte_eth_dev_flow_ctrl_set
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: 21.11
Hardware: All Linux
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2022-12-01 03:30 CET by Han Shuang
Modified: 2023-11-03 08:14 CET (History)
4 users (show)



Attachments

Description Han Shuang 2022-12-01 03:30:47 CET
My program call rte_eth_dev_flow_ctrl_set after rte_eth_dev_start. I found that x710 dropped all packets(rx_dropped_packets in xstats).
I have used testpmd to confirm the problem:

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index da29858..eb11789 100755
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2928,6 +2928,16 @@ struct extmem_param {
 			continue;
 		}
 
+		{
+			struct rte_eth_fc_conf fc_conf = {
+				.autoneg = 0,
+				.mode = RTE_FC_NONE,
+			};
+
+			if (!rte_eth_dev_flow_ctrl_set(pi, &fc_conf))
+				printf("set port %d flow ctrl\n", pi);
+		}
+
 		if (port->port_status == RTE_PORT_HANDLING)
 			port->port_status = RTE_PORT_STARTED;
 		else

If I stop and start the port again, packet will be received as good.
Comment 1 dengkaiwen 2023-11-03 08:14:49 CET
please offer the reproduce steps with standard DPDK API like testpmd, l3fwd and other examples.

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