Skip to content

Commit

Permalink
net/mlx5: HWS, added backward-compatible API handling
Browse files Browse the repository at this point in the history
Added implementation of backward-compatible (BWC) steering API.
Native HWS API is very different from SWS API:
 - SWS is synchronous (rule creation/deletion API call returns when
   the rule is created/deleted), while HWS is asynchronous (it
   requires polling for completion in order to know when the rule
   creation/deletion happened)
 - SWS manages its own memory (it allocates/frees all the needed
   memory for steering rules, while HWS requires the rules memory
   to be allocated/freed outside the API

In order to make HWS fit the existing fs-core steering API paradigm,
this patch adds implementation of backward-compatible (BWC) steering
API that has the bahaviour similar to SWS: among others, it encompasses
all the rules' memory management and completion polling, presenting
the usual synchronous API for the upper layer.

A user that wishes to utilize the full speed potential of HWS can
call the HWS async API and have rule insertion/deletion batching,
lower memory management overhead, and lower CPU utilization.
Such approach will be taken by the future Connection Tracking.

Note that BWC steering doesn't support yet rules that require more
than one match STE - complex rules.
This support will be added later on.

Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Yevgeny Kliteynik authored and Saeed Mahameed committed Sep 9, 2024
1 parent c61afff commit 2111bb9
Show file tree
Hide file tree
Showing 4 changed files with 1,185 additions and 0 deletions.
Loading

0 comments on commit 2111bb9

Please sign in to comment.