From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Jingjing Wu <jingjing.wu@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/avf: fix link autoneg value
Date: Fri, 9 Mar 2018 17:56:31 +0000 [thread overview]
Message-ID: <20180309175631.242976-1-ferruh.yigit@intel.com> (raw)
Intention of the logic is:
If ETH_LINK_SPEED_FIXED is set in dev_conf, set link_autoneg to
ETH_LINK_FIXED, else set it to ETH_LINK_AUTONEG
ETH_LINK_SPEED_FIXED value is 1, and ETH_LINK_FIXED is 0;
Current logic is broken, fix it according above values.
Fixes: 48de41ca11f0 ("net/avf: enable link status update")
Cc: jingjing.wu@intel.com
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/avf/avf_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index 4df661705..4442c3cd8 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -608,7 +608,7 @@ avf_dev_link_update(struct rte_eth_dev *dev,
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
new_link.link_status = vf->link_up ? ETH_LINK_UP :
ETH_LINK_DOWN;
- new_link.link_autoneg = !!(dev->data->dev_conf.link_speeds &
+ new_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
ETH_LINK_SPEED_FIXED);
if (rte_atomic64_cmpset((uint64_t *)&dev->data->dev_link,
--
2.13.6
next reply other threads:[~2018-03-09 17:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 17:56 Ferruh Yigit [this message]
2018-03-28 6:42 ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
2018-03-28 13:25 ` Ferruh Yigit
2018-03-29 5:51 ` Zhang, Helin
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=20180309175631.242976-1-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
--cc=wenzhuo.lu@intel.com \
/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).