~dannf/ubuntu/+source/linux/+git/linux:mlx-steering

Last commit made on 2022-03-31
Get this branch:
git clone -b mlx-steering https://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux
Only dann frazier can upload to this branch. If you are dann frazier please log in for upload directions.

Branch merges

Branch information

Name:
mlx-steering
Repository:
lp:~dannf/ubuntu/+source/linux/+git/linux

Recent commits

833ab1b... by dann frazier

UBUNTU: Ubuntu-5.15.0-23.23+lp1966194.2

Signed-off-by: dann frazier <email address hidden>

1fcc0f2... by Yevgeny Kliteynik <email address hidden>

net/mlx5: DR, Add support for ConnectX-7 steering

BugLink: https://bugs.launchpad.net/bugs/1966194

Add support for a new SW format version that is implemented by
ConnectX-7.

Except for several differences, the STEv2 is identical to STEv1, so for
most callbacks the STEv2 context struct will call STEv1 functions.

Signed-off-by: Yevgeny Kliteynik <email address hidden>
Reviewed-by: Alex Vesker <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 6862c787c7e88df490675ed781dc9052dba88a56)
Signed-off-by: dann frazier <email address hidden>

b6636fc... by Dima Chumak <email address hidden>

net/mlx5: Introduce software defined steering capabilities

BugLink: https://bugs.launchpad.net/bugs/1966194

There are two different internal steering modes, abstracted from the
rest of the driver. In order to keep upper layer of the driver agnostic
to the differences in capabilities of the steering modes, this patch
introduces mlx5_fs_get_capabilities() API to check if a certain software
defined capability is supported. It differs from the capabilities
exposed by the hardware, as it takes into account the flow steering mode
(SMFS/DMFS) currently enabled.

This implementation supports only two capability flags:

  MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX
  MLX5_FLOW_STEERING_CAP_VLAN_POP_ON_TX

They map to DR_ACTION_STATE_PUSH_VLAN and DR_ACTION_STATE_POP_VLAN
actions, implemented in SW steering earlier in commit f5e22be534e0
("net/mlx5: DR, Split modify VLAN state to separate pop/push states").
Which enables using of pop/push vlan without restrictions, e.g. doing
vlan pop on TX and RX, compared to FW steering that supports only vlan
pop on RX and push on TX.

Other capabilities can be added in the future.

Signed-off-by: Dima Chumak <email address hidden>
Reviewed-by: Mark Bloch <email address hidden>
Reviewed-by: Yevgeny Kliteynik <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(backported from commit 8348b71ccd921d0bff21b6f480ecc1e3a5033359)
[ dannf: minor context adjustmens in fs_cmd.* ]
Signed-off-by: dann frazier <email address hidden>

33bf702... by Yevgeny Kliteynik <email address hidden>

net/mlx5: DR, Refactor ste_ctx handling for STE v0/1

BugLink: https://bugs.launchpad.net/bugs/1966194

As preparation for supporting ConnectX-7, this patches changes handling
of ste_ctx handling for existing STE v0 and V1:
 - each context is now a static struct, and it has a corresponding getter
 - v0 and v1 were extended to contain the fields that are required for
   integrating STEv2.

Signed-off-by: Yevgeny Kliteynik <email address hidden>
Reviewed-by: Alex Vesker <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 638a07f1090ea79fa6720b4d0265c6f8206f0c1b)
Signed-off-by: dann frazier <email address hidden>

410ba72... by Yevgeny Kliteynik <email address hidden>

net/mlx5: DR, Rename action modify fields to reflect naming in HW spec

BugLink: https://bugs.launchpad.net/bugs/1966194

As preparation for supporting ConnectX-7, rename action modify fields
steering registers from arbitrary names to the names that reflect the
corresponding naming and location of the steering registers in HW.
These registers mapping has changed in ConnectX-7, so the renaming allows
to keep track of their mapping better.

Signed-off-by: Yevgeny Kliteynik <email address hidden>
Reviewed-by: Alex Vesker <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 75a3926ca6a434651d4086a8a9152c1da7d7852e)
Signed-off-by: dann frazier <email address hidden>

b2a83ce... by Yevgeny Kliteynik <email address hidden>

net/mlx5: DR, Fix handling of different actions on the same STE in STEv1

BugLink: https://bugs.launchpad.net/bugs/1966194

Fix handling of various conditions in set_actions_rx/tx that check
whether different actions can be on the same STE.

Signed-off-by: Yevgeny Kliteynik <email address hidden>
Reviewed-by: Alex Vesker <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit bdc3ab5795a6466f3fb2aa54198081e0d9c0b64c)
Signed-off-by: dann frazier <email address hidden>

f1f288c... by Yevgeny Kliteynik <email address hidden>

net/mlx5: DR, Remove unneeded comments

BugLink: https://bugs.launchpad.net/bugs/1966194

Remove two comments that were erroneously left in the code.

Signed-off-by: Yevgeny Kliteynik <email address hidden>
Reviewed-by: Alex Vesker <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 11659ef8d28efb7e7b8011815f188de31d6647dd)
Signed-off-by: dann frazier <email address hidden>

028870b... by Yevgeny Kliteynik <email address hidden>

net/mlx5: DR, Add support for matching on Internet Header Length (IHL)

BugLink: https://bugs.launchpad.net/bugs/1966194

Add support for matching on new field - Internet Header Length (IHL).

Signed-off-by: Muhammad Sammar <email address hidden>
Signed-off-by: Yevgeny Kliteynik <email address hidden>
Reviewed-by: Alex Vesker <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 5c422bfad2fbab96381273e50c7084465199501d)
Signed-off-by: dann frazier <email address hidden>

2a69ff7... by Yevgeny Kliteynik <email address hidden>

net/mlx5: DR, Fix slab-out-of-bounds in mlx5_cmd_dr_create_fte

BugLink: https://bugs.launchpad.net/bugs/1966194

When adding a rule with 32 destinations, we hit the following out-of-band
access issue:

  BUG: KASAN: slab-out-of-bounds in mlx5_cmd_dr_create_fte+0x18ee/0x1e70

This patch fixes the issue by both increasing the allocated buffers to
accommodate for the needed actions and by checking the number of actions
to prevent this issue when a rule with too many actions is provided.

Fixes: 1ffd498901c1 ("net/mlx5: DR, Increase supported num of actions to 32")
Signed-off-by: Yevgeny Kliteynik <email address hidden>
Reviewed-by: Alex Vesker <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 0aec12d97b2036af0946e3d582144739860ac07b)
Signed-off-by: dann frazier <email address hidden>

bffe6ab... by Yevgeny Kliteynik <email address hidden>

net/mlx5: Set SMFS as a default steering mode if device supports it

BugLink: https://bugs.launchpad.net/bugs/1966194

Set SMFS (SW-managed flow steering) as a default steering mode
instead of DMFS (device-managed flow steering)

In SMFS, the driver writes the STEs (Steering Table Entries) directly
to the device's ICM, which allows for a higher rule insertion rate
than through using FW command interface, as it is done in DMFS.

SMFS/DMFS steering modes can be configured through devlink param
'flow_steering_mode'. The possible values are 'smfs' or 'dmfs'.
The desired 'flow_steering_mode' param value should be set before
enabling switchdev mode.

Example:

  # devlink dev param set pci/0000:05:00.0 name flow_steering_mode smfs
  # devlink dev eswitch set pci/0000:05:00.0 mode switchdev

Signed-off-by: Yevgeny Kliteynik <email address hidden>
(cherry picked from commit aa36c94853b2bcc4953e065c462deb1ade7f55be)
Signed-off-by: dann frazier <email address hidden>