#define BNXT_FLOW_ID_MASK 0x0000ffff
struct bnxt_mark_info *mark_table;
+#define BNXT_SVIF_INVALID 0xFFFF
+ uint16_t func_svif;
+ uint16_t port_svif;
struct tf tfp;
};
#define PMD_DRV_LOG(level, fmt, args...) \
PMD_DRV_LOG_RAW(level, fmt, ## args)
+
+uint16_t bnxt_get_svif(uint16_t port_id, bool func_svif);
+
#endif
ALLOW_FUNC(HWRM_VNIC_TPA_CFG);
}
+uint16_t
+bnxt_get_svif(uint16_t port_id, bool func_svif)
+{
+ struct rte_eth_dev *eth_dev;
+ struct bnxt *bp;
+
+ eth_dev = &rte_eth_devices[port_id];
+ bp = eth_dev->data->dev_private;
+
+ return func_svif ? bp->func_svif : bp->port_svif;
+}
+
static int bnxt_init_fw(struct bnxt *bp)
{
uint16_t mtu;
if (rc)
return rc;
+ bnxt_hwrm_port_mac_qcfg(bp);
+
rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
if (rc)
return rc;
struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
uint16_t flags;
int rc = 0;
+ bp->func_svif = BNXT_SVIF_INVALID;
+ uint16_t svif_info;
HWRM_PREP(&req, HWRM_FUNC_QCFG, BNXT_USE_CHIMP_MB);
req.fid = rte_cpu_to_le_16(0xffff);
/* Hard Coded.. 0xfff VLAN ID mask */
bp->vlan = rte_le_to_cpu_16(resp->vlan) & 0xfff;
+
+ svif_info = rte_le_to_cpu_16(resp->svif_info);
+ if (svif_info & HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_VALID)
+ bp->func_svif = svif_info &
+ HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_MASK;
+
flags = rte_le_to_cpu_16(resp->flags);
if (BNXT_PF(bp) && (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST))
bp->flags |= BNXT_FLAG_MULTI_HOST;
return rc;
}
+int bnxt_hwrm_port_mac_qcfg(struct bnxt *bp)
+{
+ struct hwrm_port_mac_qcfg_input req = {0};
+ struct hwrm_port_mac_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
+ uint16_t port_svif_info;
+ int rc;
+
+ bp->port_svif = BNXT_SVIF_INVALID;
+
+ HWRM_PREP(&req, HWRM_PORT_MAC_QCFG, BNXT_USE_CHIMP_MB);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
+
+ HWRM_CHECK_RESULT();
+
+ port_svif_info = rte_le_to_cpu_16(resp->port_svif_info);
+ if (port_svif_info &
+ HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_VALID)
+ bp->port_svif = port_svif_info &
+ HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_MASK;
+
+ HWRM_UNLOCK();
+
+ return 0;
+}
+
static void copy_func_cfg_to_qcaps(struct hwrm_func_cfg_input *fcfg,
struct hwrm_func_qcaps_output *qcaps)
{
int bnxt_hwrm_port_clr_stats(struct bnxt *bp);
int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on);
int bnxt_hwrm_port_led_qcaps(struct bnxt *bp);
+int bnxt_hwrm_port_mac_qcfg(struct bnxt *bp);
int bnxt_hwrm_func_cfg_vf_set_flags(struct bnxt *bp, uint16_t vf,
uint32_t flags);
void vf_vnic_set_rxmask_cb(struct bnxt_vnic_info *vnic, void *flagp);