summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorPavel Belous <pavel.belous@aquantia.com>2019-09-20 16:22:05 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-08 12:14:31 +0200
commitc1339892ddfe74703fff1c2c126c68d9e7e17464 (patch)
tree16652a8886c0b57427c2635810f4c7a248020d18 /drivers/net
parent9f3318d1d60d0d1db155e1d1d4e2740d83458aa4 (diff)
downloaddpdk-c1339892ddfe74703fff1c2c126c68d9e7e17464.zip
dpdk-c1339892ddfe74703fff1c2c126c68d9e7e17464.tar.gz
dpdk-c1339892ddfe74703fff1c2c126c68d9e7e17464.tar.xz
net/atlantic: fix reported flow control mode
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/atlantic/atl_ethdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 8dafaba..d5c2ec5 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1544,11 +1544,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;