mbox series

[net-next,v5,00/12] octeontx2: Exact Match Table.

Message ID 20220708044151.2972645-1-rkannoth@marvell.com (mailing list archive)
Headers show
Series octeontx2: Exact Match Table. | expand

Message

Ratheesh Kannoth July 8, 2022, 4:41 a.m. UTC
Exact match table and Field hash support for CN10KB silicon

ChangeLog
---------
  1) V0 to V1
     a) Removed change IDs from all patches.

  2) V1 to V2
     a)Fixed all compile warnings and cleanly compiled all patches.

  3) V2 to V3
     a) Fixed patch series subject text.

  4) V3 to V4
     a) Fixed sparse errors.
     b) Fixed warnings by -Wsometimes-uninitialized option

  5) V4 to V5
     a) Fixed doc error.

Ratheesh Kannoth (11):

These patch series enables exact match table in CN10KB silicon. Legacy
silicon used NPC mcam to do packet fields/channel matching for NPC rules.
NPC mcam resources exahausted as customer use case increased.
Supporting many DMAC filter becomes a challenge, as RPM based filter
count is less. Exact match table has 4way 2K entry table and a 32 entry
fully associative cam table. Second table is to handle hash
table collision over flow in 4way 2K entry table. Enabling exact match
table results in KEX key to be appended with Hit/Miss status. This can be
used to match in NPC mcam for a more generic rule and drop those packets
than having DMAC drop rules for each DMAC entry in NPC mcam.

  octeontx2-af: Exact match support
  octeontx2-af: Exact match scan from kex profile
  octeontx2-af: devlink configuration support
  octeontx2-af: FLR handler for exact match table.
  octeontx2-af: Drop rules for NPC MCAM
  octeontx2-af: Debugsfs support for exact match.
  octeontx2: Modify mbox request and response structures
  octeontx2-af: Wrapper functions for mac addr add/del/update/reset
  octeontx2-af: Invoke exact match functions if supported
  octeontx2-pf: Add support for exact match table.
  octeontx2-af: Enable Exact match flag in kex profile

