struct bnxt_vf_representor {
uint16_t switch_domain_id;
uint16_t vf_id;
+ uint16_t fw_fid;
+ uint16_t dflt_vnic_id;
+ uint16_t svif;
uint16_t tx_cfa_action;
uint16_t rx_cfa_code;
/* Private data store of associated PF/Trusted VF */
return rc;
}
+int bnxt_hwrm_get_dflt_vnic_svif(struct bnxt *bp, uint16_t fid,
+ uint16_t *vnic_id, uint16_t *svif)
+{
+ struct hwrm_func_qcfg_input req = {0};
+ struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
+ uint16_t svif_info;
+ int rc = 0;
+
+ HWRM_PREP(&req, HWRM_FUNC_QCFG, BNXT_USE_CHIMP_MB);
+ req.fid = rte_cpu_to_le_16(fid);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
+
+ HWRM_CHECK_RESULT();
+
+ if (vnic_id)
+ *vnic_id = rte_le_to_cpu_16(resp->dflt_vnic_id);
+
+ svif_info = rte_le_to_cpu_16(resp->svif_info);
+ if (svif && (svif_info & HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_VALID))
+ *svif = svif_info & HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_MASK;
+
+ HWRM_UNLOCK();
+
+ return rc;
+}
+
int bnxt_hwrm_port_mac_qcfg(struct bnxt *bp)
{
struct hwrm_port_mac_qcfg_input req = {0};
enum bnxt_flow_dir dir,
uint16_t cntr,
uint16_t num_entries);
+int bnxt_hwrm_get_dflt_vnic_id(struct bnxt *bp, uint16_t fid,
+ uint16_t *vnic_id);
+int bnxt_hwrm_get_dflt_vnic_svif(struct bnxt *bp, uint16_t fid,
+ uint16_t *vnic_id, uint16_t *svif);
#endif
(struct bnxt_vf_representor *)params;
struct rte_eth_link *link;
struct bnxt *parent_bp;
+ int rc = 0;
vf_rep_bp->vf_id = rep_params->vf_id;
vf_rep_bp->switch_domain_id = rep_params->switch_domain_id;
eth_dev->data->dev_link.link_status = link->link_status;
eth_dev->data->dev_link.link_autoneg = link->link_autoneg;
+ vf_rep_bp->fw_fid = rep_params->vf_id + parent_bp->first_vf_id;
+ PMD_DRV_LOG(INFO, "vf_rep->fw_fid = %d\n", vf_rep_bp->fw_fid);
+ rc = bnxt_hwrm_get_dflt_vnic_svif(parent_bp, vf_rep_bp->fw_fid,
+ &vf_rep_bp->dflt_vnic_id,
+ &vf_rep_bp->svif);
+ if (rc)
+ PMD_DRV_LOG(ERR, "Failed to get default vnic id of VF\n");
+ else
+ PMD_DRV_LOG(INFO, "vf_rep->dflt_vnic_id = %d\n",
+ vf_rep_bp->dflt_vnic_id);
+
PMD_DRV_LOG(INFO, "calling bnxt_print_link_info\n");
bnxt_print_link_info(eth_dev);