Feature #7380
opendpdk: provide "auto" option for RX/TX descriptors
Description
By obtaining the information on the amount of available/free hugepages and hugepage size we can deduce the maximum number of RX/TX descriptors. The auto setting could consider the amount of free hugepage allocated memory and divide it by the number of interfaces, that by number of threads, that by direction (RX/TX), by mbuf size (calculated as MTU + Extra) and you have the maximum count of allocated RX/TX descriptors per interface. If we have too much allocated memory it will simply cap at the driver limits. Potentially we can flag cases with too few descriptors.
So e.g. 1024 2MB hugepages == 2048 MB -> / 2 interfaces / 8 queues / 2 directions (RX/TX) / 2200 byte mbuf size (1500B MTU + 600B extra metadata) ~= 29090 descriptors.
This would depend on that every interface needs to have rx/tx descriptors set to auto. For easier configuration it is possible to incorporate a new property "descriptors" which would describe both rx and tx descriptors.
We can also consider an initial check that would first go over all interfaces and detect if:
a) they all have auto-enabled - so the memory is fairly distributed
b) some have a fixed count of descriptors
This is still not optimal setting as we don't get to see the actual maximum number of descriptors as some drivers go only up to 4096 descriptors while others go up to 65k - so potentially this querying would also be included in the auto calculation check.
No data to display