Skip to content

Commit

Permalink
net/mlx5: HWS, added API and enabled HWS support
Browse files Browse the repository at this point in the history
Enabling HWS support in the mlx5 driver:
 - added HWS API header
 - added HWS files in the mlx5 driver makefile
 - added kconfig flag that enables HWS compilation

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 2ca6259 commit 510f9f6
Show file tree
Hide file tree
Showing 6 changed files with 994 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ Enabling the driver and kconfig options

| Build support for software-managed steering in the NIC.
**CONFIG_MLX5_HW_STEERING=(y/n)**

| Build support for hardware-managed steering in the NIC.
**CONFIG_MLX5_TC_CT=(y/n)**

Expand Down
10 changes: 10 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ config MLX5_SW_STEERING
help
Build support for software-managed steering in the NIC.

config MLX5_HW_STEERING
bool "Mellanox Technologies hardware-managed steering"
depends on MLX5_CORE_EN && MLX5_ESWITCH
default y
help
Build support for Hardware-Managed Flow Steering (HMFS) in the NIC.
HMFS is a new approach to managing steering rules where STEs are
written to ICM by HW (as opposed to SW in software-managed steering),
which allows higher rate of rule insertion.

config MLX5_SF
bool "Mellanox Technologies subfunction device support using auxiliary device"
depends on MLX5_CORE && MLX5_CORE_EN
Expand Down
21 changes: 21 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,27 @@ mlx5_core-$(CONFIG_MLX5_SW_STEERING) += steering/dr_domain.o steering/dr_table.o
steering/dr_action.o steering/fs_dr.o \
steering/dr_definer.o steering/dr_ptrn.o \
steering/dr_arg.o steering/dr_dbg.o lib/smfs.o

#
# HW Steering
#
mlx5_core-$(CONFIG_MLX5_HW_STEERING) += steering/hws/mlx5hws_cmd.o \
steering/hws/mlx5hws_context.o \
steering/hws/mlx5hws_pat_arg.o \
steering/hws/mlx5hws_buddy.o \
steering/hws/mlx5hws_pool.o \
steering/hws/mlx5hws_table.o \
steering/hws/mlx5hws_action.o \
steering/hws/mlx5hws_rule.o \
steering/hws/mlx5hws_matcher.o \
steering/hws/mlx5hws_send.o \
steering/hws/mlx5hws_definer.o \
steering/hws/mlx5hws_bwc.o \
steering/hws/mlx5hws_debug.o \
steering/hws/mlx5hws_vport.o \
steering/hws/mlx5hws_bwc_complex.o


#
# SF device
#
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/steering/hws/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-only
subdir-ccflags-y += -I$(src)/..
Loading

0 comments on commit 510f9f6

Please sign in to comment.