patches for DPDK stable branches
 help / color / Atom feed
From: Pavel Belous <Pavel.Belous@aquantia.com>
To: Pavel Belous <Pavel.Belous@aquantia.com>
Cc: Pavel Belous <Pavel.Belous@aquantia.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Igor Russkikh <Igor.Russkikh@aquantia.com>
Subject: [dpdk-stable] [PATCH 2/3] net/atlantic: fix reported flow control mode
Date: Thu, 5 Sep 2019 17:25:59 +0000
Message-ID: <1567704331-10061-3-git-send-email-Pavel.Belous@aquantia.com> (raw)
In-Reply-To: <1567704331-10061-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 index

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

Reply instructions:

You may reply publically 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=1567704331-10061-3-git-send-email-Pavel.Belous@aquantia.com \
    --to=pavel.belous@aquantia.com \
    --cc=Igor.Russkikh@aquantia.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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/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 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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