summaryrefslogtreecommitdiffstats
path: root/examples/bbdev_app/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bbdev_app/main.c')
-rw-r--r--examples/bbdev_app/main.c16
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",