diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-08-14 18:52:30 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-08-14 18:53:17 +0100 |
commit | b63264c8342e6a1b6971c79550d2af2024b6a4de (patch) | |
tree | 83114aac64286fe616506c0b3dfaec2ab86ef835 /examples/bbdev_app | |
parent | ca33590b6af032bff57d9cc70455660466a654b2 (diff) |
New upstream version 18.08upstream/18.08
Change-Id: I32fdf5e5016556d9c0a6d88ddaf1fc468961790a
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples/bbdev_app')
-rw-r--r-- | examples/bbdev_app/main.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index 3c452569..045a190b 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -64,11 +64,7 @@ static const struct rte_eth_conf port_conf = { .mq_mode = ETH_MQ_RX_NONE, .max_rx_pkt_len = ETHER_MAX_LEN, .split_hdr_size = 0, - .header_split = 0, /**< Header Split disabled */ - .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 */ + .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, @@ -1017,7 +1013,7 @@ int main(int argc, char **argv) { int ret; - unsigned int nb_bbdevs, nb_ports, flags, lcore_id; + unsigned int nb_bbdevs, flags, lcore_id; void *sigret; struct app_config_params app_params = def_app_config; struct rte_mempool *ethdev_mbuf_mempool, *bbdev_mbuf_mempool; @@ -1079,12 +1075,10 @@ main(int argc, char **argv) nb_bbdevs, app_params.bbdev_id); printf("Number of bbdevs detected: %d\n", nb_bbdevs); - /* Get the number of available ethdev devices */ - nb_ports = rte_eth_dev_count(); - if (nb_ports <= app_params.port_id) + if (!rte_eth_dev_is_valid_port(app_params.port_id)) rte_exit(EXIT_FAILURE, - "%u ports detected, cannot use port with ID %u!\n", - nb_ports, app_params.port_id); + "cannot use port with ID %u!\n", + app_params.port_id); /* create the mbuf mempool for ethdev pkts */ ethdev_mbuf_mempool = rte_pktmbuf_pool_create("ethdev_mbuf_pool", |