patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Cc: dev@dpdk.org, hofors@lysator.liu.se,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Thomas Monjalon" <thomas@monjalon.net>,
	"John W . Linville" <linville@tuxdriver.com>,
	"Ferruh Yigit" <ferruh.yigit@amd.com>,
	stable@dpdk.org
Subject: Re: [PATCH v3] net/af_packet: cache align Rx/Tx structs
Date: Fri, 26 Apr 2024 08:10:16 -0700	[thread overview]
Message-ID: <20240426081016.7c613114@hermes.local> (raw)
In-Reply-To: <20240426090502.100487-1-mattias.ronnblom@ericsson.com>

On Fri, 26 Apr 2024 11:05:02 +0200
Mattias Rönnblom <mattias.ronnblom@ericsson.com> 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.
> 
> Both structs keep counters, and in the RX case they are updated even
> for empty polls.
> 
> v3: Move __rte_cache_aligned directive to a MSVC-compatible location.
> 
> Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

Looks good.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

If you want to go further with this:
   - could rx and tx rings be next to each other so that any of the lookahead
     in cpu helps, not hurts?
   - what about secondary process support
   - would sendmmsg() and recvmmsg() help for bursting.

  parent reply	other threads:[~2024-04-26 15:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240423090813.94110-1-mattias.ronnblom@ericsson.com>
2024-04-26  7:38 ` [PATCH] " Mattias Rönnblom
2024-04-26  8:27   ` Ferruh Yigit
2024-04-26 10:20     ` Mattias Rönnblom
2024-04-26  9:05   ` [PATCH v3] " Mattias Rönnblom
2024-04-26  9:22     ` Morten Brørup
2024-04-26 15:10     ` Stephen Hemminger [this message]
2024-04-26 15:41     ` Tyler Retzlaff
2024-04-29  8:46       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240426081016.7c613114@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=hofors@lysator.liu.se \
    --cc=linville@tuxdriver.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=mb@smartsharesystems.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).