mbox series

[net-next,v2,0/2] Marvell Prestera add flower and match all support

Message ID 20210616160145.17376-1-vadym.kochan@plvision.eu (mailing list archive)
Headers show
Series Marvell Prestera add flower and match all support | expand

Message

Vadym Kochan June 16, 2021, 4:01 p.m. UTC
From: Vadym Kochan <vkochan@marvell.com>

Add ACL infrastructure for Prestera Switch ASICs family devices to
offload cls_flower rules to be processed in the HW.

ACL implementation is based on tc filter api. The flower classifier
is supported to configure ACL rules/matches/action.

Supported actions:

    - drop
    - trap
    - pass

Supported dissector keys:

    - indev
    - src_mac
    - dst_mac
    - src_ip
    - dst_ip
    - ip_proto
    - src_port
    - dst_port
    - vlan_id
    - vlan_ethtype
    - icmp type/code

- Introduce matchall filter support
- Add SPAN API to configure port mirroring.
- Add tc mirror action.

At this moment, only mirror (egress) action is supported.

Example:
    tc filter ... action mirred egress mirror dev DEV

v2:
    Fixed "newline at EOF warnings" from "git am" by
        re-applying with --whitespace=fix

    patch #1:
        1) Set TC HW Offload always enabled without disable it     [suggested by Vladimir Oltean]
           by user. It reduced the logic by removing feature
           handling and acl block disable counting. 

    patch #2:
        1) Removed extra not needed diff with prestera_port and    [suggested by Vladimir Oltean]
           prestera_switch  lines exchanging in prestera_acl.h

        2) Fix local variables ordering to reverse chrostmas tree  [suggested by Vladimir Oltean]

        3) Use tc_cls_can_offload_and_chain0() in                  [suggested by Vladimir Oltean]
           prestera_span_replace()

        4) Removed TODO about prio check                           [suggested by Vladimir Oltean]

        5) Rephrase error message if prestera_netdev_check()       [suggested by Vladimir Oltean]
           fails in prestera_span_replace()

Serhiy Boiko (2):
  net: marvell: Implement TC flower offload
  net: marvell: prestera: Add matchall support

 .../net/ethernet/marvell/prestera/Makefile    |   3 +-
 .../net/ethernet/marvell/prestera/prestera.h  |   7 +
 .../ethernet/marvell/prestera/prestera_acl.c  | 376 ++++++++++++++++++
 .../ethernet/marvell/prestera/prestera_acl.h  | 124 ++++++
 .../ethernet/marvell/prestera/prestera_flow.c | 194 +++++++++
 .../ethernet/marvell/prestera/prestera_flow.h |  14 +
 .../marvell/prestera/prestera_flower.c        | 359 +++++++++++++++++
 .../marvell/prestera/prestera_flower.h        |  18 +
 .../ethernet/marvell/prestera/prestera_hw.c   | 361 +++++++++++++++++
 .../ethernet/marvell/prestera/prestera_hw.h   |  23 ++
 .../ethernet/marvell/prestera/prestera_main.c |  34 +-
 .../ethernet/marvell/prestera/prestera_span.c | 239 +++++++++++
 .../ethernet/marvell/prestera/prestera_span.h |  20 +
 13 files changed, 1770 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_acl.c
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_acl.h
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_flow.c
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_flow.h
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_flower.c
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_flower.h
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_span.c
 create mode 100644 drivers/net/ethernet/marvell/prestera/prestera_span.h

Comments

patchwork-bot+netdevbpf@kernel.org June 16, 2021, 8:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 16 Jun 2021 19:01:43 +0300 you wrote:
> From: Vadym Kochan <vkochan@marvell.com>
> 
> Add ACL infrastructure for Prestera Switch ASICs family devices to
> offload cls_flower rules to be processed in the HW.
> 
> ACL implementation is based on tc filter api. The flower classifier
> is supported to configure ACL rules/matches/action.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/2] net: marvell: Implement TC flower offload
    https://git.kernel.org/netdev/net-next/c/8b474a9f6b37
  - [net-next,v2,2/2] net: marvell: prestera: Add matchall support
    https://git.kernel.org/netdev/net-next/c/13defa275eef

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html