X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd-jobstats%2Fmain.c;h=9893620676377d0baba431e925b4add617a0e5c8;hb=cefa431162fcef7f1ef0804beb25d7a9883fc54a;hp=dd9201b258b10309770e4c1fb6479e2a48378605;hpb=f03723017a2a5ea421df821eb0ff9a0bfcacff4f;p=dpdk.git diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c index dd9201b258..9893620676 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -38,7 +38,6 @@ #include #include -#include #include #include #include @@ -46,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -67,6 +65,7 @@ #include #include #include +#include #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 @@ -126,7 +125,7 @@ static const struct rte_eth_conf port_conf = { .hw_ip_checksum = 0, /**< IP checksum offload disabled */ .hw_vlan_filter = 0, /**< VLAN filtering disabled */ .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ - .hw_strip_crc = 0, /**< CRC stripped by hardware */ + .hw_strip_crc = 1, /**< CRC stripped by hardware */ }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, @@ -709,7 +708,7 @@ l2fwd_parse_args(int argc, char **argv) argv[optind-1] = prgname; ret = optind-1; - optind = 0; /* reset getopt lib */ + optind = 1; /* reset getopt lib */ return ret; } @@ -883,6 +882,13 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "Cannot configure device: err=%d, port=%u\n", ret, (unsigned) portid); + ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd, + &nb_txd); + if (ret < 0) + rte_exit(EXIT_FAILURE, + "Cannot adjust number of descriptors: err=%d, port=%u\n", + ret, (unsigned) portid); + rte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]); /* init one RX queue */