{
int rc = 0;
struct bnxt_vf_representor *vfr = vfr_ethdev->data->dev_private;
+ struct bnxt *parent_bp;
if (!vfr || !vfr->parent_dev) {
PMD_DRV_LOG(ERR,
return -ENOMEM;
}
+ parent_bp = vfr->parent_dev->data->dev_private;
+ if (parent_bp && !parent_bp->ulp_ctx) {
+ PMD_DRV_LOG(ERR,
+ "ulp context not allocated for parent\n");
+ return -EIO;
+ }
+
/* Check if representor has been already allocated in FW */
if (vfr->vfr_tx_cfa_action)
return 0;
return -EINVAL;
}
+ if (!parent_bp->rx_queues) {
+ PMD_DRV_LOG(ERR, "Parent Rx qs not configured yet\n");
+ return -EINVAL;
+ }
+
parent_rxq = parent_bp->rx_queues[queue_idx];
if (!parent_rxq) {
PMD_DRV_LOG(ERR, "Parent RxQ has not been configured yet\n");
return -EINVAL;
}
+ if (!parent_bp->tx_queues) {
+ PMD_DRV_LOG(ERR, "Parent Tx qs not configured yet\n");
+ return -EINVAL;
+ }
+
parent_txq = parent_bp->tx_queues[queue_idx];
if (!parent_txq) {
PMD_DRV_LOG(ERR, "Parent TxQ has not been configured yet\n");
int rc;
if (!BNXT_TRUFLOW_EN(bp) ||
- BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev))
+ BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev) || !bp->ulp_ctx)
return 0;
port_id = bp->eth_dev->data->port_id;