X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fcnxk%2Fcn10k_rte_flow.c;h=529fb0e4b7c8e37553f109af938b464b17c20313;hb=28968ad1d39260678e7e26a2901a396a7fb34351;hp=8c87452934eba9205e9aa2bacb4591d46b4dfcfa;hpb=6af19a9d89bf5f1d27c12b88c5da31e4f737ecf8;p=dpdk.git diff --git a/drivers/net/cnxk/cn10k_rte_flow.c b/drivers/net/cnxk/cn10k_rte_flow.c index 8c87452934..529fb0e4b7 100644 --- a/drivers/net/cnxk/cn10k_rte_flow.c +++ b/drivers/net/cnxk/cn10k_rte_flow.c @@ -36,20 +36,20 @@ cn10k_mtr_configure(struct rte_eth_dev *eth_dev, for (i = 0; actions[i].type != RTE_FLOW_ACTION_TYPE_END; i++) { if (actions[i].type == RTE_FLOW_ACTION_TYPE_METER) { mtr_conf = (const struct rte_flow_action_meter - *)(actions->conf); + *)(actions[i].conf); mtr_id = mtr_conf->mtr_id; is_mtr_act = true; } if (actions[i].type == RTE_FLOW_ACTION_TYPE_QUEUE) { q_conf = (const struct rte_flow_action_queue - *)(actions->conf); + *)(actions[i].conf); if (is_mtr_act) nix_mtr_rq_update(eth_dev, mtr_id, 1, &q_conf->index); } if (actions[i].type == RTE_FLOW_ACTION_TYPE_RSS) { rss_conf = (const struct rte_flow_action_rss - *)(actions->conf); + *)(actions[i].conf); if (is_mtr_act) nix_mtr_rq_update(eth_dev, mtr_id, rss_conf->queue_num, @@ -98,7 +98,7 @@ cn10k_rss_action_validate(struct rte_eth_dev *eth_dev, return -EINVAL; } - if (eth_dev->data->dev_conf.rxmode.mq_mode != ETH_MQ_RX_RSS) { + if (eth_dev->data->dev_conf.rxmode.mq_mode != RTE_ETH_MQ_RX_RSS) { plt_err("multi-queue mode is disabled"); return -ENOTSUP; } @@ -171,7 +171,6 @@ cn10k_flow_create(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr, return NULL; } } - for (i = 0; actions[i].type != RTE_FLOW_ACTION_TYPE_END; i++) { if (actions[i].type == RTE_FLOW_ACTION_TYPE_METER) { mtr = (const struct rte_flow_action_meter *)actions[i] @@ -249,7 +248,7 @@ cn10k_flow_destroy(struct rte_eth_dev *eth_dev, struct rte_flow *rte_flow, mtr_id = flow->mtr_id; rc = cnxk_flow_destroy(eth_dev, flow, error); - if (!rc) { + if (!rc && mtr_id != ROC_NIX_MTR_ID_INVALID) { rc = cn10k_mtr_destroy(eth_dev, mtr_id); if (rc) { rte_flow_error_set(error, ENXIO,