Subject: [pull request][net-next v0 00/16] mlx5 updates 2021-12-14

From: Saeed Mahameed <[email-masked]>
Date: Tue, 14 Dec 2021 21:32:44 -0800

From: Saeed Mahameed <[email-masked]>

Hi Dave, Hi Jakub,

This series provides refactoring to the TC actions parsing code we have
in the driver to help improving driver structure and extensibility for
future actions support.

For more information please see tag log below.

Please pull and let me know if there is any problem.

Thanks,
Saeed.

The following changes since commit 6cf7a1ac0fedad8a70c050ade8a27a2071638500:

  Merge branch 'net-dsa-hellcreek-fix-handling-of-mgmt-protocols' (2021-12-14 18:46:31 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2021-12-14

for you to fetch changes up to 35bb5242148fa16fd5b2f28b508e0c031e90c672:

  net/mlx5e: Move goto action checks into tc_action goto post parse op (2021-12-14 21:29:46 -0800)

----------------------------------------------------------------
mlx5-updates-2021-12-14

Parsing Infrastructure for TC actions:

The series introduce a TC action infrastructure to help
parsing TC actions in a generic way for both FDB and NIC rules.

To help maintain the parsing code of TC actions, we the parsing code to
action parser per action TC type in separate files, instead of having one
big switch case loop, duplicated between FDB and NIC parsers as before this
patchset.

Each TC flow_action->id is represented by a dedicated mlx5e_tc_act handler
which has callbacks to check if the specific action is offload supported and
to parse the specific action.

We move each case (TC action) handling into the specific handler, which is
responsible for parsing and determining if the action is supported.

----------------------------------------------------------------
Roi Dayan (16):
      net/mlx5e: Add tc action infrastructure
      net/mlx5e: Add goto to tc action infra
      net/mlx5e: Add tunnel encap/decap to tc action infra
      net/mlx5e: Add csum to tc action infra
      net/mlx5e: Add pedit to tc action infra
      net/mlx5e: Add vlan push/pop/mangle to tc action infra
      net/mlx5e: Add mpls push/pop to tc action infra
      net/mlx5e: Add mirred/redirect to tc action infra
      net/mlx5e: Add ct to tc action infra
      net/mlx5e: Add sample and ptype to tc_action infra
      net/mlx5e: Add redirect ingress to tc action infra
      net/mlx5e: TC action parsing loop
      net/mlx5e: Move sample attr allocation to tc_action sample parse op
      net/mlx5e: Add post_parse() op to tc action infrastructure
      net/mlx5e: Move vlan action chunk into tc action vlan post parse op
      net/mlx5e: Move goto action checks into tc_action goto post parse op

 drivers/net/ethernet/mellanox/mlx5/core/Makefile   |    9 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/accept.c |   31 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/act.c    |  103 ++
 .../ethernet/mellanox/mlx5/core/en/tc/act/act.h    |   75 ++
 .../ethernet/mellanox/mlx5/core/en/tc/act/csum.c   |   61 ++
 .../net/ethernet/mellanox/mlx5/core/en/tc/act/ct.c |   50 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/drop.c   |   30 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/goto.c   |  122 +++
 .../ethernet/mellanox/mlx5/core/en/tc/act/mark.c   |   35 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/mirred.c |  315 ++++++
 .../mellanox/mlx5/core/en/tc/act/mirred_nic.c      |   51 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/mpls.c   |   86 ++
 .../ethernet/mellanox/mlx5/core/en/tc/act/pedit.c  |  165 +++
 .../ethernet/mellanox/mlx5/core/en/tc/act/pedit.h  |   32 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/ptype.c  |   35 +
 .../mlx5/core/en/tc/act/redirect_ingress.c         |   79 ++
 .../ethernet/mellanox/mlx5/core/en/tc/act/sample.c |   51 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/trap.c   |   38 +
 .../ethernet/mellanox/mlx5/core/en/tc/act/tun.c    |   61 ++
 .../ethernet/mellanox/mlx5/core/en/tc/act/vlan.c   |  218 ++++
 .../ethernet/mellanox/mlx5/core/en/tc/act/vlan.h   |   30 +
 .../mellanox/mlx5/core/en/tc/act/vlan_mangle.c     |   87 ++
 .../net/ethernet/mellanox/mlx5/core/en/tc_priv.h   |   12 +
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c    | 1073 ++------------------
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.h    |    1 -
 25 files changed, 1855 insertions(+), 995 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/accept.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/csum.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/ct.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/drop.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/goto.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mark.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mirred.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mirred_nic.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mpls.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/pedit.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/pedit.h
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/ptype.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/redirect_ingress.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/sample.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/trap.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/tun.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/vlan.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/vlan.h
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/vlan_mangle.c