OSDN Git Service

Merge branch 'marvell-prestera-flower-match-all'
authorDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2021 19:58:28 +0000 (12:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2021 19:58:28 +0000 (12:58 -0700)
commit8ac9900a215664e404f0d87a58d6c8460b8c31c3
tree29db65274c3006a8695de655ebcb979bbdf5d77d
parent220e898dd0db995f32fa6e2a6e28aa2d8b5f8dd0
parent13defa275eef90c07886dbd9e74e3dada8af7348
Merge branch 'marvell-prestera-flower-match-all'

Vadym Kochan says:

====================
Marvell Prestera add flower and match all support

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()
====================

Signed-off-by: David S. Miller <davem@davemloft.net>