DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Kinsella, Ray" <mdr@ashroe.eu>
To: Rongwei Liu <rongweil@nvidia.com>,
	matan@nvidia.com, viacheslavo@nvidia.com, orika@nvidia.com,
	thomas@monjalon.net
Cc: dev@dpdk.org, rasland@nvidia.com, Jiawei Wang <jiaweiw@nvidia.com>
Subject: Re: [dpdk-dev] [RFC 1/1] net/mlx5: set txq affinity in round-robin
Date: Mon, 13 Sep 2021 13:11:15 +0100	[thread overview]
Message-ID: <a5ecd69c-cbd8-2a5d-da2b-f4e380303980@ashroe.eu> (raw)
In-Reply-To: <20210910042347.12820-2-rongweil@nvidia.com>



On 10/09/2021 05:23, Rongwei Liu wrote:
> Previously, we set txq affinity to 0 and let firmware
> to perform round-robin when bonding. Firmware uses a
> global counter to assign txq affinity to different
> physical ports accord to remainder after division.
> 
> There are three dis-advantages:
> 1. The global counter is shared between kernel and dpdk.
> 2. After restarting pmd or port, the previous counter value
> is reused, so the new affinity is unpredictable.
> 3. There is no way to get what affinity is set by firmware.
> 
> In this update, we will create several TISs up to the
> number of bonding ports and bind each TIS to one PF port.
> 
> For each port, it will start to pick up TIS using its port
> index. Upper layer application can quickly calculate each txq's
> affinity without querying.
> 
> At DPDK layer, when creating txq with 2 bonding ports, the
> affinity is set like:
> port 0: 1-->2-->1-->2
> port 1: 2-->1-->2-->1
> port 2: 1-->2-->1-->2
> 
> Note: Only applicable to Devx api.
> 
> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
> Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
> ---
>  drivers/common/mlx5/mlx5_devx_cmds.c | 38 ++++++++++++++++++++++
>  drivers/common/mlx5/mlx5_devx_cmds.h | 12 +++++++
>  drivers/common/mlx5/mlx5_prm.h       | 26 +++++++++++++++
>  drivers/common/mlx5/version.map      |  1 +
>  drivers/net/mlx5/linux/mlx5_os.c     | 37 ++++++++++++++++++++++
>  drivers/net/mlx5/mlx5.c              | 17 +++-------
>  drivers/net/mlx5/mlx5.h              |  8 ++++-
>  drivers/net/mlx5/mlx5_devx.c         | 47 ++++++++++++++++++++++++++--
>  drivers/net/mlx5/mlx5_tx.h           |  1 +
>  drivers/net/mlx5/mlx5_txpp.c         |  4 +--
>  10 files changed, 174 insertions(+), 17 deletions(-)
> 
Acked-by: Ray Kinsella <mdr@ashroe.eu>

      reply	other threads:[~2021-09-13 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  4:23 [dpdk-dev] [RFC 0/1] " Rongwei Liu
2021-09-10  4:23 ` [dpdk-dev] [RFC 1/1] " Rongwei Liu
2021-09-13 12:11   ` Kinsella, Ray [this message]

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=a5ecd69c-cbd8-2a5d-da2b-f4e380303980@ashroe.eu \
    --to=mdr@ashroe.eu \
    --cc=dev@dpdk.org \
    --cc=jiaweiw@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=rongweil@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /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).