DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavel Belous <Pavel.Belous@aquantia.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Igor Russkikh <Igor.Russkikh@aquantia.com>,
	 Corey Melton <comelton@cisco.com>,
	Pavel Belous <Pavel.Belous@aquantia.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH v2 2/3] net/atlantic: fix reported flow control mode
Date: Fri, 20 Sep 2019 16:22:05 +0000	[thread overview]
Message-ID: <fd2019e9885f6aaf1c824f8b93db6e48573bcd24.1568994395.git.Pavel.Belous@aquantia.com> (raw)
In-Reply-To: <cover.1568994395.git.Pavel.Belous@aquantia.com>

From: Pavel Belous <Pavel.Belous@aquantia.com>

Driver reports current flow control mode based on internal flow control
settings. Currently this logic works incorrectly.

Fixes: 921eb6b8ce31 ("net/atlantic: fix flow control by sync settings on Rx")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <Pavel.Belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/atl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 178f7db..1b9d514 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1535,11 +1535,11 @@ atl_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 
 	if (fc == AQ_NIC_FC_OFF)
 		fc_conf->mode = RTE_FC_NONE;
-	else if (fc & (AQ_NIC_FC_RX | AQ_NIC_FC_TX))
+	else if ((fc & AQ_NIC_FC_RX) && (fc & AQ_NIC_FC_TX))
 		fc_conf->mode = RTE_FC_FULL;
 	else if (fc & AQ_NIC_FC_RX)
 		fc_conf->mode = RTE_FC_RX_PAUSE;
-	else if (fc & AQ_NIC_FC_RX)
+	else if (fc & AQ_NIC_FC_TX)
 		fc_conf->mode = RTE_FC_TX_PAUSE;
 
 	return 0;
-- 
2.7.4


  parent reply	other threads:[~2019-09-20 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 16:21 [dpdk-dev] [PATCH v2 0/3] net/atlantic: Atlantic PMD updates Pavel Belous
2019-09-20 16:22 ` [dpdk-dev] [PATCH v2 1/3] net/atlantic: exclude MACSEC counters from xstats Pavel Belous
2019-09-20 16:22 ` Pavel Belous [this message]
2019-09-20 16:22 ` [dpdk-dev] [PATCH v2 3/3] net/atlantic: add FW mailbox guard mutex Pavel Belous
2019-10-07 12:42 ` [dpdk-dev] [PATCH v2 0/3] net/atlantic: Atlantic PMD updates Ferruh Yigit

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=fd2019e9885f6aaf1c824f8b93db6e48573bcd24.1568994395.git.Pavel.Belous@aquantia.com \
    --to=pavel.belous@aquantia.com \
    --cc=Igor.Russkikh@aquantia.com \
    --cc=comelton@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@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).