0c6bc8ef70
The previous implementation of rte_kni_alloc() was allocating memzones with a name composed of a fixed string and the interface name. When an application was allocating and deallocating multiple interfaces with different names, memzones were quickly exhausted, even though memzones from deallocated interfaces were never used anymore (unless an interface with the same name was re-allocated). As a result, the application was unable to allocate more KNI interfaces with different names. This patch implements the KNI memzone pool in order to prevent memzone exhaustion when allocating/deallocating KNI interfaces. It adds a new API call, rte_kni_init(max_kni_ifaces) that shall be called before any call to rte_kni_alloc() if KNI is used. The memzones are pre-allocated with interface- independent names so that they can be reused. Signed-off-by: Marc Sune <marc.sune@bisdn.de> Acked-by: Helin Zhang <helin.zhang@intel.com> |
||
---|---|---|
.. | ||
main.c | ||
Makefile |