* [dpdk-dev] [PATCH] net/i40e: fix link_state update for i40e_ethdev_vf drv
[not found] <20180115145739.122013-1-tmulkar@sandvine.com>
@ 2018-01-17 8:53 ` Tushar Mulkar
2018-01-17 15:03 ` Zhang, Helin
0 siblings, 1 reply; 2+ messages in thread
From: Tushar Mulkar @ 2018-01-17 8:53 UTC (permalink / raw)
To: dev; +Cc: beilei.xing, qi.z.zhang, Tushar Mulkar
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix link_state update for i40e_ethdev_vf drv
2018-01-17 8:53 ` [dpdk-dev] [PATCH] net/i40e: fix link_state update for i40e_ethdev_vf drv Tushar Mulkar
@ 2018-01-17 15:03 ` Zhang, Helin
0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Helin @ 2018-01-17 15:03 UTC (permalink / raw)
To: Tushar Mulkar, dev; +Cc: Xing, Beilei, Zhang, Qi Z
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tushar Mulkar
> Sent: Wednesday, January 17, 2018 4:53 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei; Zhang, Qi Z; Tushar Mulkar
> Subject: [dpdk-dev] [PATCH] net/i40e: fix link_state update for i40e_ethdev_vf
> drv
>
> The check for bool was accounting unwanted bits in the calulation of truth
> value
Could you help to add a bit more about the problem statement?
>
> 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;
Basically 'link_up' is in bool type, why adding bit manipulation on it?
But thanks for your patches!
/Helin
> new_link.link_autoneg =
> dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED;
> --
> 2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-17 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20180115145739.122013-1-tmulkar@sandvine.com>
2018-01-17 8:53 ` [dpdk-dev] [PATCH] net/i40e: fix link_state update for i40e_ethdev_vf drv Tushar Mulkar
2018-01-17 15:03 ` Zhang, Helin
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).