mempool: fix name size in mempool structure

Message ID 20211013085723.1206789-1-andrew.rybchenko@oktetlabs.ru (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series mempool: fix name size in mempool structure |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional fail Functional Testing issues
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional fail Functional Testing issues

Commit Message

Andrew Rybchenko Oct. 13, 2021, 8:57 a.m. UTC
  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

David Marchand Oct. 13, 2021, 11:07 a.m. UTC | #1
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;
  
Andrew Rybchenko Oct. 13, 2021, 11:14 a.m. UTC | #2
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?
  
Honnappa Nagarahalli Oct. 13, 2021, 5:30 p.m. UTC | #3
<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
  
Thomas Monjalon Oct. 13, 2021, 8:58 p.m. UTC | #4
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.
  

Patch

diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index f57ecbd6fc..04b14d7ae9 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -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. */