DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC 0/1] net/mlx5: set txq affinity in round-robin
@ 2021-09-10  4:23 Rongwei Liu
  2021-09-10  4:23 ` [dpdk-dev] [RFC 1/1] " Rongwei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Rongwei Liu @ 2021-09-10  4:23 UTC (permalink / raw)
  To: matan, viacheslavo, orika, thomas; +Cc: dev, rasland

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.

Rongwei Liu (1):
  net/mlx5: set txq affinity in round-robin

 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(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-13 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  4:23 [dpdk-dev] [RFC 0/1] net/mlx5: set txq affinity in round-robin Rongwei Liu
2021-09-10  4:23 ` [dpdk-dev] [RFC 1/1] " Rongwei Liu
2021-09-13 12:11   ` Kinsella, Ray

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).