From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 30/31] net/i40e: support Linux VF to configure IRQ link list Date: Fri, 2 Dec 2016 11:25:46 +0000 Message-ID: <7a630948-71a5-c955-c373-76a7c12e288e@intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1480637533-37425-31-git-send-email-wenzhuo.lu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: "Chen Jing D(Mark)" To: Wenzhuo Lu , dev@dpdk.org 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) In-Reply-To: <1480637533-37425-31-git-send-email-wenzhuo.lu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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'