[dpdk-dev] Flow control rx/tx mismatch?

Konieczny, TomaszX tomaszx.konieczny at intel.com
Mon Sep 9 11:54:16 CEST 2019


Hi,

According to DPDK documentation: 

"RX pause frame, enable flowctrl on TX side." 
"TX pause frame, enable flowctrl on RX side". 

While in testpmd (/app/test-pmd/cmdline.c):
/*
 * Rx on/off, flow control is enabled/disabled on RX side. This can indicate
 * the RTE_FC_TX_PAUSE, Transmit pause frame at the Rx side.
 * Tx on/off, flow control is enabled/disabled on TX side. This can indicate
 * the RTE_FC_RX_PAUSE, Respond to the pause frame at the Tx side.
 */
	
However the code looks like this:
static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] = {
	{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];

and

if ((fc_conf.mode == RTE_FC_RX_PAUSE) ||
	    (fc_conf.mode == RTE_FC_FULL))
		rx_fc_en = 1;
if ((fc_conf.mode == RTE_FC_TX_PAUSE) ||
	    (fc_conf.mode == RTE_FC_FULL))
		tx_fc_en = 1;

what suggest that rx_fc_en means RX_PAUSE not TX_PAUSE .

My personal tests also show, that RTE_FC_TX_PAUSE enables fc on transmission (responds to pause frame).
What is the actual desired action? Should rx_fc_en set RTE_FC_RX_PAUSE or RTE_FC_TX_PAUSE? In the first case, don't you think that the documentation entries are misleading? In later case, does DPDK work correctly and in line with documentation?

Regards
Tomasz Konieczny
---------------------------------------------------------------------
Intel Corporation (UK) Ltd.
Co. Reg. #1134945
Pipers Way, Swindon SN3 1RJ



More information about the dev mailing list