int bnxt_flow_stats_req(struct bnxt *bp);
int bnxt_flow_stats_cnt(struct bnxt *bp);
uint32_t bnxt_get_speed_capabilities(struct bnxt *bp);
+
+int
+bnxt_filter_ctrl_op(struct rte_eth_dev *dev,
+ enum rte_filter_type filter_type,
+ enum rte_filter_op filter_op, void *arg);
#endif
return ret;
}
-static int
+int
bnxt_filter_ctrl_op(struct rte_eth_dev *dev,
enum rte_filter_type filter_type,
enum rte_filter_op filter_op, void *arg)
struct bnxt *bp = dev->data->dev_private;
int ret = 0;
- ret = is_bnxt_in_error(dev->data->dev_private);
+ if (BNXT_ETH_DEV_IS_REPRESENTOR(dev)) {
+ struct bnxt_vf_representor *vfr = dev->data->dev_private;
+ bp = vfr->parent_dev->data->dev_private;
+ }
+
+ ret = is_bnxt_in_error(bp);
if (ret)
return ret;
.dev_stop = bnxt_vf_rep_dev_stop_op,
.stats_get = bnxt_vf_rep_stats_get_op,
.stats_reset = bnxt_vf_rep_stats_reset_op,
+ .filter_ctrl = bnxt_filter_ctrl_op
};
uint16_t
pthread_mutex_unlock(&parent->rep_info->vfr_lock);
return rc;
-
- return 0;
}
int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params)
struct bnxt_ulp_context *
bnxt_ulp_eth_dev_ptr2_cntxt_get(struct rte_eth_dev *dev)
{
- struct bnxt *bp;
+ struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
+
+ if (BNXT_ETH_DEV_IS_REPRESENTOR(dev)) {
+ struct bnxt_vf_representor *vfr = dev->data->dev_private;
+ bp = vfr->parent_dev->data->dev_private;
+ }
- bp = (struct bnxt *)dev->data->dev_private;
if (!bp) {
BNXT_TF_DBG(ERR, "Bnxt private data is not initialized\n");
return NULL;