All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] octeontx2-af: add support for KPU profile customization
@ 2020-09-11 13:21 skardach
  2020-09-11 13:21 ` [PATCH net-next 1/3] octeontx2-af: fix LD CUSTOM LTYPE aliasing skardach
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: skardach @ 2020-09-11 13:21 UTC (permalink / raw)
  To: davem, kuba, sgoutham, netdev; +Cc: Stanislaw Kardach

From: Stanislaw Kardach <skardach@marvell.com>

Marvell octeontx2 NPC device contains a configurable Kanguroo Parser Unit
(KPU) and CAM match key data extraction (MKEX). The octeontx2-af driver
configures them both to parse a list of standard protocol headers which
are used by netdev driver and other potential applications (i.e.
userspace through VFIO).
The problem arises when users have some custom protocol headers which
they'd like to use in CAM flow matching. If such protocols are publicly
known, they can be added to the built-in KPU configuration (called
"profile" - in npc_profile.h). If not, then there's more benefit in
keeping such changes local to the user.
For that case a mechanism which would allow users to produce a KPU
profile and load it along with octeontx2-af driver is needed. At the same
time such customization has to take care not to break the netdev driver
operation or other applications (that is be discoverable).

Therefore introduce a mechanism for a limited customization of the
built-in KPU profile via a firmware file (layout and contents described
by struct npc_kpu_profile_fwdata). It allows user modification of only a
limited number of top priority KPU entries, while others are configured
from the built-in KPU profile. Additionally by convention users should
only use NPC_LT_Lx_CUSTOMx LTYPE entries in their profiles to change the
meaning of built-in LTYPEs. This way the baseline protocol support is
always available and the impact of potential user errors is minimized.
As MKEX also needs to be modified to take into account any user
protocols, the KPU profile firmware binary contains also that. Netdev
driver and applications have a way to discover applied MKEX settings by
querying RVU AF device via NPC_GET_KEX_CFG MBOX message.
Finally some users might need to modify hardware packet data alignment
behavior and profile contains settings for that too.

First patch ensures that CUSTOMx LTYPEs are not aliased with meaningful
LTYPEs where possible.

Second patch gathers all KPU profile related data into a single struct
and creates an adapter structure which provides an interface to the KPU
profile for the octeontx2-af driver.

Third patch adds logic for loading the KPU profile through kernel
firmware APIs, filling in the customizable entries in the adapter
structure and programming the MKEX from KPU profile.

Stanislaw Kardach (3):
  octeontx2-af: fix LD CUSTOM LTYPE aliasing
  octeontx2-af: prepare for custom KPU profiles
  octeontx2-af: add support for custom KPU entries

 .../net/ethernet/marvell/octeontx2/af/npc.h   |  80 +++-
 .../marvell/octeontx2/af/npc_profile.h        | 244 ++++++++++++-
 .../net/ethernet/marvell/octeontx2/af/rvu.c   |   6 +
 .../net/ethernet/marvell/octeontx2/af/rvu.h   |  22 ++
 .../ethernet/marvell/octeontx2/af/rvu_nix.c   |  36 +-
 .../ethernet/marvell/octeontx2/af/rvu_npc.c   | 341 ++++++++++--------
 6 files changed, 564 insertions(+), 165 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-14 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 13:21 [PATCH net-next 0/3] octeontx2-af: add support for KPU profile customization skardach
2020-09-11 13:21 ` [PATCH net-next 1/3] octeontx2-af: fix LD CUSTOM LTYPE aliasing skardach
2020-09-11 13:21 ` [PATCH net-next 2/3] octeontx2-af: prepare for custom KPU profiles skardach
2020-09-11 13:21 ` [PATCH net-next 3/3] octeontx2-af: add support for custom KPU entries skardach
2020-09-11 20:53   ` Jakub Kicinski
2020-09-14 19:55     ` Stanislaw Kardach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.