X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fpacket_ordering%2Fmain.c;h=ca312029e21933234da5437d54fb9679cdc43d51;hb=6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1;hp=676cb6f7176d2acf6bf1f592cbed609ec0ae61a3;hpb=a9dbe180222680edf8c49e86791f972549ce5be3;p=dpdk.git diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index 676cb6f717..ca312029e2 100644 --- a/examples/packet_ordering/main.c +++ b/examples/packet_ordering/main.c @@ -35,11 +35,7 @@ volatile uint8_t quit_signal; static struct rte_mempool *mbuf_pool; -static struct rte_eth_conf port_conf_default = { - .rxmode = { - .ignore_offload_bitfield = 1, - }, -}; +static struct rte_eth_conf port_conf_default; struct worker_thread_args { struct rte_ring *ring_in; @@ -259,7 +255,7 @@ configure_tx_buffers(struct rte_eth_dev_tx_buffer *tx_buffer[]) static inline int configure_eth_port(uint16_t port_id) { - struct ether_addr addr; + struct rte_ether_addr addr; const uint16_t rxRings = 1, txRings = 1; int ret; uint16_t q; @@ -293,7 +289,6 @@ configure_eth_port(uint16_t port_id) } txconf = dev_info.default_txconf; - txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE; txconf.offloads = port_conf.txmode.offloads; for (q = 0; q < txRings; q++) { ret = rte_eth_tx_queue_setup(port_id, q, nb_txd, @@ -430,7 +425,7 @@ rx_thread(struct rte_ring *ring_out) static int worker_thread(void *args_ptr) { - const uint8_t nb_ports = rte_eth_dev_count(); + const uint16_t nb_ports = rte_eth_dev_count_avail(); uint16_t i, ret = 0; uint16_t burst_size = 0; struct worker_thread_args *args; @@ -644,7 +639,7 @@ main(int argc, char **argv) "1 lcore for packet TX\n" "and at least 1 lcore for worker threads\n"); - nb_ports = rte_eth_dev_count(); + nb_ports = rte_eth_dev_count_avail(); if (nb_ports == 0) rte_exit(EXIT_FAILURE, "Error: no ethernet ports detected\n"); if (nb_ports != 1 && (nb_ports & 1))