Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH iwl-next 00/15] Introduce the Parser Library
@ 2023-06-05  2:29 Junfeng Guo
  2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 01/15] ice: add parser create and destroy skeleton Junfeng Guo
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: Junfeng Guo @ 2023-06-05  2:29 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: qi.z.zhang

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).

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 table for parser
  ice: init boost tcam table for parser
  ice: init ptype marker tcam table for parser
  ice: init marker and protocol group table 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 | 297 ++++++
 drivers/net/ethernet/intel/ice/ice_bst_tcam.h |  34 +
 drivers/net/ethernet/intel/ice/ice_common.h   |   1 +
 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   |  75 ++
 drivers/net/ethernet/intel/ice/ice_flg_rd.h   |  16 +
 drivers/net/ethernet/intel/ice/ice_imem.c     | 250 +++++
 drivers/net/ethernet/intel/ice/ice_imem.h     | 108 +++
 drivers/net/ethernet/intel/ice/ice_metainit.c | 155 ++++
 drivers/net/ethernet/intel/ice/ice_metainit.h |  45 +
 drivers/net/ethernet/intel/ice/ice_mk_grp.c   |  54 ++
 drivers/net/ethernet/intel/ice/ice_mk_grp.h   |  14 +
 drivers/net/ethernet/intel/ice/ice_parser.c   | 559 +++++++++++
 drivers/net/ethernet/intel/ice/ice_parser.h   | 112 +++
 .../net/ethernet/intel/ice/ice_parser_rt.c    | 866 ++++++++++++++++++
 .../net/ethernet/intel/ice/ice_parser_rt.h    |  47 +
 .../net/ethernet/intel/ice/ice_parser_util.h  |  35 +
 drivers/net/ethernet/intel/ice/ice_pg_cam.c   | 376 ++++++++
 drivers/net/ethernet/intel/ice/ice_pg_cam.h   |  73 ++
 .../net/ethernet/intel/ice/ice_proto_grp.c    | 105 +++
 .../net/ethernet/intel/ice/ice_proto_grp.h    |  23 +
 drivers/net/ethernet/intel/ice/ice_ptype_mk.c |  75 ++
 drivers/net/ethernet/intel/ice/ice_ptype_mk.h |  20 +
 drivers/net/ethernet/intel/ice/ice_tmatch.h   |  43 +
 drivers/net/ethernet/intel/ice/ice_type.h     |   1 +
 drivers/net/ethernet/intel/ice/ice_xlt_kb.c   | 218 +++++
 drivers/net/ethernet/intel/ice/ice_xlt_kb.h   |  33 +
 29 files changed, 3665 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

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

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

end of thread, other threads:[~2023-06-05  4:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-05  2:29 [Intel-wired-lan] [PATCH iwl-next 00/15] Introduce the Parser Library Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 01/15] ice: add parser create and destroy skeleton Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 02/15] ice: init imem table for parser Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 03/15] ice: init metainit " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 04/15] ice: init parse graph cam " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 05/15] ice: init boost tcam " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 06/15] ice: init ptype marker " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 07/15] ice: init marker and protocol group " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 08/15] ice: init flag redirect " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 09/15] ice: init XLT key builder " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 10/15] ice: add parser runtime skeleton Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 11/15] ice: add internal help functions Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 12/15] ice: add parser execution main loop Junfeng Guo
2023-06-05  4:47   ` kernel test robot
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 13/15] ice: support double vlan mode configure for parser Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 14/15] ice: add tunnel port support " Junfeng Guo
2023-06-05  2:29 ` [Intel-wired-lan] [PATCH iwl-next 15/15] ice: add API for parser profile initialization Junfeng Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox