RFC net/mlx5: set txq affinity in round-robin
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest1 patch 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | net/mlx5: set txq affinity in round-robindrivers/ drivers/ drivers/ +7 more | +174 | 1 reply |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Ray Kinsella |
|---|---|
| 1/1 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [dpdk-dev] [RFC 0/1] net/mlx5: set txq affinity in round-robin
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(-)
Signature · 1 line
2.27.0