net/bnxt: support VF
Add support to the bnxt PMD to load on a PCI VF. 1) VF cannot change parameters like - speed, autoneg and pause 2) If the VF MAC address shows up as all 0's it has to be provisioned by the PF in the hypervisor. Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: David Christensen <david.christensen@broadcom.com>
This commit is contained in:
parent
5c4b2e43c6
commit
f86febfb46
@ -539,6 +539,11 @@ static void bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
|
||||
struct bnxt_vnic_info *vnic = STAILQ_FIRST(&bp->ff_pool[pool]);
|
||||
struct bnxt_filter_info *filter;
|
||||
|
||||
if (BNXT_VF(bp)) {
|
||||
RTE_LOG(ERR, PMD, "Cannot add MAC address to a VF interface\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!vnic) {
|
||||
RTE_LOG(ERR, PMD, "VNIC not found for pool %d!\n", pool);
|
||||
return;
|
||||
@ -857,8 +862,10 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev,
|
||||
{
|
||||
struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
|
||||
|
||||
if (BNXT_NPAR_PF(bp))
|
||||
return 0;
|
||||
if (BNXT_NPAR_PF(bp) || BNXT_VF(bp)) {
|
||||
RTE_LOG(ERR, PMD, "Flow Control Settings cannot be modified\n");
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
switch (fc_conf->mode) {
|
||||
case RTE_FC_NONE:
|
||||
@ -940,7 +947,9 @@ static struct eth_dev_ops bnxt_dev_ops = {
|
||||
static bool bnxt_vf_pciid(uint16_t id)
|
||||
{
|
||||
if (id == BROADCOM_DEV_ID_57304_VF ||
|
||||
id == BROADCOM_DEV_ID_57406_VF)
|
||||
id == BROADCOM_DEV_ID_57406_VF ||
|
||||
id == BROADCOM_DEV_ID_5731X_VF ||
|
||||
id == BROADCOM_DEV_ID_5741X_VF)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -1452,7 +1452,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
|
||||
struct bnxt_link_info link_req;
|
||||
uint16_t speed;
|
||||
|
||||
if (BNXT_NPAR_PF(bp))
|
||||
if (BNXT_NPAR_PF(bp) || BNXT_VF(bp))
|
||||
return 0;
|
||||
|
||||
rc = bnxt_valid_link_speed(dev_conf->link_speeds,
|
||||
|
Loading…
Reference in New Issue
Block a user