From: Junfeng Guo <junfeng.guo@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
jesse.brandeburg@intel.com, qi.z.zhang@intel.com,
ivecera@redhat.com, sridhar.samudrala@intel.com,
horms@kernel.org, Junfeng Guo <junfeng.guo@intel.com>
Subject: [PATCH iwl-next v7 00/15] Introduce the Parser Library
Date: Wed, 23 Aug 2023 17:31:43 +0800 [thread overview]
Message-ID: <20230823093158.782802-1-junfeng.guo@intel.com> (raw)
In-Reply-To: <20230821081438.2937934-1-junfeng.guo@intel.com>
Current software architecture for flow filtering offloading limited
the capability of Intel Ethernet 800 Series Dynamic Device
Personalization (DDP) Package. The flow filtering offloading in the
driver is enabled based on the naming parsers, each flow pattern is
represented by a protocol header stack. And there are multiple layers
(e.g., virtchnl) to maintain their own enum/macro/structure
to represent a protocol header (IP, TCP, UDP ...), thus the extra
parsers to verify if a pattern is supported by hardware or not as
well as the extra converters that to translate represents between
different layers. Every time a new protocol/field is requested to be
supported, the corresponding logic for the parsers and the converters
needs to be modified accordingly. Thus, huge & redundant efforts are
required to support the increasing flow filtering offloading features,
especially for the tunnel types flow filtering.
This patch set provides a way for applications to send down training
packets & masks (in binary) to the driver. Then these binary data
would be used by the driver to generate certain data that are needed
to create a filter rule in the filtering stage of switch/RSS/FDIR.
Note that the impact of a malicious rule in the raw packet filter is
limited to performance rather than functionality. It may affect the
performance of the workload, similar to other limitations in FDIR/RSS
on AVF. For example, there is no resource boundary for VF FDIR/RSS
rules, so one malicious VF could potentially make other VFs
inefficient in offloading.
The parser library is expected to include boundary checks to prevent
critical errors such as infinite loops or segmentation faults.
However, only implementing and validating the parser emulator in a
sandbox environment (like ebpf) presents a challenge.
The idea is to make the driver be able to learn from the DDP package
directly to understand how the hardware parser works (i.e., the
Parser Library), so that it can process on the raw training packet
(in binary) directly and create the filter rule accordingly.
Based on this Parser Library, the raw flow filtering of
switch/RSS/FDIR could be enabled to allow new flow filtering
offloading features to be supported without any driver changes (only
need to update the DDP package).
v7:
- Move/Add below marco to the first appeared commit:
ICE_PARSER_FLG_NUM and ICE_ERR_NOT_IMPL.
v6:
- Move `rt` field setting to the correct commit (first introduced).
v5:
- Update copyrights of new files to be 2023 only.
- Update patch set series prefix.
- Fix typo on patch 2 commit message.
v4:
- Update cover letter series title.
v3:
- Replace magic hardcoded values with macros.
- Use size_t to avoid superfluous type cast to uintptr_t in function
ice_parser_sect_item_get.
- Prefix for static local function names to avoid namespace pollution.
- Use strstarts() function instead of self implementation.
v2:
- Fix build warnings.
Junfeng Guo (15):
ice: add parser create and destroy skeleton
ice: init imem table for parser
ice: init metainit table for parser
ice: init parse graph cam tables for parser
ice: init boost tcam and label tables for parser
ice: init ptype marker tcam table for parser
ice: init marker and protocol group tables for parser
ice: init flag redirect table for parser
ice: init XLT key builder for parser
ice: add parser runtime skeleton
ice: add internal help functions
ice: add parser execution main loop
ice: support double vlan mode configure for parser
ice: add tunnel port support for parser
ice: add API for parser profile initialization
drivers/net/ethernet/intel/ice/Makefile | 11 +
drivers/net/ethernet/intel/ice/ice_bst_tcam.c | 313 +++++++
drivers/net/ethernet/intel/ice/ice_bst_tcam.h | 52 ++
drivers/net/ethernet/intel/ice/ice_common.h | 6 +
drivers/net/ethernet/intel/ice/ice_ddp.c | 10 +-
drivers/net/ethernet/intel/ice/ice_ddp.h | 14 +
drivers/net/ethernet/intel/ice/ice_flg_rd.c | 73 ++
drivers/net/ethernet/intel/ice/ice_flg_rd.h | 24 +
drivers/net/ethernet/intel/ice/ice_imem.c | 279 ++++++
drivers/net/ethernet/intel/ice/ice_imem.h | 217 +++++
drivers/net/ethernet/intel/ice/ice_metainit.c | 181 ++++
drivers/net/ethernet/intel/ice/ice_metainit.h | 104 +++
drivers/net/ethernet/intel/ice/ice_mk_grp.c | 51 +
drivers/net/ethernet/intel/ice/ice_mk_grp.h | 17 +
drivers/net/ethernet/intel/ice/ice_parser.c | 562 +++++++++++
drivers/net/ethernet/intel/ice/ice_parser.h | 140 +++
.../net/ethernet/intel/ice/ice_parser_rt.c | 877 ++++++++++++++++++
.../net/ethernet/intel/ice/ice_parser_rt.h | 73 ++
.../net/ethernet/intel/ice/ice_parser_util.h | 37 +
drivers/net/ethernet/intel/ice/ice_pg_cam.c | 397 ++++++++
drivers/net/ethernet/intel/ice/ice_pg_cam.h | 142 +++
.../net/ethernet/intel/ice/ice_proto_grp.c | 90 ++
.../net/ethernet/intel/ice/ice_proto_grp.h | 31 +
drivers/net/ethernet/intel/ice/ice_ptype_mk.c | 73 ++
drivers/net/ethernet/intel/ice/ice_ptype_mk.h | 23 +
drivers/net/ethernet/intel/ice/ice_tmatch.h | 40 +
drivers/net/ethernet/intel/ice/ice_type.h | 1 +
drivers/net/ethernet/intel/ice/ice_xlt_kb.c | 262 ++++++
drivers/net/ethernet/intel/ice/ice_xlt_kb.h | 80 ++
29 files changed, 4175 insertions(+), 5 deletions(-)
create mode 100644 drivers/net/ethernet/intel/ice/ice_bst_tcam.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_bst_tcam.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_flg_rd.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_flg_rd.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_imem.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_imem.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_metainit.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_metainit.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_mk_grp.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_mk_grp.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_parser.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_parser.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_parser_rt.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_parser_rt.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_parser_util.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_pg_cam.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_pg_cam.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_proto_grp.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_proto_grp.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_ptype_mk.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_ptype_mk.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_tmatch.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_xlt_kb.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_xlt_kb.h
--
2.25.1
next prev parent reply other threads:[~2023-08-23 9:32 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230605054641.2865142-1-junfeng.guo@intel.com>
2023-08-21 2:38 ` [PATCH iwl-next v5 00/15] Introduce the Parser Library Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 01/15] ice: add parser create and destroy skeleton Junfeng Guo
2023-08-21 7:20 ` Simon Horman
2023-08-21 7:30 ` Simon Horman
2023-08-21 7:34 ` Guo, Junfeng
2023-08-21 14:47 ` Simon Horman
2023-08-22 2:47 ` Guo, Junfeng
2023-08-21 2:38 ` [PATCH iwl-next v5 02/15] ice: init imem table for parser Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 03/15] ice: init metainit " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 04/15] ice: init parse graph cam tables " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 05/15] ice: init boost tcam and label " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 06/15] ice: init ptype marker tcam table " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 07/15] ice: init marker and protocol group tables " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 08/15] ice: init flag redirect table " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 09/15] ice: init XLT key builder " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 10/15] ice: add parser runtime skeleton Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 11/15] ice: add internal help functions Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 12/15] ice: add parser execution main loop Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 13/15] ice: support double vlan mode configure for parser Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 14/15] ice: add tunnel port support " Junfeng Guo
2023-08-21 2:38 ` [PATCH iwl-next v5 15/15] ice: add API for parser profile initialization Junfeng Guo
2023-08-21 6:46 ` [EXT] [PATCH iwl-next v5 00/15] Introduce the Parser Library Subbaraya Sundeep Bhatta
2023-08-21 7:15 ` Guo, Junfeng
2023-08-21 8:14 ` [PATCH iwl-next v6 " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 01/15] ice: add parser create and destroy skeleton Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 02/15] ice: init imem table for parser Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 03/15] ice: init metainit " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 04/15] ice: init parse graph cam tables " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 05/15] ice: init boost tcam and label " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 06/15] ice: init ptype marker tcam table " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 07/15] ice: init marker and protocol group tables " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 08/15] ice: init flag redirect table " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 09/15] ice: init XLT key builder " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 10/15] ice: add parser runtime skeleton Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 11/15] ice: add internal help functions Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 12/15] ice: add parser execution main loop Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 13/15] ice: support double vlan mode configure for parser Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 14/15] ice: add tunnel port support " Junfeng Guo
2023-08-21 8:14 ` [PATCH iwl-next v6 15/15] ice: add API for parser profile initialization Junfeng Guo
2023-08-23 9:31 ` Junfeng Guo [this message]
2023-08-23 9:31 ` [PATCH iwl-next v7 01/15] ice: add parser create and destroy skeleton Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 02/15] ice: init imem table for parser Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 03/15] ice: init metainit " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 04/15] ice: init parse graph cam tables " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 05/15] ice: init boost tcam and label " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 06/15] ice: init ptype marker tcam table " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 07/15] ice: init marker and protocol group tables " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 08/15] ice: init flag redirect table " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 09/15] ice: init XLT key builder " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 10/15] ice: add parser runtime skeleton Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 11/15] ice: add internal help functions Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 12/15] ice: add parser execution main loop Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 13/15] ice: support double vlan mode configure for parser Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 14/15] ice: add tunnel port support " Junfeng Guo
2023-08-23 9:31 ` [PATCH iwl-next v7 15/15] ice: add API for parser profile initialization Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 00/15] Introduce the Parser Library Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 01/15] ice: add parser create and destroy skeleton Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 02/15] ice: init imem table for parser Junfeng Guo
2023-08-28 9:55 ` Ivan Vecera
2023-08-24 7:54 ` [PATCH iwl-next v8 03/15] ice: init metainit " Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 04/15] ice: init parse graph cam tables " Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 05/15] ice: init boost tcam and label " Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 06/15] ice: init ptype marker tcam table " Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 07/15] ice: init marker and protocol group tables " Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 08/15] ice: init flag redirect table " Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 09/15] ice: init XLT key builder " Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 10/15] ice: add parser runtime skeleton Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 11/15] ice: add internal help functions Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 12/15] ice: add parser execution main loop Junfeng Guo
2023-08-24 15:39 ` Simon Horman
2023-08-24 7:54 ` [PATCH iwl-next v8 13/15] ice: support double vlan mode configure for parser Junfeng Guo
2023-08-24 7:54 ` [PATCH iwl-next v8 14/15] ice: add tunnel port support " Junfeng Guo
2023-08-24 7:55 ` [PATCH iwl-next v8 15/15] ice: add API for parser profile initialization Junfeng Guo
2023-08-24 15:20 ` [PATCH iwl-next v8 00/15] Introduce the Parser Library Jakub Kicinski
2023-08-25 10:52 ` Alexander Lobakin
2023-08-26 0:23 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230823093158.782802-1-junfeng.guo@intel.com \
--to=junfeng.guo@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ivecera@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=qi.z.zhang@intel.com \
--cc=sridhar.samudrala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).