10eaf41d70
In its current state, the API can overflow the user-passed buffer if a new representor range appears between function calls. In order to solve this problem, augment the representor info structure with the numbers of allocated and initialized ranges. This way the users of this structure can be sure they will not overrun the buffer. Fixes: 85e1588ca72f ("ethdev: add API to get representor info") Cc: stable@dpdk.org Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Xueming Li <xuemingl@nvidia.com>