X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipsec-secgw%2Fipsec.c;h=f8fc49bac1270880a9eadfc04b4a97fcf38e88e0;hb=0109baf1964ca047646d49708263b2f6cbd63571;hp=d1cbdc38d57c7a6b7a21f9d001f19ac174ecf1dc;hpb=5c5c1f99a923986b5b2d2d34e874ca14ffabbcb0;p=dpdk.git diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index d1cbdc38d5..f8fc49bac1 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -189,23 +189,22 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa) .rss_key = rss_key, .rss_key_len = 40, }; - struct rte_eth_dev *eth_dev; + struct rte_eth_dev_info dev_info; uint16_t queue[RTE_MAX_QUEUES_PER_PORT]; struct rte_flow_action_rss action_rss; unsigned int i; unsigned int j; + rte_eth_dev_info_get(sa->portid, &dev_info); sa->action[2].type = RTE_FLOW_ACTION_TYPE_END; /* Try RSS. */ sa->action[1].type = RTE_FLOW_ACTION_TYPE_RSS; sa->action[1].conf = &action_rss; - eth_dev = ctx->device; rte_eth_dev_rss_hash_conf_get(sa->portid, &rss_conf); for (i = 0, j = 0; - i < eth_dev->data->nb_rx_queues; ++i) - if (eth_dev->data->rx_queues[i]) - queue[j++] = i; + i < dev_info.nb_rx_queues; ++i) + queue[j++] = i; action_rss = (struct rte_flow_action_rss){ .types = rss_conf.rss_hf, .key_len = rss_conf.rss_key_len,