DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Konieczny, TomaszX" <tomaszx.konieczny@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] Flow control rx/tx mismatch?
Date: Mon, 9 Sep 2019 09:54:16 +0000	[thread overview]
Message-ID: <08D1104B74A4E2498083321F42D5B4C9172E275E@hasmsx107.ger.corp.intel.com> (raw)

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


                 reply	other threads:[~2019-09-09  9:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08D1104B74A4E2498083321F42D5B4C9172E275E@hasmsx107.ger.corp.intel.com \
    --to=tomaszx.konieczny@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).