Skip to content

Commit 8481f1a

Browse files
rjarrymaxime-leroy
authored andcommitted
port: return explicit error when requesting too many rxqs
Unlike TX queues which are silently capped to the device maximum, RX queues are explicitly requested by the user. Return EOVERFLOW if the requested count exceeds what the device supports. Signed-off-by: Robin Jarry <rjarry@redhat.com>
1 parent 29a1d6a commit 8481f1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/infra/control/port.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ int port_configure(struct iface_info_port *p, uint16_t n_txq_min) {
9797
if (p->n_rxq == 0)
9898
p->n_rxq = 1;
9999

100+
if (p->n_rxq > info.max_rx_queues)
101+
return errno_set(EOVERFLOW);
102+
100103
// cap number of queues to device maximum
101104
p->n_txq = RTE_MIN(n_txq_min, info.max_tx_queues);
102105

0 commit comments

Comments
 (0)