patches for DPDK stable branches
 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-stable] [PATCH 2/3] net/atlantic: fix reported flow control mode
Date: Thu, 5 Sep 2019 17:41:47 +0000	[thread overview]
Message-ID: <1567705278-10558-3-git-send-email-Pavel.Belous@aquantia.com> (raw)
In-Reply-To: <1567705278-10558-1-git-send-email-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-05 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1567705278-10558-1-git-send-email-Pavel.Belous@aquantia.com>
2019-09-05 17:41 ` [dpdk-stable] [PATCH 1/3] net/atlantic: exclude MACSEC counters from xstats Pavel Belous
2019-09-05 17:41 ` Pavel Belous [this message]
     [not found] <1567704331-10061-1-git-send-email-Pavel.Belous@aquantia.com>
2019-09-05 17:25 ` [dpdk-stable] [PATCH 2/3] net/atlantic: fix reported flow control mode Pavel Belous

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=1567705278-10558-3-git-send-email-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).