Skip to content

Commit

Permalink
dpdk: add a user warning on the change of RX/TX descriptors
Browse files Browse the repository at this point in the history
Ticket: #6739
  • Loading branch information
Lukas Sismis authored and lukashino committed Feb 12, 2024
1 parent 32ed338 commit 1e2b37e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/runmode-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,12 +1477,17 @@ static int DeviceConfigure(DPDKIfaceConfig *iconf)
if (retval < 0)
return retval;

uint16_t tmp_nb_rx_desc = iconf->nb_rx_desc;
uint16_t tmp_nb_tx_desc = iconf->nb_tx_desc;
retval = rte_eth_dev_adjust_nb_rx_tx_desc(
iconf->port_id, &iconf->nb_rx_desc, &iconf->nb_tx_desc);
if (retval != 0) {
SCLogError("%s: failed to adjust device queue descriptors (port %u, err %d)", iconf->iface,
iconf->port_id, retval);
SCLogError("%s: failed to adjust device queue descriptors - (err: %s)", iconf->iface,
rte_strerror(-retval));
SCReturnInt(retval);
} else if (tmp_nb_rx_desc != iconf->nb_rx_desc || tmp_nb_tx_desc != iconf->nb_tx_desc) {
SCLogWarning("%s: device queue descriptors adjusted (RX: from %u to %u, TX: from %u to %u)",
iconf->iface, tmp_nb_rx_desc, iconf->nb_rx_desc, tmp_nb_tx_desc, iconf->nb_tx_desc);
}

retval = iconf->flags & DPDK_MULTICAST ? rte_eth_allmulticast_enable(iconf->port_id)
Expand Down

0 comments on commit 1e2b37e

Please sign in to comment.