DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Flow control rx/tx mismatch?
@ 2019-09-09  9:54 Konieczny, TomaszX
  0 siblings, 0 replies; only message in thread
From: Konieczny, TomaszX @ 2019-09-09  9:54 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-09  9:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09  9:54 [dpdk-dev] Flow control rx/tx mismatch? Konieczny, TomaszX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).