DPDK patches and discussions
 help / color / 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


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] = {
fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];


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?

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, back to index

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

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
	public-inbox-index dev

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/ public-inbox