From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 33E9D5678 for ; Fri, 2 Dec 2016 12:25:48 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 02 Dec 2016 03:25:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,729,1477983600"; d="scan'208";a="907950195" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by orsmga003.jf.intel.com with ESMTP; 02 Dec 2016 03:25:47 -0800 To: Wenzhuo Lu , dev@dpdk.org References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1480637533-37425-31-git-send-email-wenzhuo.lu@intel.com> Cc: "Chen Jing D(Mark)" From: Ferruh Yigit Message-ID: <7a630948-71a5-c955-c373-76a7c12e288e@intel.com> Date: Fri, 2 Dec 2016 11:25:46 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <1480637533-37425-31-git-send-email-wenzhuo.lu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 30/31] net/i40e: support Linux VF to configure IRQ link list 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: , X-List-Received-Date: Fri, 02 Dec 2016 11:25:49 -0000 On 12/2/2016 12:12 AM, Wenzhuo Lu wrote: > i40e PF host only support to work with DPDK VF driver, Linux > VF driver is not supported. This change will enhance in > configuring IRQ link list. > > This Change will identify VF client by number of vector > requested. DPDK VF will ask only single one while Linux VF > will request at least 2. It will have different configuration > for different clients. DPDK VF will be configured to link all > queue together, while Linux VF will be configured per request. > > Signed-off-by: Chen Jing D(Mark) > --- > drivers/net/i40e/i40e_pf.c | 151 +++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 138 insertions(+), 13 deletions(-) > > diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c > index 1ad5ed1..4b0da75 100644 > --- a/drivers/net/i40e/i40e_pf.c > +++ b/drivers/net/i40e/i40e_pf.c > @@ -585,14 +585,116 @@ > return ret; > } > > +static void > +i40e_pf_config_irq_link_list(struct i40e_pf_vf *vf, > + struct i40e_virtchnl_vector_map *vvm) > +{ > + uint64_t linklistmap = 0, tempmap; > + struct i40e_hw *hw = I40E_PF_TO_HW(vf->pf); > + uint16_t qid; > + bool b_first_q = true; > + enum i40e_queue_type qtype; > + uint16_t vector_id; > + uint32_t reg, reg_idx; > + uint16_t itr_idx = 0, i; > + > + vector_id = vvm->vector_id; > + /* setup the head */ > + if (!vector_id) > + reg_idx = I40E_VPINT_LNKLST0(vf->vf_idx); > + else > + reg_idx = I40E_VPINT_LNKLSTN( > + ((hw->func_caps.num_msix_vectors_vf - 1) * vf->vf_idx) > + + (vector_id - 1)); > + > + if (vvm->rxq_map == 0 && vvm->txq_map == 0) { > + I40E_WRITE_REG(hw, reg_idx, > + I40E_VPINT_LNKLST0_FIRSTQ_INDX_MASK); > + goto cfg_irq_done; > + } > + > + /* sort all rx and tx queues */ > + tempmap = vvm->rxq_map; > + for (i = 0; i < sizeof(vvm->rxq_map) * 8; i++) { > + if (tempmap & 0x1) > + linklistmap |= (1 << (2 * i)); > + tempmap >>= 1; > + } > + > + tempmap = vvm->txq_map; > + for (i = 0; i < sizeof(vvm->txq_map) * 8; i++) { > + if (tempmap & 0x1) > + linklistmap |= (1 << (2 * i + 1)); > + tempmap >>= 1; > + } > + > + /* Link all rx and tx queues into a chained list */ > + tempmap = linklistmap; > + i = 0; > + b_first_q = true; > + do { > + if (tempmap & 0x1) { > + qtype = i % 2; This cause ICC compilation error: .../app/test-pmd/cmdline.c:(.text+0x79d4): undefined reference to `rte_pmd_i40e_set_vf_vlan_stripq'