Suman Ghosh (1):
  octeontx2-af: Support to hash reduce of actual field into MCAM key

 .../ethernet/marvell/octeontx2/af/Makefile    |    2 +-
 First patch in the series "octeontx2-af: Support to hash reduce of actual
 field into MCAM key" introduced new C file. Makefile is modified to
 compile the same.

 .../net/ethernet/marvell/octeontx2/af/mbox.h  |   41 +-
 Mbox request and response structures requires modification.
 RPM based DMAC filter can be modified at any location
 in the RPM filter table as entry's location has no relation to content.
 But for NPC exact match's 2K, 4way table is based on hash.
 This means that modification of an entry may fail if hash mismatches.
 In these cases, we need to delete existing entry and create a new entry
 in a different slot determined by hash value. This index has to
 be returned to caller.

 .../net/ethernet/marvell/octeontx2/af/npc.h   |   25 +
 New data types (enums and macros) for this feature.

 .../marvell/octeontx2/af/npc_profile.h        |    5 +-
 Kex profile changes to add exact match HIT bit in the Key.
 Inorder to accommodate this nibble, NPC_PARSE_NIBBLE_ERRCODE
 is deleted as it is not used.

 .../net/ethernet/marvell/octeontx2/af/rvu.c   |   17 +
 Exact match HW capability flag is initialized to false.
 FLR handler changes to invoke rvu_npc_exact_reset()
 to free all exact match resources in case of interface reset.

 .../net/ethernet/marvell/octeontx2/af/rvu.h   |   24 +-
 Exact match table info is defined in rvu_hwinfo structure.
  This table structure is heap allocated and maintains
 all information about available/free/allocated resources.

 .../ethernet/marvell/octeontx2/af/rvu_cgx.c   |   41 +-
 As of today, RPM based DMAC filter is configured upon user command.
 Each of these mbox handler is trapped and checked for NPC exact match
 support. If support is enabled, invokes Exact match API instead of
 RPM dmac based calls.

 .../marvell/octeontx2/af/rvu_debugfs.c        |  179 ++
 Three debugfs entries would be created if Exact match table is supported.
  1. exact_entries : List out npc exact match entries
  2. exact_info : Info related exact match tables (mem and cam table)
  3. exact_drop_cnt: Drop packet counter for each NPC mcam drop rule.

 .../marvell/octeontx2/af/rvu_devlink.c        |   71 +-
 Devlink provides flexibility to user to switch to RPM based DMAC filters
 on CN10KB silicon. Please note that devlink command fails if user added
 DMAC filters prior to devlink command to disable exact match table.

 .../ethernet/marvell/octeontx2/af/rvu_nix.c   |    7 +
 Promiscuous mode enable must disable this Exact match table based drop
 rule on NPC mcam. set rx mode routine calls enable/disable corresponding
 NPC exact drop rule when promiscuous mode is toggled.

 .../ethernet/marvell/octeontx2/af/rvu_npc.c   |   51 +-
 APIs to reserve NPC mcam entries. This is used to reserve and
 configure NPC drop rules.

 .../marvell/octeontx2/af/rvu_npc_fs.c         |  162 +-
 For each PF, there is a drop rule installed in NPC mcam.
 This installation is done during rvu probe itself.
 Drop rule has multicast and broadcast bits turned off.
 This means that broadcast and multicast packets will
 never get dropped irrespective of NPC exact match table.
 This rule action is drop if exact table match bit
 0 and channel is matched. This means if there is no hit
 is exact match table and channel match, packets will
 be dropped.

 .../marvell/octeontx2/af/rvu_npc_fs.h         |   17 +

 .../marvell/octeontx2/af/rvu_npc_hash.c       | 1958 +++++++++++++++++
 New file added. This file implements add/del/update to exact match table,
 probing of the feature and invokes function to install drop ruleis
 in NPC mcam.

 .../marvell/octeontx2/af/rvu_npc_hash.h       |  233 ++
 function declarations for rvu_npc_hash.c

 .../ethernet/marvell/octeontx2/af/rvu_reg.h   |   15 +
 Register access macros for NPC exact match.

 .../marvell/octeontx2/nic/otx2_common.h       |   10 +-
 Since NPC exact match table has more entries than RPM DMAC filter,
 size of bmap_to_dmacindex is increased from 8 to 32bit.
 Maximum number of dmac entries available also increased
 (increased the size of bitmap)

 .../marvell/octeontx2/nic/otx2_dmac_flt.c     |   46 +-
 .../marvell/octeontx2/nic/otx2_flows.c        |   40 +-
 .../ethernet/marvell/octeontx2/nic/otx2_pf.c  |    2 +-
 Above change in marvell/octeontx2/nic/otx2_common.h,
 require corresponding modification in these 3 C files.
 Please note that we need to modify/change existing entry index as
 mentioned in description of net/ethernet/marvell/octeontx2/af/mbox.h
 in this cover letter.

 20 files changed, 2879 insertions(+), 67 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.h

--
2.25.1

Comments

