[DPDK] net/ixgbe: fix status synchronization on BSD
Checks
Commit Message
From: Peng Zhihong <zhihongx.peng@intel.com>
DPDK does not implement interrupt mechanism on BSD,
so force NIC status synchronization.
Fixes: dc66e5fd01b9 (net/ixgbe: improve link state check on VF)
Cc: liang-min.wang@intel.com
Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Tue, 24 Mar 2020 23:31:11 -0400
zhihongx.peng@intel.com wrote:
> +/*BSD has no interrupt mechanism, so force NIC status synchronization.*/
> +#ifdef RTE_EXEC_ENV_FREEBSD
> + wait = 1;
> +#endif
> +
Please format comments correctly.
Is there a better way to detect interrupt mechanism with a function?
#ifdef's make for hard to maintain code.
Sorry, because the mail filtering is wrong, I have not seen this mail, and the community canceled the patch. I resubmitted a pacth, only modified the format. Judging this flag, it feels a bit more complicated.
New patch: http://patches.dpdk.org/patch/68713/
-----Original Message-----
From: Stephen Hemminger [mailto:stephen@networkplumber.org]
Sent: Friday, March 27, 2020 6:02 AM
To: Peng, ZhihongX <zhihongx.peng@intel.com>
Cc: Ye, Xiaolong <xiaolong.ye@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org; Wang, Liang-min <liang-min.wang@intel.com>
Subject: Re: [dpdk-dev] [DPDK] net/ixgbe: fix status synchronization on BSD
On Tue, 24 Mar 2020 23:31:11 -0400
zhihongx.peng@intel.com wrote:
> +/*BSD has no interrupt mechanism, so force NIC status
> +synchronization.*/ #ifdef RTE_EXEC_ENV_FREEBSD
> + wait = 1;
> +#endif
> +
Please format comments correctly.
Is there a better way to detect interrupt mechanism with a function?
#ifdef's make for hard to maintain code.
@@ -4243,6 +4243,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
if (wait_to_complete == 0 || dev->data->dev_conf.intr_conf.lsc != 0)
wait = 0;
+/*BSD has no interrupt mechanism, so force NIC status synchronization.*/
+#ifdef RTE_EXEC_ENV_FREEBSD
+ wait = 1;
+#endif
+
if (vf)
diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait);
else