Modify l3fwd and related example apps to use locally defined port_conf
instead of global rte_eth_devices which is not a part of public API.
Apps should not be using internal DPDK data structures directly.
Fixes:
1ef9600b2d20 ("examples/l3fwd: convert to ethdev offloads API")
Fixes:
ba8c103d2455 ("examples/l3fwd-acl: convert to new ethdev offloads API")
Fixes:
40df1d7a695d ("examples/l3fwd-power: convert to new ethdev offloads API")
Fixes:
43fc038262b8 ("examples/l3fwd-vf: convert to new ethdev offloads API")
Fixes:
373149c631fe ("examples/performance-thread: convert to new offloads API")
Cc: stable@dpdk.org
Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
fflush(stdout);
/* init RX queues */
for (queue = 0; queue < qconf->n_rx_queue; ++queue) {
- struct rte_eth_dev *dev;
- struct rte_eth_conf *conf;
struct rte_eth_rxconf rxq_conf;
portid = qconf->rx_queue_list[queue].port_id;
queueid = qconf->rx_queue_list[queue].queue_id;
- dev = &rte_eth_devices[portid];
- conf = &dev->data->dev_conf;
if (numa_on)
socketid = (uint8_t)
rte_eth_dev_info_get(portid, &dev_info);
rxq_conf = dev_info.default_rxconf;
- rxq_conf.offloads = conf->rxmode.offloads;
+ rxq_conf.offloads = port_conf.rxmode.offloads;
ret = rte_eth_rx_queue_setup(portid, queueid, nb_rxd,
socketid, &rxq_conf,
pktmbuf_pool[socketid]);
/* init RX queues */
for(queue = 0; queue < qconf->n_rx_queue; ++queue) {
struct rte_eth_rxconf rxq_conf;
- struct rte_eth_dev *dev;
- struct rte_eth_conf *conf;
portid = qconf->rx_queue_list[queue].port_id;
queueid = qconf->rx_queue_list[queue].queue_id;
- dev = &rte_eth_devices[portid];
- conf = &dev->data->dev_conf;
if (numa_on)
socketid = \
rte_eth_dev_info_get(portid, &dev_info);
rxq_conf = dev_info.default_rxconf;
- rxq_conf.offloads = conf->rxmode.offloads;
+ rxq_conf.offloads = port_conf.rxmode.offloads;
ret = rte_eth_rx_queue_setup(portid, queueid, nb_rxd,
socketid, &rxq_conf,
pktmbuf_pool[socketid]);
fflush(stdout);
/* init RX queues */
for(queue = 0; queue < qconf->n_rx_queue; ++queue) {
- struct rte_eth_dev *dev;
- struct rte_eth_conf *conf;
-
portid = qconf->rx_queue_list[queue].port_id;
queueid = qconf->rx_queue_list[queue].queue_id;
- dev = &rte_eth_devices[portid];
- conf = &dev->data->dev_conf;
if (numa_on)
socketid = (uint8_t)rte_lcore_to_socket_id(lcore_id);
rte_eth_dev_info_get(portid, &dev_info);
rxq_conf = dev_info.default_rxconf;
- rxq_conf.offloads = conf->rxmode.offloads;
+ rxq_conf.offloads = port_conf.rxmode.offloads;
ret = rte_eth_rx_queue_setup(portid, queueid, nb_rxd,
socketid, &rxq_conf,
pktmbuf_pool[socketid]);
fflush(stdout);
/* init RX queues */
for(queue = 0; queue < qconf->n_rx_queue; ++queue) {
- struct rte_eth_dev *dev;
- struct rte_eth_conf *conf;
struct rte_eth_rxconf rxq_conf;
portid = qconf->rx_queue_list[queue].port_id;
queueid = qconf->rx_queue_list[queue].queue_id;
- dev = &rte_eth_devices[portid];
- conf = &dev->data->dev_conf;
if (numa_on)
socketid =
rte_eth_dev_info_get(portid, &dev_info);
rxq_conf = dev_info.default_rxconf;
- rxq_conf.offloads = conf->rxmode.offloads;
+ rxq_conf.offloads = port_conf.rxmode.offloads;
if (!per_port_pool)
ret = rte_eth_rx_queue_setup(portid, queueid,
nb_rxd, socketid,
/* init RX queues */
for (queue = 0; queue < rx_thread[i].n_rx_queue; ++queue) {
- struct rte_eth_dev *dev;
- struct rte_eth_conf *conf;
struct rte_eth_rxconf rxq_conf;
portid = rx_thread[i].rx_queue_list[queue].port_id;
queueid = rx_thread[i].rx_queue_list[queue].queue_id;
- dev = &rte_eth_devices[portid];
- conf = &dev->data->dev_conf;
if (numa_on)
socketid = (uint8_t)rte_lcore_to_socket_id(lcore_id);
rte_eth_dev_info_get(portid, &dev_info);
rxq_conf = dev_info.default_rxconf;
- rxq_conf.offloads = conf->rxmode.offloads;
+ rxq_conf.offloads = port_conf.rxmode.offloads;
ret = rte_eth_rx_queue_setup(portid, queueid, nb_rxd,
socketid,
&rxq_conf,