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) <jing.d.c...@intel.com> > --- > 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'