net/mlx5: HWS, Optimize matchers ICM usage
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest10 patches 6 repliesApplied 10/10
- v28 patches 14 repliesSuperseded
- v18 patches 1 replySuperseded
Changes in v3 from the cover letter
- Added patch 4 that does only code refactoring.
- Patch 5: this patch now contains the functional change only, w/o refactoring.
- Patch 7: tracking flow_source in the BWC rule to resolve issue with rule_update of a unidirectional rule.
- Added patch 8 that does code rearranging to prevent forward declaration in the following patch.
- Patch 9: removed forward declaration of function.
Patches in v3 All 10 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | net/mlx5: HWS, remove unused create_dest_array parameterdrivers/ drivers/ drivers/ | +10 | 0 replies | Applied |
| 2/10 | net/mlx5: HWS, remove incorrect commentdrivers/ | +0 | 0 replies | Applied |
| 3/10 | net/mlx5: HWS, Export rule skip logicdrivers/ drivers/ | +7 | 1 reply | Applied |
| 4/10 | net/mlx5: HWS, Refactor rule skip logicdrivers/ | +13 | 1 reply | Applied |
| 5/10 | net/mlx5: HWS, Create STEs directly from matcherdrivers/ drivers/ drivers/ | +41 | 0 replies | Applied |
| 6/10 | net/mlx5: HWS, Decouple matcher RX and TX sizesdrivers/ drivers/ drivers/ +1 more | +104 | 0 replies | Applied |
| 7/10 | net/mlx5: HWS, Track matcher sizes individuallydrivers/ drivers/ | +171 | 1 reply | Applied |
| 8/10 | net/mlx5: HWS, Rearrange to prevent forward declarationdrivers/ | +124 | 1 reply | Applied |
| 9/10 | net/mlx5: HWS, Shrink empty matchersdrivers/ | +65 | 1 reply | Applied |
| 10/10 | net/mlx5: Add HWS as secondary steering modedrivers/ | +2 | 1 reply | Applied |
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by.
| Patch | Simon Horman | Vlad Dogaru | Yevgeny Kliteynik |
|---|---|---|---|
| 1/10 | R-b | ||
| 2/10 | R-b | R-b | |
| 3/10 | R-b | R-b | |
| 4/10 | R-b | R-b | |
| 5/10 | R-b | R-b | |
| 6/10 | R-b | R-b | |
| 7/10 | R-b | R-b | |
| 8/10 | R-b | ||
| 9/10 | R-b | R-b | |
| 10/10 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH net-next v3 00/10] net/mlx5: HWS, Optimize matchers ICM usage
This series optimizes ICM usage for unidirectional rules and empty matchers and with the last patch we make hardware steering the default FDB steering provider for NICs that don't support software steering.
Hardware steering (HWS) uses a type of rule table container (RTC) that is unidirectional, so matchers consist of two RTCs to accommodate bidirectional rules.
This small series enables resizing the two RTCs independently by tracking the number of rules separately. For extreme cases where all rules are unidirectional, this results in saving close to half the memory footprint.
Results for inserting 1M unidirectional rules using a simple module:
Pages Memory
Before this patch: 300k 1.5GiB
After this patch: 160k 900MiB
The 'Pages' column measures the number of 4KiB pages the device requests for itself (the ICM).
The 'Memory' column is the difference between peak usage and baseline usage (before starting the test) as reported by free -h.
In addition, second to last patch of the series handles a case where all the matcher's rules were deleted: the large RTCs of the matcher are no longer required, and we can save some more ICM by shrinking the matcher to its initial size.
Finally the last patch makes hardware steering the default mode when in swichdev for NICs that don't have software steering support.
Changelog
=========
Changes from v1:
- Fixed author on patches 5 and 6.
Changes from v2:
- Added patch 4 that does only code refactoring.
- Patch 5: this patch now contains the functional change only, w/o refactoring.
- Patch 7: tracking flow_source in the BWC rule to resolve issue with rule_update of a unidirectional rule.
- Added patch 8 that does code rearranging to prevent forward declaration in the following patch.
- Patch 9: removed forward declaration of function.
Moshe Shemesh (1):
net/mlx5: Add HWS as secondary steering mode
Vlad Dogaru (6):
net/mlx5: HWS, remove unused create_dest_array parameter net/mlx5: HWS, Export rule skip logic
net/mlx5: HWS, Refactor rule skip logic net/mlx5: HWS, Create STEs directly from matcher net/mlx5: HWS, Decouple matcher RX and TX sizes net/mlx5: HWS, Track matcher sizes individually
Yevgeny Kliteynik (3):
net/mlx5: HWS, remove incorrect comment net/mlx5: HWS, Rearrange to prevent forward declaration net/mlx5: HWS, Shrink empty matchers
.../net/ethernet/mellanox/mlx5/core/fs_core.c | 2 + .../mellanox/mlx5/core/steering/hws/action.c | 7 +- .../mellanox/mlx5/core/steering/hws/bwc.c | 529 ++++++++++++------ .../mellanox/mlx5/core/steering/hws/bwc.h | 15 +- .../mellanox/mlx5/core/steering/hws/debug.c | 20 +- .../mellanox/mlx5/core/steering/hws/fs_hws.c | 15 +- .../mellanox/mlx5/core/steering/hws/matcher.c | 166 ++++-- .../mellanox/mlx5/core/steering/hws/matcher.h | 3 +- .../mellanox/mlx5/core/steering/hws/mlx5hws.h | 36 +- .../mellanox/mlx5/core/steering/hws/rule.c | 34 +- .../mellanox/mlx5/core/steering/hws/rule.h | 3 + 11 files changed, 526 insertions(+), 304 deletions(-)
base-commit: 5f712c3877f99d5b5e4d011955c6467ae0e535a6
Signature · 1 line
2.34.1