patchwork-bot+netdevbpf@kernel.org July 10, 2022, 6:22 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 8 Jul 2022 10:11:39 +0530 you wrote:
> Exact match table and Field hash support for CN10KB silicon
> 
> ChangeLog
> ---------
>   1) V0 to V1
>      a) Removed change IDs from all patches.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,01/12] octeontx2-af: Use hashed field in MCAM key
    https://git.kernel.org/bpf/bpf-next/c/a95ab93550d3
  - [net-next,v5,02/12] octeontx2-af: Exact match support
    (no matching commit)
  - [net-next,v5,03/12] octeontx2-af: Exact match scan from kex profile
    https://git.kernel.org/bpf/bpf-next/c/60ec39311750
  - [net-next,v5,04/12] octeontx2-af: devlink configuration support
    (no matching commit)
  - [net-next,v5,05/12] octeontx2-af: FLR handler for exact match table.
    https://git.kernel.org/bpf/bpf-next/c/799f02ef2ce3
  - [net-next,v5,06/12] octeontx2-af: Drop rules for NPC MCAM
    (no matching commit)
  - [net-next,v5,07/12] octeontx2-af: Debugsfs support for exact match.
    https://git.kernel.org/bpf/bpf-next/c/01b9228b20ad
  - [net-next,v5,08/12] octeontx2: Modify mbox request and response structures
    https://git.kernel.org/bpf/bpf-next/c/68793a8bbfcd
  - [net-next,v5,09/12] octeontx2-af: Wrapper functions for MAC addr add/del/update/reset
    (no matching commit)
  - [net-next,v5,10/12] octeontx2-af: Invoke exact match functions if supported
    https://git.kernel.org/bpf/bpf-next/c/84926eb57dbf
  - [net-next,v5,11/12] octeontx2-pf: Add support for exact match table.
    https://git.kernel.org/bpf/bpf-next/c/e56468377fa0
  - [net-next,v5,12/12] octeontx2-af: Enable Exact match flag in kex profile
    https://git.kernel.org/bpf/bpf-next/c/7189d28e7e2d

You are awesome, thank you!
Ratheesh Kannoth July 11, 2022, 5:08 a.m. UTC | #2
>External Email

>----------------------------------------------------------------------
>Hello:

>This series was applied to bpf/bpf-next.git (master) by David S. Miller <davem@davemloft.net>:

>On Fri, 8 Jul 2022 10:11:39 +0530 you wrote:
>> Exact match table and Field hash support for CN10KB silicon
> >
> >ChangeLog
> >---------
> >  1) V0 to V1
> >     a) Removed change IDs from all patches.
> >
> >[...]

Hi David/Jakub,

Cloned bpf-next.git master today (7/11 IST) and could not find these patches (v5). Am I missing anything ?

-Ratheesh   


-----Original Message-----
From: patchwork-bot+netdevbpf@kernel.org <patchwork-bot+netdevbpf@kernel.org> 
Sent: Sunday, July 10, 2022 11:52 PM
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Sunil Kovvuri Goutham <sgoutham@marvell.com>; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com
Subject: [EXT] Re: [net-next PATCH v5 00/12] octeontx2: Exact Match Table.

External Email

----------------------------------------------------------------------
Hello:

This series was applied to bpf/bpf-next.git (master) by David S. Miller <davem@davemloft.net>:

On Fri, 8 Jul 2022 10:11:39 +0530 you wrote:
> Exact match table and Field hash support for CN10KB silicon
> 
> ChangeLog
> ---------
>   1) V0 to V1
>      a) Removed change IDs from all patches.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,01/12] octeontx2-af: Use hashed field in MCAM key
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_a95ab93550d3&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=3brqCTY-5E28OdD9HsPVi6_lXxi_qhWj57d6NzetAio&e=
  - [net-next,v5,02/12] octeontx2-af: Exact match support
    (no matching commit)
  - [net-next,v5,03/12] octeontx2-af: Exact match scan from kex profile
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_60ec39311750&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=bw_H2a3pFomvAusFJNLt7zD7bgMpYR--TMSXj4ghS9M&e=
  - [net-next,v5,04/12] octeontx2-af: devlink configuration support
    (no matching commit)
  - [net-next,v5,05/12] octeontx2-af: FLR handler for exact match table.
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_799f02ef2ce3&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=H98ETZuqGQl6haxZJDMEcZcnn5dpakNrnnhoTmvKcOc&e=
  - [net-next,v5,06/12] octeontx2-af: Drop rules for NPC MCAM
    (no matching commit)
  - [net-next,v5,07/12] octeontx2-af: Debugsfs support for exact match.
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_01b9228b20ad&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=yRFmOSoT8YhIJ9SxK4d3yrrdaSQMYtaUdLwZay5mGjo&e=
  - [net-next,v5,08/12] octeontx2: Modify mbox request and response structures
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_68793a8bbfcd&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=sH5eQhZDpEGyEbINPE_u5nuh4gzQB_Kttuc-SeVusdc&e=
  - [net-next,v5,09/12] octeontx2-af: Wrapper functions for MAC addr add/del/update/reset
    (no matching commit)
  - [net-next,v5,10/12] octeontx2-af: Invoke exact match functions if supported
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_84926eb57dbf&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=9FfZA14GvjFWNnAbuusA9SkjRmeXSpaURnVBNML6Obw&e=
  - [net-next,v5,11/12] octeontx2-pf: Add support for exact match table.
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_e56468377fa0&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=cjKEGnciFbC0A8gQ2mzC5K9Y5hXW9WS8cV1oXoyBWgI&e=
  - [net-next,v5,12/12] octeontx2-af: Enable Exact match flag in kex profile
    https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_bpf_bpf-2Dnext_c_7189d28e7e2d&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=RWE-YJohy1CpMg7ed4Pz_lXM3KQfKIl-A2RR5ChEJZM&e= 

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://urldefense.proofpoint.com/v2/url?u=https-3A__korg.docs.kernel.org_patchwork_pwbot.html&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=ATt1VNm4hqpZVYvb-AvSKjUD_r9xlAGxjz3f4OiqhH6DbG1pgy-FmWzzybRfF0iH&s=JrPWWzoDBmbOl3SFOkUKSLmPKzKFf87DOUdMDXn_WBQ&e=
Jakub Kicinski July 11, 2022, 5:54 p.m. UTC | #3
On Mon, 11 Jul 2022 05:08:05 +0000 Ratheesh Kannoth wrote:
> Cloned bpf-next.git master today (7/11 IST) and could not find these
> patches (v5). Am I missing anything ?

