[dpdk-dev] [PATCH v2] ethdev: keep count of allocated and used representor ranges

Thomas Monjalon thomas at monjalon.net
Sat Jul 10 11:46:36 CEST 2021


05/07/2021 13:07, Xueming(Steven) Li:
> From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> > From: Viacheslav Galaktionov <viacheslav.galaktionov at oktetlabs.ru>
> > 
> > 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 at dpdk.org
> > 
> > Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov at oktetlabs.ru>
> > Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> 
> Reviewed-by: Xueming Li <xuemingl at nvidia.com>

Applied, thanks.





More information about the dev mailing list