From patchwork Mon Jul 31 19:27:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenzhuo Lu X-Patchwork-Id: 27293 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 73F9A9A00; Mon, 31 Jul 2017 21:26:37 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E432B99A6 for ; Mon, 31 Jul 2017 21:26:31 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 31 Jul 2017 12:26:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,304,1498546800"; d="scan'208";a="131661959" Received: from dpdk26.sh.intel.com ([10.67.110.152]) by orsmga005.jf.intel.com with ESMTP; 31 Jul 2017 12:26:30 -0700 From: Wenzhuo Lu To: dev@dpdk.org Cc: Wenzhuo Lu Date: Tue, 1 Aug 2017 03:27:18 +0800 Message-Id: <1501529240-64181-2-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1501529240-64181-1-git-send-email-wenzhuo.lu@intel.com> References: <1501529240-64181-1-git-send-email-wenzhuo.lu@intel.com> Subject: [dpdk-dev] [RFC PATCH 1/3] librte_ether: VF max queue number setting 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 a global variable to set the max queue number per VF. This variable is only valid on PF. Signed-off-by: Wenzhuo Lu --- lib/librte_ether/rte_ethdev.c | 3 +++ lib/librte_ether/rte_ethdev.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index d4ebb1b..9d3e650 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -138,6 +138,9 @@ enum { STAT_QMAP_RX }; +/**< Max queue number per VF, only valid on PF port. */ +uint32_t g_max_queue_number_per_vf = 4; + uint8_t rte_eth_find_next(uint8_t port_id) { diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 0e99090..1c3f668 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1091,6 +1091,8 @@ struct rte_eth_dcb_info { /**< l2 tunnel forwarding mask */ #define ETH_L2_TUNNEL_FORWARDING_MASK 0x00000008 +extern uint32_t g_max_queue_number_per_vf; + /* * Definitions of all functions exported by an Ethernet driver through the * the generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*