From patchwork Wed Mar 25 07:32:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng, ZhihongX" X-Patchwork-Id: 67099 X-Patchwork-Delegate: xiaolong.ye@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A3DCFA058A; Wed, 25 Mar 2020 08:30:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 703042BAE; Wed, 25 Mar 2020 08:30:52 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2EAD71E34 for ; Wed, 25 Mar 2020 08:30:49 +0100 (CET) IronPort-SDR: zUQsfhuwmRIatHWyCd4H4e3r2CZjPZaQGOMYK6eWnS2yDiVk46Buf2012P6huhQJ/7so/jIYnl lEno9KbcetGQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2020 00:30:49 -0700 IronPort-SDR: CZSZ6LuaxF++A5XRkGX0xC5ifd1djDHylRQdwcCd4Obwt6ptFpM4U2wlyNox4JkGEtiz/vZ2B1 5biNEmfvEJ9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,303,1580803200"; d="scan'208";a="265441975" Received: from ubuntu.sh.intel.com ([10.240.183.163]) by orsmga002.jf.intel.com with ESMTP; 25 Mar 2020 00:30:45 -0700 From: zhihongx.peng@intel.com To: xiaolong.ye@intel.com, wenzhuo.lu@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, Peng Zhihong , liang-min.wang@intel.com Date: Wed, 25 Mar 2020 03:32:50 -0400 Message-Id: <20200325073250.11214-1-zhihongx.peng@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [DPDK] net/ixgbe: fix status synchronization on BSD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Peng Zhihong 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 --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 23b3f5b0c..6135effcd 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -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