From: Tushar Mulkar <tmulkar@sandvine.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "beilei.xing@intel.com" <beilei.xing@intel.com>,
"qi.z.zhang@intel.com" <qi.z.zhang@intel.com>,
Tushar Mulkar <tmulkar@sandvine.com>
Subject: [dpdk-dev] [PATCH] net/i40e: fix link_state update for i40e_ethdev_vf drv
Date: Wed, 17 Jan 2018 08:53:07 +0000 [thread overview]
Message-ID: <B100BEBE3931D74C91B0DFE67C1055F9035BC999@blr-exchp-2.sandvine.com> (raw)
In-Reply-To: <20180115145739.122013-1-tmulkar@sandvine.com>
The check for bool was accounting unwanted bits in the calulation of truth value
Signed-off-by: Tushar Mulkar <tmulkar@sandvine.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index b96d77a0c..9c14ea278 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2095,7 +2095,7 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,
}
/* full duplex only */
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
- new_link.link_status = vf->link_up ? ETH_LINK_UP :
+ new_link.link_status = (vf->link_up & true) ? ETH_LINK_UP :
ETH_LINK_DOWN;
new_link.link_autoneg =
dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED;
--
2.11.0
next parent reply other threads:[~2018-01-17 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180115145739.122013-1-tmulkar@sandvine.com>
2018-01-17 8:53 ` Tushar Mulkar [this message]
2018-01-17 15:03 ` 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=B100BEBE3931D74C91B0DFE67C1055F9035BC999@blr-exchp-2.sandvine.com \
--to=tmulkar@sandvine.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@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).