mempool: fix name size in mempool structure
Checks
Commit Message
Use correct define as a name array size.
The change breaks ABI and therefore cannot be backported to
stable branches.
Fixes: 38c9817ee1d8 ("mempool: adjust name size in related data types")
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
lib/mempool/rte_mempool.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
Comments
On Wed, Oct 13, 2021 at 10:57 AM Andrew Rybchenko
<andrew.rybchenko@oktetlabs.ru> wrote:
>
> Use correct define as a name array size.
>
> The change breaks ABI and therefore cannot be backported to
> stable branches.
>
> Fixes: 38c9817ee1d8 ("mempool: adjust name size in related data types")
>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Good catch, I guess we can clean ring too, quick grep:
lib/ring/rte_ring_core.h-struct rte_ring {
lib/ring/rte_ring_core.h- /*
lib/ring/rte_ring_core.h: * Note: this field kept the
RTE_MEMZONE_NAMESIZE size due to ABI
lib/ring/rte_ring_core.h- * compatibility requirements, it
could be changed to RTE_RING_NAMESIZE
lib/ring/rte_ring_core.h: * next time the ABI changes
lib/ring/rte_ring_core.h- */
lib/ring/rte_ring_core.h- char name[RTE_MEMZONE_NAMESIZE]
__rte_cache_aligned;
On 10/13/21 2:07 PM, David Marchand wrote:
> On Wed, Oct 13, 2021 at 10:57 AM Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru> wrote:
>>
>> Use correct define as a name array size.
>>
>> The change breaks ABI and therefore cannot be backported to
>> stable branches.
>>
>> Fixes: 38c9817ee1d8 ("mempool: adjust name size in related data types")
>>
>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
>
> Good catch, I guess we can clean ring too, quick grep:
>
> lib/ring/rte_ring_core.h-struct rte_ring {
> lib/ring/rte_ring_core.h- /*
> lib/ring/rte_ring_core.h: * Note: this field kept the
> RTE_MEMZONE_NAMESIZE size due to ABI
> lib/ring/rte_ring_core.h- * compatibility requirements, it
> could be changed to RTE_RING_NAMESIZE
> lib/ring/rte_ring_core.h: * next time the ABI changes
> lib/ring/rte_ring_core.h- */
> lib/ring/rte_ring_core.h- char name[RTE_MEMZONE_NAMESIZE]
> __rte_cache_aligned;
>
>
Yes. I've not bothered to grep... Cc maintainers.
@David, @Konstantin, or @Honnappa, will you send a patch or
should I do?
<snip>
>
> On 10/13/21 2:07 PM, David Marchand wrote:
> > On Wed, Oct 13, 2021 at 10:57 AM Andrew Rybchenko
> > <andrew.rybchenko@oktetlabs.ru> wrote:
> >>
> >> Use correct define as a name array size.
> >>
> >> The change breaks ABI and therefore cannot be backported to stable
> >> branches.
> >>
> >> Fixes: 38c9817ee1d8 ("mempool: adjust name size in related data
> >> types")
> >>
> >> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> >
> > Reviewed-by: David Marchand <david.marchand@redhat.com>
> >
> > Good catch, I guess we can clean ring too, quick grep:
> >
> > lib/ring/rte_ring_core.h-struct rte_ring {
> > lib/ring/rte_ring_core.h- /*
> > lib/ring/rte_ring_core.h: * Note: this field kept the
> > RTE_MEMZONE_NAMESIZE size due to ABI
> > lib/ring/rte_ring_core.h- * compatibility requirements, it
> > could be changed to RTE_RING_NAMESIZE
> > lib/ring/rte_ring_core.h: * next time the ABI changes
> > lib/ring/rte_ring_core.h- */
> > lib/ring/rte_ring_core.h- char name[RTE_MEMZONE_NAMESIZE]
> > __rte_cache_aligned;
> >
> >
>
> Yes. I've not bothered to grep... Cc maintainers.
>
> @David, @Konstantin, or @Honnappa, will you send a patch or should I do?
I will send a patch
13/10/2021 13:07, David Marchand:
> On Wed, Oct 13, 2021 at 10:57 AM Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru> wrote:
> >
> > Use correct define as a name array size.
> >
> > The change breaks ABI and therefore cannot be backported to
> > stable branches.
> >
> > Fixes: 38c9817ee1d8 ("mempool: adjust name size in related data types")
> >
> > Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
@@ -209,12 +209,7 @@ struct rte_mempool_info {
* The RTE mempool structure.
*/
struct rte_mempool {
- /*
- * Note: this field kept the RTE_MEMZONE_NAMESIZE size due to ABI
- * compatibility requirements, it could be changed to
- * RTE_MEMPOOL_NAMESIZE next time the ABI changes
- */
- char name[RTE_MEMZONE_NAMESIZE]; /**< Name of mempool. */
+ char name[RTE_MEMPOOL_NAMESIZE]; /**< Name of mempool. */
RTE_STD_C11
union {
void *pool_data; /**< Ring or pool to store objects. */