Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-10-14 Thread David Marchand
On Wed, Jul 22, 2020 at 4:13 AM Ting Xu wrote: > > When create softnic hash table with 16 keys, it failed on 32-bit > environment, because the pointer field in structure rte_bucket_4_16 > is only 32 bits. Add a padding field in 32-bit environment to keep > the structure to a multiple of 64 bytes.

Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-07-29 Thread Dumitrescu, Cristian
> -Original Message- > From: David Marchand > Sent: Wednesday, July 29, 2020 1:01 PM > To: Xu, Ting ; Dumitrescu, Cristian > > Cc: dev ; dpdk stable > Subject: Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue > > On Wed, Jul 22, 202

Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-07-29 Thread David Marchand
On Wed, Jul 22, 2020 at 4:13 AM Ting Xu wrote: > > When create softnic hash table with 16 keys, it failed on 32-bit > environment, because the pointer field in structure rte_bucket_4_16 > is only 32 bits. Add a padding field in 32-bit environment to keep > the structure to a multiple of 64 bytes.

Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-07-22 Thread Dumitrescu, Cristian
> -Original Message- > From: Xu, Ting > Sent: Wednesday, July 22, 2020 9:31 AM > To: Dumitrescu, Cristian ; dev@dpdk.org > Cc: sta...@dpdk.org > Subject: RE: [PATCH v4] lib/table: fix cache alignment issue > > Hi, Cristian, > > > -Original Message- > > From: Dumitrescu, Cristi

Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-07-22 Thread Dumitrescu, Cristian
> -Original Message- > From: Xu, Ting > Sent: Wednesday, July 22, 2020 3:16 AM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian ; Xu, Ting > ; sta...@dpdk.org > Subject: [PATCH v4] lib/table: fix cache alignment issue > > When create softnic hash table with 16 keys, it failed on 32-bit >

Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-07-22 Thread Xu, Ting
Hi, Cristian, > -Original Message- > From: Dumitrescu, Cristian > Sent: Wednesday, July 22, 2020 4:27 PM > To: Xu, Ting ; dev@dpdk.org > Cc: sta...@dpdk.org > Subject: RE: [PATCH v4] lib/table: fix cache alignment issue > > > > > +#ifdef RTE_ARCH_64 > > struct rte_bucket_4_32 { > >

Re: [dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-07-22 Thread Dumitrescu, Cristian
> +#ifdef RTE_ARCH_64 > struct rte_bucket_4_32 { > /* Cache line 0 */ > uint64_t signature[4 + 1]; > @@ -46,6 +47,22 @@ struct rte_bucket_4_32 { > /* Cache line 3 */ > uint8_t data[0]; > }; > +#else > +struct rte_bucket_4_32 { > + /* Cache line 0 */ > + uint64_t

[dpdk-dev] [PATCH v4] lib/table: fix cache alignment issue

2020-07-21 Thread Ting Xu
When create softnic hash table with 16 keys, it failed on 32-bit environment, because the pointer field in structure rte_bucket_4_16 is only 32 bits. Add a padding field in 32-bit environment to keep the structure to a multiple of 64 bytes. Apply this to 8-byte and 32-byte key hash function as well