X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Fi40e_pf.c;h=5afd61a0746d0346f0fa7dd03dddd9075e2c8e17;hb=a2ccd6b7426f37564e18ccd1ef8b57ce14a4d119;hp=95c960c120eaf537e1e3c14171a3fa90704d8e7c;hpb=d42aaf30008bfaaac41da23cb1fe2ec4f6e90eb5;p=dpdk.git diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 95c960c120..5afd61a074 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -82,8 +82,8 @@ i40e_pf_vf_queues_mapping(struct i40e_pf_vf *vf) * VF should use scatter range queues. So, it needn't * to set QBASE in this register. */ - I40E_WRITE_REG(hw, I40E_VSILAN_QBASE(vsi_id), - I40E_VSILAN_QBASE_VSIQTABLE_ENA_MASK); + i40e_write_rx_ctl(hw, I40E_VSILAN_QBASE(vsi_id), + I40E_VSILAN_QBASE_VSIQTABLE_ENA_MASK); /* Set to enable VFLAN_QTABLE[] registers valid */ I40E_WRITE_REG(hw, I40E_VPLAN_MAPENA(vf_id), @@ -108,7 +108,7 @@ i40e_pf_vf_queues_mapping(struct i40e_pf_vf *vf) q2 = qbase + 2 * i + 1; val = (q2 << I40E_VSILAN_QTABLE_QINDEX_1_SHIFT) + q1; - I40E_WRITE_REG(hw, I40E_VSILAN_QTABLE(i, vsi_id), val); + i40e_write_rx_ctl(hw, I40E_VSILAN_QTABLE(i, vsi_id), val); } I40E_WRITE_FLUSH(hw); @@ -315,6 +315,8 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf) /* As assume Vf only has single VSI now, always return 0 */ vf_res->vsi_res[0].vsi_id = 0; vf_res->vsi_res[0].num_queue_pairs = vf->vsi->nb_qps; + ether_addr_copy(&vf->mac_addr, + (struct ether_addr *)vf_res->vsi_res[0].default_mac_addr); send_msg: i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_GET_VF_RESOURCES, @@ -547,13 +549,10 @@ i40e_pf_host_process_cmd_config_irq_map(struct i40e_pf_vf *vf, goto send_msg; } - if (irqmap->vecmap[0].vector_id == 0) { - PMD_DRV_LOG(ERR, "DPDK host don't support use IRQ0"); - ret = I40E_ERR_PARAM; - goto send_msg; - } /* This MSIX intr store the intr in VF range */ vf->vsi->msix_intr = irqmap->vecmap[0].vector_id; + vf->vsi->nb_msix = irqmap->num_vectors; + vf->vsi->nb_used_qps = vf->vsi->nb_qps; /* Don't care how the TX/RX queue mapping with this vector. * Link all VF RX queues together. Only did mapping work. @@ -1048,6 +1047,7 @@ i40e_pf_host_init(struct rte_eth_dev *dev) ret = i40e_pf_host_vf_reset(&pf->vfs[i], 0); if (ret != I40E_SUCCESS) goto fail; + eth_random_addr(pf->vfs[i].mac_addr.addr_bytes); } /* restore irq0 */