Re: [PATCH v3] net/af_packet: cache align Rx/Tx structs

2024-04-29 Thread Ferruh Yigit
On 4/26/2024 4:41 PM, Tyler Retzlaff wrote: > On Fri, Apr 26, 2024 at 11:05:02AM +0200, Mattias Rönnblom wrote: >> Cache align Rx and Tx queue struct to avoid false sharing. >> >> The RX struct happens to be 64 bytes on x86_64 already, so cache >> alignment has no effect there, but it does on 32-bi

Re: [PATCH v3] net/af_packet: cache align Rx/Tx structs

2024-04-26 Thread Tyler Retzlaff
On Fri, Apr 26, 2024 at 11:05:02AM +0200, Mattias Rönnblom wrote: > Cache align Rx and Tx queue struct to avoid false sharing. > > The RX struct happens to be 64 bytes on x86_64 already, so cache > alignment has no effect there, but it does on 32-bit ISAs. > > The TX struct is 56 bytes on x86_64.

RE: [PATCH v3] net/af_packet: cache align Rx/Tx structs

2024-04-26 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Friday, 26 April 2024 11.05 > > Cache align Rx and Tx queue struct to avoid false sharing. Should an RTE_CACHE_GUARD be added at the end of these two structs? If not, Reviewed-by: Morten Brørup

[PATCH v3] net/af_packet: cache align Rx/Tx structs

2024-04-26 Thread Mattias Rönnblom
Cache align Rx and Tx queue struct to avoid false sharing. The RX struct happens to be 64 bytes on x86_64 already, so cache alignment has no effect there, but it does on 32-bit ISAs. The TX struct is 56 bytes on x86_64. Both structs keep counters, and in the RX case they are updated even for emp