I think pw-bot got confused and matched the v2 that just made its way
to the bpf-next tree against this series. There's an unfortunate
but necessary fuzziness in how the pw-bot matches patches and trees.

I'm applying the patches to net-next now.
patchwork-bot+netdevbpf@kernel.org July 11, 2022, 6 p.m. UTC | #4
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 8 Jul 2022 10:11:39 +0530 you wrote:
> Exact match table and Field hash support for CN10KB silicon
> 
> ChangeLog
> ---------
>   1) V0 to V1
>      a) Removed change IDs from all patches.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,01/12] octeontx2-af: Use hashed field in MCAM key
    https://git.kernel.org/netdev/net-next/c/56d9f5fd2246
  - [net-next,v5,02/12] octeontx2-af: Exact match support
    https://git.kernel.org/netdev/net-next/c/b747923afff8
  - [net-next,v5,03/12] octeontx2-af: Exact match scan from kex profile
    https://git.kernel.org/netdev/net-next/c/812103edf670
  - [net-next,v5,04/12] octeontx2-af: devlink configuration support
    https://git.kernel.org/netdev/net-next/c/ef83e186855d
  - [net-next,v5,05/12] octeontx2-af: FLR handler for exact match table.
    https://git.kernel.org/netdev/net-next/c/bab9eed564ed
  - [net-next,v5,06/12] octeontx2-af: Drop rules for NPC MCAM
    https://git.kernel.org/netdev/net-next/c/3571fe07a090
  - [net-next,v5,07/12] octeontx2-af: Debugsfs support for exact match.
    https://git.kernel.org/netdev/net-next/c/87e4ea29b030
  - [net-next,v5,08/12] octeontx2: Modify mbox request and response structures
    https://git.kernel.org/netdev/net-next/c/292822e961cc
  - [net-next,v5,09/12] octeontx2-af: Wrapper functions for MAC addr add/del/update/reset
    https://git.kernel.org/netdev/net-next/c/2dba9459d2c9
  - [net-next,v5,10/12] octeontx2-af: Invoke exact match functions if supported
    https://git.kernel.org/netdev/net-next/c/d6c9784baf59
  - [net-next,v5,11/12] octeontx2-pf: Add support for exact match table.
    https://git.kernel.org/netdev/net-next/c/fa5e0ccb8f3a
  - [net-next,v5,12/12] octeontx2-af: Enable Exact match flag in kex profile
    https://git.kernel.org/netdev/net-next/c/bb67a66689e2

You are awesome, thank you!