From patchwork Sun Sep 27 07:26:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78904 X-Patchwork-Delegate: qi.z.zhang@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 94108A04BC; Sun, 27 Sep 2020 09:47:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C8E2B1D6A1; Sun, 27 Sep 2020 09:47:21 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B38241D5D4 for ; Sun, 27 Sep 2020 09:47:20 +0200 (CEST) IronPort-SDR: m/Nn3BhRB0nDQSXkXNmIbj1Z7FqWMVV8+VYoCGp7alx1EF41p7diTwPfffEXIdSTPQYH3rNWxz pdd4E28NYGAg== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438294" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438294" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:17 -0700 IronPort-SDR: pksgT3cvF6Bt7D8aoDnOxGTCLu4ov1q6BGv/ylG039Mu/PYjblo6AvuLgo9wz3rRfO/vCkEqgr kjM4+H9hzeHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939317" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:15 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:19 +0000 Message-Id: <20200927072626.28374-2-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 1/8] net/iavf: use link status helper functions 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" Use new rte_eth_linkstatus_get/set helper functions to handle link status update. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 440da7d76..95c71e16f 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -665,12 +665,7 @@ iavf_dev_link_update(struct rte_eth_dev *dev, new_link.link_autoneg = !(dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED); - if (rte_atomic64_cmpset((uint64_t *)&dev->data->dev_link, - *(uint64_t *)&dev->data->dev_link, - *(uint64_t *)&new_link) == 0) - return -1; - - return 0; + return rte_eth_linkstatus_set(dev, &new_link); } static int From patchwork Sun Sep 27 07:26:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78905 X-Patchwork-Delegate: qi.z.zhang@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 C700EA04BC; Sun, 27 Sep 2020 09:47:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 955551D8D6; Sun, 27 Sep 2020 09:47:23 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4C6B81D8D2 for ; Sun, 27 Sep 2020 09:47:21 +0200 (CEST) IronPort-SDR: qGxklnEwiYywHLl5z/aGbG+WiClmpG7zgiThrjwuvysps17HQ/wsxAW7p8s9xaoTafxJn+Hgp8 UER9UJmffmmA== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438298" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438298" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:20 -0700 IronPort-SDR: 6/ZUwDFVgSq1SdqskH+2a8xOlUIMyR+NIiW3DP0jdbDM3TWR3618NXPpXfYiCgbMt8MJlKvzGR V243EciUi0Kg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939351" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:18 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:20 +0000 Message-Id: <20200927072626.28374-3-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 2/8] net/iavf: set min and max MTU for VF 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" This commit sets the min and max supported MTU values for iavf VF devices via the iavf_dev_info_get() function. Min MTU supported is set to RTE_ETHER_MIN_MTU and max MTU is calculated as the max packet length supported minus the transport overhead. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 95c71e16f..d21e35c17 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -540,6 +540,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs; dev_info->min_rx_bufsize = IAVF_BUF_SIZE_MIN; dev_info->max_rx_pktlen = IAVF_FRAME_SIZE_MAX; + dev_info->max_mtu = dev_info->max_rx_pktlen - IAVF_ETH_OVERHEAD; + dev_info->min_mtu = RTE_ETHER_MIN_MTU; dev_info->hash_key_size = vf->vf_res->rss_key_size; dev_info->reta_size = vf->vf_res->rss_lut_size; dev_info->flow_type_rss_offloads = IAVF_RSS_OFFLOAD_ALL; From patchwork Sun Sep 27 07:26:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78906 X-Patchwork-Delegate: qi.z.zhang@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 842D3A04BC; Sun, 27 Sep 2020 09:48:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4966C1D902; Sun, 27 Sep 2020 09:47:26 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 930DC1D8DD for ; Sun, 27 Sep 2020 09:47:23 +0200 (CEST) IronPort-SDR: Fn0IMWe5Qhv+uNtYnTgS7IWOsday83tHru+I17SDeAwDyabt5aO+IZ2tekFRWf70Q0X4serg1P zXoejhH9qZhg== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438300" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438300" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:22 -0700 IronPort-SDR: ScKPEoUt8veOI4C1vicqWGV3avotGzGwvK8Vma7c6jOIaafWr1EsT+qyXK5ktYjrJayPvytClL SDyA8qhENZ0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939381" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:20 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:21 +0000 Message-Id: <20200927072626.28374-4-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 3/8] net/iavf: re-program promiscuous mode on VF interface 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" During a kernel PF reset, this event is propagated to the VF. The DPDK VF PMD will execute the reset task before the PF is done with his. This results in the admin queue message not being responded to leaving the port in "promiscuous" mode. This patch makes sure the promiscuous mode is configured independently of the current admin state. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index d21e35c17..57640c52a 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -678,9 +678,6 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev) struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); int ret; - if (vf->promisc_unicast_enabled) - return 0; - ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled); if (!ret) vf->promisc_unicast_enabled = true; @@ -700,9 +697,6 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev) struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); int ret; - if (!vf->promisc_unicast_enabled) - return 0; - ret = iavf_config_promisc(adapter, false, vf->promisc_multicast_enabled); if (!ret) @@ -723,9 +717,6 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev) struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); int ret; - if (vf->promisc_multicast_enabled) - return 0; - ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true); if (!ret) vf->promisc_multicast_enabled = true; @@ -745,9 +736,6 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev) struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); int ret; - if (!vf->promisc_multicast_enabled) - return 0; - ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false); if (!ret) vf->promisc_multicast_enabled = false; From patchwork Sun Sep 27 07:26:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78907 X-Patchwork-Delegate: qi.z.zhang@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 C2583A04BC; Sun, 27 Sep 2020 09:48:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C11CA1D940; Sun, 27 Sep 2020 09:47:29 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 122601D8F1 for ; Sun, 27 Sep 2020 09:47:25 +0200 (CEST) IronPort-SDR: FUo0MZKs9n8CevdXTDQCfpM7lDPbvwvq4CdJRQgXaM64EKQY7ibT7BUwjHQooihpACxZGn9UWG fIULOT9gGafA== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438301" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438301" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:25 -0700 IronPort-SDR: TofppEKV+dHGqFjXAquQ66ShrO90WP6IFS/B2RIdoj2f6sSP3O1atyHFM/IFMBBVsWW5ber/AW 0N19ELnGqkug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939417" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:23 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:22 +0000 Message-Id: <20200927072626.28374-5-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 4/8] net/iavf: optimize promiscuous ops 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" This patch is to improve efficiency and eliminate code redundancy of promiscuous ops. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 49 ++++++---------------------------- drivers/net/iavf/iavf_vchnl.c | 13 +++++++-- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 57640c52a..3b3829f75 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -676,17 +676,9 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev) struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - int ret; - - ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled); - if (!ret) - vf->promisc_unicast_enabled = true; - else if (ret == IAVF_NOT_SUPPORTED) - ret = -ENOTSUP; - else - ret = -EAGAIN; - return ret; + return iavf_config_promisc(adapter, + true, vf->promisc_multicast_enabled); } static int @@ -695,18 +687,9 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev) struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - int ret; - - ret = iavf_config_promisc(adapter, false, - vf->promisc_multicast_enabled); - if (!ret) - vf->promisc_unicast_enabled = false; - else if (ret == IAVF_NOT_SUPPORTED) - ret = -ENOTSUP; - else - ret = -EAGAIN; - return ret; + return iavf_config_promisc(adapter, + false, vf->promisc_multicast_enabled); } static int @@ -715,17 +698,9 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev) struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - int ret; - - ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true); - if (!ret) - vf->promisc_multicast_enabled = true; - else if (ret == IAVF_NOT_SUPPORTED) - ret = -ENOTSUP; - else - ret = -EAGAIN; - return ret; + return iavf_config_promisc(adapter, + vf->promisc_unicast_enabled, true); } static int @@ -734,17 +709,9 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev) struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - int ret; - - ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false); - if (!ret) - vf->promisc_multicast_enabled = false; - else if (ret == IAVF_NOT_SUPPORTED) - ret = -ENOTSUP; - else - ret = -EAGAIN; - return ret; + return iavf_config_promisc(adapter, + vf->promisc_unicast_enabled, false); } static int diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 76f8e38d1..7a9f6b920 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -841,10 +841,19 @@ iavf_config_promisc(struct iavf_adapter *adapter, err = iavf_execute_vf_cmd(adapter, &args); - if (err) + if (err) { PMD_DRV_LOG(ERR, "fail to execute command CONFIG_PROMISCUOUS_MODE"); - return err; + + if (err == IAVF_NOT_SUPPORTED) + return -ENOTSUP; + + return -EAGAIN; + } + + vf->promisc_unicast_enabled = enable_unicast; + vf->promisc_multicast_enabled = enable_multicast; + return 0; } int From patchwork Sun Sep 27 07:26:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78908 X-Patchwork-Delegate: qi.z.zhang@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 7FBFFA04BC; Sun, 27 Sep 2020 09:48:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8BCF81D949; Sun, 27 Sep 2020 09:47:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id BBA621D93F for ; Sun, 27 Sep 2020 09:47:29 +0200 (CEST) IronPort-SDR: 1u7uvnB/+cIIySe+0z+gM6SwP2HWI88R3f5E9dJUFTUuH6PlBC502rnKUEjIJWgkTLRHAdQuq9 IE8ngk4DRB5w== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438302" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438302" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:28 -0700 IronPort-SDR: JT4TkeJIg7+RpboWjxxl8L92/T2pJlth0jX7+VMtD9plx/6Yvtwrbhznau/aOn6EAeStOTPVY0 uoiHJ9wxnONw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939451" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:26 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:23 +0000 Message-Id: <20200927072626.28374-6-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 5/8] net/iavf: add workaround promiscuous disable 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" In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit doesn't disable promiscuous mode, this will cause vlan filter set by Kernel Driver will not take effect. This patch will fix it, add promiscuous disable at device disable. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 3b3829f75..b32302c43 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1428,6 +1428,15 @@ iavf_dev_close(struct rte_eth_dev *dev) iavf_dev_stop(dev); iavf_flow_flush(dev, NULL); iavf_flow_uninit(adapter); + + /* + * disable promiscuous mode before reset vf + * it is a workaround solution when work with kernel driver + * and it is not the normal way + */ + if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled) + iavf_config_promisc(adapter, false, false); + iavf_shutdown_adminq(hw); /* disable uio intr before callback unregister */ rte_intr_disable(intr_handle); From patchwork Sun Sep 27 07:26:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78909 X-Patchwork-Delegate: qi.z.zhang@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 24AF1A04BC; Sun, 27 Sep 2020 09:49:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F383A1D97E; Sun, 27 Sep 2020 09:47:36 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 6DB4F1D8D5 for ; Sun, 27 Sep 2020 09:47:33 +0200 (CEST) IronPort-SDR: uqrIcor4A17c8dx6/mpFVPir5f7rlvFSWvdP8sIk/3TCLF6PCUr4YFd9t9+d6LyC5WlvF6MzIC vwG46txojnqQ== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438303" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438303" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:33 -0700 IronPort-SDR: Luhvn0BnekXrvSeBPyBX1UKV9r/pcxOADe+IDPP9cofukFKyCVHdKYCvNkisaOauJ6rTsoKc7s flQ82q0fcYEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939493" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:29 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:24 +0000 Message-Id: <20200927072626.28374-7-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 6/8] net/iavf: cleanup Tx buffers 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" Add support to the iavf driver for the API rte_eth_tx_done_cleanup to force free consumed buffers on Tx ring. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_rxtx.c | 68 +++++++++++++++++++++++++++++++++- drivers/net/iavf/iavf_rxtx.h | 1 + 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index b32302c43..5b3c68f2e 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -121,6 +121,7 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable, .filter_ctrl = iavf_dev_filter_ctrl, + .tx_done_cleanup = iavf_dev_tx_done_cleanup, }; static int diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 05a7dd898..1b0efe043 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1905,7 +1905,6 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) tx_offload.l3_len = tx_pkt->l3_len; tx_offload.l4_len = tx_pkt->l4_len; tx_offload.tso_segsz = tx_pkt->tso_segsz; - /* Calculate the number of context descriptors needed. */ nb_ctx = iavf_calc_context_desc(ol_flags); @@ -2208,6 +2207,73 @@ iavf_set_tx_function(struct rte_eth_dev *dev) dev->tx_pkt_prepare = iavf_prep_pkts; } +static int +iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, + uint32_t free_cnt) +{ + struct iavf_tx_entry *swr_ring = txq->sw_ring; + uint16_t i, tx_last, tx_id; + uint16_t nb_tx_free_last; + uint16_t nb_tx_to_clean; + uint32_t pkt_cnt; + + /* Start free mbuf from the next of tx_tail */ + tx_last = txq->tx_tail; + tx_id = swr_ring[tx_last].next_id; + + if (txq->nb_free == 0 && iavf_xmit_cleanup(txq)) + return 0; + + nb_tx_to_clean = txq->nb_free; + nb_tx_free_last = txq->nb_free; + if (!free_cnt) + free_cnt = txq->nb_tx_desc; + + /* Loop through swr_ring to count the amount of + * freeable mubfs and packets. + */ + for (pkt_cnt = 0; pkt_cnt < free_cnt; ) { + for (i = 0; i < nb_tx_to_clean && + pkt_cnt < free_cnt && + tx_id != tx_last; i++) { + if (swr_ring[tx_id].mbuf != NULL) { + rte_pktmbuf_free_seg(swr_ring[tx_id].mbuf); + swr_ring[tx_id].mbuf = NULL; + + /* + * last segment in the packet, + * increment packet count + */ + pkt_cnt += (swr_ring[tx_id].last_id == tx_id); + } + + tx_id = swr_ring[tx_id].next_id; + } + + if (txq->rs_thresh > txq->nb_tx_desc - + txq->nb_free || tx_id == tx_last) + break; + + if (pkt_cnt < free_cnt) { + if (iavf_xmit_cleanup(txq)) + break; + + nb_tx_to_clean = txq->nb_free - nb_tx_free_last; + nb_tx_free_last = txq->nb_free; + } + } + + return (int)pkt_cnt; +} + +int +iavf_dev_tx_done_cleanup(void *txq, uint32_t free_cnt) +{ + struct iavf_tx_queue *q = (struct iavf_tx_queue *)txq; + + return iavf_tx_done_cleanup_full(q, free_cnt); +} + void iavf_dev_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_rxq_info *qinfo) diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h index 59625a979..3d02c6589 100644 --- a/drivers/net/iavf/iavf_rxtx.h +++ b/drivers/net/iavf/iavf_rxtx.h @@ -379,6 +379,7 @@ int iavf_dev_tx_queue_setup(struct rte_eth_dev *dev, const struct rte_eth_txconf *tx_conf); int iavf_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id); int iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id); +int iavf_dev_tx_done_cleanup(void *txq, uint32_t free_cnt); void iavf_dev_tx_queue_release(void *txq); void iavf_stop_queues(struct rte_eth_dev *dev); uint16_t iavf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, From patchwork Sun Sep 27 07:26:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78910 X-Patchwork-Delegate: qi.z.zhang@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 EAD10A04BC; Sun, 27 Sep 2020 09:49:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7167E1D98B; Sun, 27 Sep 2020 09:47:40 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D950F1D8D5 for ; Sun, 27 Sep 2020 09:47:36 +0200 (CEST) IronPort-SDR: cn8R4zXrq9HTqauXd6R//w4cyNeYlavN/3NaPSOul66+un9NticcW/o1Bfpu+J2yi6VIF+x5iE adBx/wBVZl8A== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438306" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438306" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:36 -0700 IronPort-SDR: 1ydZuWdCwcVd2kqR7JzWIY2/uda887Uef5brKAIwfgtyT0fOZTyKxwB5LMMQTC1rJg9Ijsa/DO MSOO06VnDjBQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939516" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:34 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:25 +0000 Message-Id: <20200927072626.28374-8-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 7/8] net/iavf: add extended stats 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" Add implementation of xstats() functions in iavf PMD. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 81 ++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 5b3c68f2e..836c09f58 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -40,6 +40,11 @@ static const uint32_t *iavf_dev_supported_ptypes_get(struct rte_eth_dev *dev); static int iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats); static int iavf_dev_stats_reset(struct rte_eth_dev *dev); +static int iavf_dev_xstats_get(struct rte_eth_dev *dev, + struct rte_eth_xstat *xstats, unsigned int n); +static int iavf_dev_xstats_get_names(struct rte_eth_dev *dev, + struct rte_eth_xstat_name *xstats_names, + unsigned int limit); static int iavf_dev_promiscuous_enable(struct rte_eth_dev *dev); static int iavf_dev_promiscuous_disable(struct rte_eth_dev *dev); static int iavf_dev_allmulticast_enable(struct rte_eth_dev *dev); @@ -82,6 +87,30 @@ static const struct rte_pci_id pci_id_iavf_map[] = { { .vendor_id = 0, /* sentinel */ }, }; +struct rte_iavf_xstats_name_off { + char name[RTE_ETH_XSTATS_NAME_SIZE]; + unsigned int offset; +}; + +static const struct rte_iavf_xstats_name_off rte_iavf_stats_strings[] = { + {"rx_bytes", offsetof(struct iavf_eth_stats, rx_bytes)}, + {"rx_unicast_packets", offsetof(struct iavf_eth_stats, rx_unicast)}, + {"rx_multicast_packets", offsetof(struct iavf_eth_stats, rx_multicast)}, + {"rx_broadcast_packets", offsetof(struct iavf_eth_stats, rx_broadcast)}, + {"rx_dropped_packets", offsetof(struct iavf_eth_stats, rx_discards)}, + {"rx_unknown_protocol_packets", offsetof(struct iavf_eth_stats, + rx_unknown_protocol)}, + {"tx_bytes", offsetof(struct iavf_eth_stats, tx_bytes)}, + {"tx_unicast_packets", offsetof(struct iavf_eth_stats, tx_unicast)}, + {"tx_multicast_packets", offsetof(struct iavf_eth_stats, tx_multicast)}, + {"tx_broadcast_packets", offsetof(struct iavf_eth_stats, tx_broadcast)}, + {"tx_dropped_packets", offsetof(struct iavf_eth_stats, tx_discards)}, + {"tx_error_packets", offsetof(struct iavf_eth_stats, tx_errors)}, +}; + +#define IAVF_NB_XSTATS (sizeof(rte_iavf_stats_strings) / \ + sizeof(rte_iavf_stats_strings[0])) + static const struct eth_dev_ops iavf_eth_dev_ops = { .dev_configure = iavf_dev_configure, .dev_start = iavf_dev_start, @@ -93,6 +122,9 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .link_update = iavf_dev_link_update, .stats_get = iavf_dev_stats_get, .stats_reset = iavf_dev_stats_reset, + .xstats_get = iavf_dev_xstats_get, + .xstats_get_names = iavf_dev_xstats_get_names, + .xstats_reset = iavf_dev_stats_reset, .promiscuous_enable = iavf_dev_promiscuous_enable, .promiscuous_disable = iavf_dev_promiscuous_disable, .allmulticast_enable = iavf_dev_allmulticast_enable, @@ -1092,6 +1124,55 @@ iavf_dev_stats_reset(struct rte_eth_dev *dev) return 0; } +static int iavf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, + struct rte_eth_xstat_name *xstats_names, + __rte_unused unsigned int limit) +{ + unsigned int i; + + if (xstats_names != NULL) + for (i = 0; i < IAVF_NB_XSTATS; i++) { + snprintf(xstats_names[i].name, + sizeof(xstats_names[i].name), + "%s", rte_iavf_stats_strings[i].name); + } + return IAVF_NB_XSTATS; +} + +static int iavf_dev_xstats_get(struct rte_eth_dev *dev, + struct rte_eth_xstat *xstats, unsigned int n) +{ + int ret; + unsigned int i; + struct iavf_adapter *adapter = + IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); + struct iavf_vsi *vsi = &vf->vsi; + struct virtchnl_eth_stats *pstats = NULL; + + if (n < IAVF_NB_XSTATS) + return IAVF_NB_XSTATS; + + ret = iavf_query_stats(adapter, &pstats); + if (ret != 0) + return 0; + + if (!xstats) + return 0; + + iavf_update_stats(vsi, pstats); + + /* loop over xstats array and values from pstats */ + for (i = 0; i < IAVF_NB_XSTATS; i++) { + xstats[i].id = i; + xstats[i].value = *(uint64_t *)(((char *)pstats) + + rte_iavf_stats_strings[i].offset); + } + + return IAVF_NB_XSTATS; +} + + static int iavf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id) { From patchwork Sun Sep 27 07:26:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78911 X-Patchwork-Delegate: qi.z.zhang@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 4F1B3A04BC; Sun, 27 Sep 2020 09:49:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C0611D9A4; Sun, 27 Sep 2020 09:47:43 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 07B011D98F for ; Sun, 27 Sep 2020 09:47:40 +0200 (CEST) IronPort-SDR: sItlqkCMbSt48hl3t1SZFtCz9upvmL8jboYRK9H925hxGAHrUhtqWFBae0iESV2dgTTMz96Xut A427iZRux9lA== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438307" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438307" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:40 -0700 IronPort-SDR: OgdAapvVYYjcxQT8+tzHlCRN82EYEXX/uk78pi9prjoV+Eo1OmE/t0y42qRHwju84uvmhzDHLl NPsjyBOMcH2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939531" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:37 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:26 +0000 Message-Id: <20200927072626.28374-9-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 8/8] net/iavf: support check DD bit of a RX descriptor 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" Add implementation of inline API rx_descriptor_done in iavf PMD. Signed-off-by: Robin Zhang --- drivers/net/iavf/iavf_ethdev.c | 1 + drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++++++ drivers/net/iavf/iavf_rxtx.h | 1 + 3 files changed, 28 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 836c09f58..b7a819a0e 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1417,6 +1417,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) /* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_done = iavf_dev_rx_desc_done; eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status; eth_dev->rx_pkt_burst = &iavf_recv_pkts; diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 1b0efe043..d9e3aac1d 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2337,6 +2337,32 @@ iavf_dev_rxq_count(struct rte_eth_dev *dev, uint16_t queue_id) return desc; } +int +iavf_dev_rx_desc_done(void *rx_queue, uint16_t offset) +{ + volatile union iavf_rx_desc *rxdp; + struct iavf_rx_queue *rxq = rx_queue; + uint16_t desc; + int ret; + + if (unlikely(offset >= rxq->nb_rx_desc)) { + PMD_DRV_LOG(ERR, "Invalid RX descriptor id %u", offset); + return 0; + } + + desc = rxq->rx_tail + offset; + if (desc >= rxq->nb_rx_desc) + desc -= rxq->nb_rx_desc; + + rxdp = &rxq->rx_ring[desc]; + + ret = !!(((rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len) & + IAVF_RXD_QW1_STATUS_MASK) >> IAVF_RXD_QW1_STATUS_SHIFT) & + (1 << IAVF_RX_DESC_STATUS_DD_SHIFT)); + + return ret; +} + int iavf_dev_rx_desc_status(void *rx_queue, uint16_t offset) { diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h index 3d02c6589..d5c002858 100644 --- a/drivers/net/iavf/iavf_rxtx.h +++ b/drivers/net/iavf/iavf_rxtx.h @@ -404,6 +404,7 @@ void iavf_dev_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, void iavf_dev_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_txq_info *qinfo); uint32_t iavf_dev_rxq_count(struct rte_eth_dev *dev, uint16_t queue_id); +int iavf_dev_rx_desc_done(void *rx_queue, uint16_t offset); int iavf_dev_rx_desc_status(void *rx_queue, uint16_t offset); int iavf_dev_tx_desc_status(void *tx_queue, uint16_t offset);