diff options
author | Damjan Marion <damarion@cisco.com> | 2022-01-18 13:42:24 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-01-18 18:34:28 +0000 |
commit | c2a6bf0c5001ba293d211196f29646e08eb445ba (patch) | |
tree | 07f3a822fe7fa2b847d8b67bef2297190559fd2c /src/plugins | |
parent | 198ddad7fab679f6cc93c52af99155ac2e0be8fe (diff) |
dpdk: limit number of TX queues to max supported
Also improve logging....
Type: fix
Change-Id: I3d3aee52cd45e59ecd6ce13bd516c66559638fec
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/dpdk/device/init.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index 096b8d382fe..6c34981b2a2 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -360,9 +360,16 @@ dpdk_lib_init (dpdk_main_t * dm) xd->name = format (xd->name, "/%d", di.switch_info.port_id); /* number of RX and TX queues */ - if (devconf->num_tx_queues > 0 && - devconf->num_tx_queues < xd->conf.n_tx_queues) - xd->conf.n_tx_queues = devconf->num_tx_queues; + if (devconf->num_tx_queues > 0) + { + if (di.max_tx_queues < devconf->num_tx_queues) + dpdk_log_warn ("[%u] Configured number of TX queues (%u) is " + "bigger than maximum supported (%u)", + port_id, devconf->num_tx_queues, di.max_tx_queues); + xd->conf.n_tx_queues = devconf->num_tx_queues; + } + + xd->conf.n_tx_queues = clib_min (di.max_tx_queues, xd->conf.n_tx_queues); if (devconf->num_rx_queues > 1 && di.max_rx_queues >= devconf->num_rx_queues) @@ -379,6 +386,8 @@ dpdk_lib_init (dpdk_main_t * dm) format_dpdk_rss_hf_name, unsupported_bits); } xd->conf.rss_hf &= di.flow_type_rss_offloads; + dpdk_log_debug ("[%u] rss_hf: %U", port_id, format_dpdk_rss_hf_name, + xd->conf.rss_hf); } xd->driver_frame_overhead = @@ -407,6 +416,11 @@ dpdk_lib_init (dpdk_main_t * dm) else if (dr && dr->n_tx_desc) xd->conf.n_tx_desc = dr->n_tx_desc; + dpdk_log_debug ( + "[%u] n_rx_queues: %u n_tx_queues: %u n_rx_desc: %u n_tx_desc: %u", + port_id, xd->conf.n_rx_queues, xd->conf.n_tx_queues, + xd->conf.n_rx_desc, xd->conf.n_tx_desc); + vec_validate_aligned (xd->rx_queues, xd->conf.n_rx_queues - 1, CLIB_CACHE_LINE_BYTES); |