ethdev: allocate max space for internal queue array
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Wed, 13 Oct 2021 13:36:59 +0000 (14:36 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 13 Oct 2021 20:14:58 +0000 (22:14 +0200)
commitc024496ae8c8c075b0d0a3b43119475787b24b45
tree58138328ad88029c1e7eccf929de3725eb1e438f
parent0ead09838370e2813ed2aaa54c94d0d2c2011b94
ethdev: allocate max space for internal queue array

At queue configure stage always allocate space for maximum possible
number (RTE_MAX_QUEUES_PER_PORT) of queue pointers.
That will allow 'fast' inline functions (eth_rx_burst, etc.) to refer
pointer to internal queue data without extra checking of current number
of configured queues.
That would help in future to hide rte_eth_dev and related structures.
It means that from now on, each ethdev port will always consume:
((2*sizeof(uintptr_t))* RTE_MAX_QUEUES_PER_PORT)
bytes of memory for its queue pointers.
With RTE_MAX_QUEUES_PER_PORT==1024 (default value) it is 16KB per port.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Feifei Wang <feifei.wang2@arm.com>
lib/ethdev/rte_ethdev.c