All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: liujie5@linkdatatechnology.com
Cc: dev@dpdk.org
Subject: Re: [PATCH v9 00/23] net/sxe2: added Linkdata sxe2 ethernet driver
Date: Fri, 26 Jun 2026 11:18:42 -0700	[thread overview]
Message-ID: <20260626111842.589a7d12@phoenix.local> (raw)
In-Reply-To: <20260626063800.359448-1-liujie5@linkdatatechnology.com>

On Fri, 26 Jun 2026 14:38:00 +0800
liujie5@linkdatatechnology.com wrote:

> From: Jie Liu <liujie5@linkdatatechnology.com>
> 
> This patch set implements core functionality for the SXE2 PMD,
> including basic driver framework, data path setup, and advanced
> offload features (VLAN, RSS,TM, PTP etc.).
> 
> v9
> 	Clarify the behavior of the flow-duplicate-pattern parameter
> 
> *** BLURB HERE ***
> 
> Jie Liu (23):
>   net/sxe2: remove software statistics devargs
>   net/sxe2: add Rx framework and packet types callback
>   net/sxe2: support AVX512 vectorized path for Rx and Tx
>   net/sxe2: add AVX2 vector data path for Rx and Tx
>   net/sxe2: add link update callback
>   net/sxe2: support L2 filtering and MAC config
>   drivers: support RSS feature
>   net/sxe2: support TM hierarchy and shaping
>   net/sxe2: support IPsec inline protocol offload
>   net/sxe2: support statistics and multi-process
>   drivers: interrupt handling
>   net/sxe2: add NEON vec Rx/Tx burst functions
>   drivers: add support for VF representors
>   net/sxe2: add support for custom UDP tunnel ports
>   net/sxe2: support firmware version reading
>   net/sxe2: implement get monitor address
>   common/sxe2: add shared SFP module definitions
>   net/sxe2: support SFP module info and EEPROM access
>   net/sxe2: add mbuf validation in Tx debug mode
>   common/sxe2: add callback for memory event handling
>   net/sxe2: add private devargs parsing
>   net/sxe2: implement private dump info
>   net/sxe2: update sxe2 feature matrix docs
> 
>  doc/guides/nics/features/sxe2.ini          |   56 +
>  doc/guides/nics/sxe2.rst                   |  186 ++
>  drivers/common/sxe2/sxe2_common.c          |  156 ++
>  drivers/common/sxe2/sxe2_common.h          |    4 +
>  drivers/common/sxe2/sxe2_flow_public.h     |  633 +++++++
>  drivers/common/sxe2/sxe2_ioctl_chnl.c      |  178 +-
>  drivers/common/sxe2/sxe2_ioctl_chnl_func.h |   18 +
>  drivers/common/sxe2/sxe2_msg.h             |  118 ++
>  drivers/net/sxe2/meson.build               |   52 +
>  drivers/net/sxe2/sxe2_cmd_chnl.c           | 1587 +++++++++++++++-
>  drivers/net/sxe2/sxe2_cmd_chnl.h           |  139 ++
>  drivers/net/sxe2/sxe2_drv_cmd.h            |  523 +++++-
>  drivers/net/sxe2/sxe2_dump.c               |  287 +++
>  drivers/net/sxe2/sxe2_dump.h               |   12 +
>  drivers/net/sxe2/sxe2_ethdev.c             | 1496 ++++++++++++++-
>  drivers/net/sxe2/sxe2_ethdev.h             |  111 +-
>  drivers/net/sxe2/sxe2_ethdev_repr.c        |  609 ++++++
>  drivers/net/sxe2/sxe2_ethdev_repr.h        |   32 +
>  drivers/net/sxe2/sxe2_filter.c             |  895 +++++++++
>  drivers/net/sxe2/sxe2_filter.h             |  100 +
>  drivers/net/sxe2/sxe2_flow.c               | 1391 ++++++++++++++
>  drivers/net/sxe2/sxe2_flow.h               |   30 +
>  drivers/net/sxe2/sxe2_flow_define.h        |  144 ++
>  drivers/net/sxe2/sxe2_flow_parse_action.c  | 1182 ++++++++++++
>  drivers/net/sxe2/sxe2_flow_parse_action.h  |   23 +
>  drivers/net/sxe2/sxe2_flow_parse_engine.c  |  106 ++
>  drivers/net/sxe2/sxe2_flow_parse_engine.h  |   13 +
>  drivers/net/sxe2/sxe2_flow_parse_pattern.c | 1935 +++++++++++++++++++
>  drivers/net/sxe2/sxe2_flow_parse_pattern.h |   46 +
>  drivers/net/sxe2/sxe2_ipsec.c              | 1565 ++++++++++++++++
>  drivers/net/sxe2/sxe2_ipsec.h              |  254 +++
>  drivers/net/sxe2/sxe2_irq.c                | 1026 ++++++++++
>  drivers/net/sxe2/sxe2_irq.h                |   25 +
>  drivers/net/sxe2/sxe2_mac.c                |  530 ++++++
>  drivers/net/sxe2/sxe2_mac.h                |   84 +
>  drivers/net/sxe2/sxe2_mp.c                 |  414 +++++
>  drivers/net/sxe2/sxe2_mp.h                 |   67 +
>  drivers/net/sxe2/sxe2_queue.c              |   17 +-
>  drivers/net/sxe2/sxe2_queue.h              |   15 +-
>  drivers/net/sxe2/sxe2_rss.c                |  584 ++++++
>  drivers/net/sxe2/sxe2_rss.h                |   81 +
>  drivers/net/sxe2/sxe2_rx.c                 |   93 +-
>  drivers/net/sxe2/sxe2_rx.h                 |    2 +
>  drivers/net/sxe2/sxe2_security.c           |  335 ++++
>  drivers/net/sxe2/sxe2_security.h           |   77 +
>  drivers/net/sxe2/sxe2_stats.c              |  586 ++++++
>  drivers/net/sxe2/sxe2_stats.h              |   39 +
>  drivers/net/sxe2/sxe2_switchdev.c          |  332 ++++
>  drivers/net/sxe2/sxe2_switchdev.h          |   33 +
>  drivers/net/sxe2/sxe2_tm.c                 | 1151 ++++++++++++
>  drivers/net/sxe2/sxe2_tm.h                 |   76 +
>  drivers/net/sxe2/sxe2_tx.c                 |    7 +
>  drivers/net/sxe2/sxe2_txrx.c               | 1958 +++++++++++++++++++-
>  drivers/net/sxe2/sxe2_txrx.h               |    8 +
>  drivers/net/sxe2/sxe2_txrx_check_mbuf.c    |  595 ++++++
>  drivers/net/sxe2/sxe2_txrx_check_mbuf.h    |   38 +
>  drivers/net/sxe2/sxe2_txrx_poll.c          |  284 ++-
>  drivers/net/sxe2/sxe2_txrx_vec.c           |   46 +-
>  drivers/net/sxe2/sxe2_txrx_vec.h           |   38 +-
>  drivers/net/sxe2/sxe2_txrx_vec_avx2.c      |  747 ++++++++
>  drivers/net/sxe2/sxe2_txrx_vec_avx512.c    |  867 +++++++++
>  drivers/net/sxe2/sxe2_txrx_vec_common.h    |   54 +-
>  drivers/net/sxe2/sxe2_txrx_vec_neon.c      |  689 +++++++
>  drivers/net/sxe2/sxe2_txrx_vec_sse.c       |   38 +-
>  drivers/net/sxe2/sxe2_vsi.c                |  146 ++
>  drivers/net/sxe2/sxe2_vsi.h                |   12 +-
>  drivers/net/sxe2/sxe2vf_regs.h             |   85 +
>  67 files changed, 24787 insertions(+), 273 deletions(-)
>  create mode 100644 drivers/common/sxe2/sxe2_flow_public.h
>  create mode 100644 drivers/common/sxe2/sxe2_msg.h
>  create mode 100644 drivers/net/sxe2/sxe2_dump.c
>  create mode 100644 drivers/net/sxe2/sxe2_dump.h
>  create mode 100644 drivers/net/sxe2/sxe2_ethdev_repr.c
>  create mode 100644 drivers/net/sxe2/sxe2_ethdev_repr.h
>  create mode 100644 drivers/net/sxe2/sxe2_filter.c
>  create mode 100644 drivers/net/sxe2/sxe2_filter.h
>  create mode 100644 drivers/net/sxe2/sxe2_flow.c
>  create mode 100644 drivers/net/sxe2/sxe2_flow.h
>  create mode 100644 drivers/net/sxe2/sxe2_flow_define.h
>  create mode 100644 drivers/net/sxe2/sxe2_flow_parse_action.c
>  create mode 100644 drivers/net/sxe2/sxe2_flow_parse_action.h
>  create mode 100644 drivers/net/sxe2/sxe2_flow_parse_engine.c
>  create mode 100644 drivers/net/sxe2/sxe2_flow_parse_engine.h
>  create mode 100644 drivers/net/sxe2/sxe2_flow_parse_pattern.c
>  create mode 100644 drivers/net/sxe2/sxe2_flow_parse_pattern.h
>  create mode 100644 drivers/net/sxe2/sxe2_ipsec.c
>  create mode 100644 drivers/net/sxe2/sxe2_ipsec.h
>  create mode 100644 drivers/net/sxe2/sxe2_irq.c
>  create mode 100644 drivers/net/sxe2/sxe2_mac.c
>  create mode 100644 drivers/net/sxe2/sxe2_mac.h
>  create mode 100644 drivers/net/sxe2/sxe2_mp.c
>  create mode 100644 drivers/net/sxe2/sxe2_mp.h
>  create mode 100644 drivers/net/sxe2/sxe2_rss.c
>  create mode 100644 drivers/net/sxe2/sxe2_rss.h
>  create mode 100644 drivers/net/sxe2/sxe2_security.c
>  create mode 100644 drivers/net/sxe2/sxe2_security.h
>  create mode 100644 drivers/net/sxe2/sxe2_stats.c
>  create mode 100644 drivers/net/sxe2/sxe2_stats.h
>  create mode 100644 drivers/net/sxe2/sxe2_switchdev.c
>  create mode 100644 drivers/net/sxe2/sxe2_switchdev.h
>  create mode 100644 drivers/net/sxe2/sxe2_tm.c
>  create mode 100644 drivers/net/sxe2/sxe2_tm.h
>  create mode 100644 drivers/net/sxe2/sxe2_txrx_check_mbuf.c
>  create mode 100644 drivers/net/sxe2/sxe2_txrx_check_mbuf.h
>  create mode 100644 drivers/net/sxe2/sxe2_txrx_vec_avx2.c
>  create mode 100644 drivers/net/sxe2/sxe2_txrx_vec_avx512.c
>  create mode 100644 drivers/net/sxe2/sxe2_txrx_vec_neon.c
>  create mode 100644 drivers/net/sxe2/sxe2vf_regs.h

The devargs parsing looks fixed now.

AI review from long running chat..


[PATCH v9 00/23] sxe2 driver feature additions

Only two patches changed v8 -> v9 (devargs parsing and feature matrix
docs), and they address the flow-duplicate-pattern alignment correctly
this time.

[PATCH v9 21/23] devargs parsing - flow-duplicate-pattern now aligns

The user-facing semantics for value 0 and value 1 now match mlx5's
allow_duplicate_pattern:

  Value   mlx5 allow_duplicate_pattern      sxe2 v9 flow-duplicate-pattern
  -----   --------------------------        --------------------------------
  0       reject duplicates (EEXIST)        reject duplicates (EEXIST)
  1       allow; first rule active (FIFO)   allow; first rule active (FIFO)
  2       (not supported)                   allow; last rule active (LIFO)

Default is 1 in both PMDs. A user who sets flow-duplicate-pattern=1 on
sxe2 now gets the same behaviour as allow_duplicate_pattern=1 on mlx5.
Value 2 (LIFO) is an sxe2-specific extension that mlx5 doesn't have,
and the documentation says so. This is the right shape - aligned where
the capabilities overlap, extended where sxe2 has a real additional
capability.

The implementation uses a small lookup table to map the user value to
the internal enum sxe2_flow_sw_pattern_type (whose numeric ordering
{ONLY=0, LAST=1, FIRST=2} doesn't match the user-facing ordering):

  static const uint8_t udc_tbl[] = {
      SXE2_FLOW_SW_PATTERN_ONLY,   /* user 0 -> 0 */
      SXE2_FLOW_SW_PATTERN_FIRST,  /* user 1 -> 2 */
      SXE2_FLOW_SW_PATTERN_LAST,   /* user 2 -> 1 */
  };

The comment block above the table explains the mapping clearly. The
table name `udc_tbl` is a bit opaque - `user_to_internal[]` or
`mode_map[]` would read better - but the meaning is documented in the
comment so this is a nit, not a blocker.

The orphan ternary in sxe2_flow.c that picked between "Duplicate flow
pattern." and "Duplicate flow pattern is not allowed." based on the
mode value (raised against v8) is gone. Error message is now a single
"Duplicate flow." string, which is appropriate - the rejection path
only fires in mode 0 anyway.

[PATCH v9 23/23] feature matrix docs

Documentation for flow-duplicate-pattern is rewritten to closely match
mlx5.rst's style. The mode 0 and mode 1 paragraphs are essentially
verbatim from mlx5.rst (which is fine - same semantic, same wording is
clearer for users), with mode 2 added as the sxe2-specific extension.
The new paragraph explaining cross-port vs single-port behaviour is
sxe2-specific context that mlx5 doesn't need, and it's a useful clarification.

The default-value note now says "1 (allow duplicates, first-added takes
effect)" - explicit about which mode the default is, which the v8
documentation glossed.



  reply	other threads:[~2026-06-26 18:18 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <220260625133139.207632-1-liujie5@linkdatatechnology.com>
2026-06-26  6:38 ` [PATCH v9 00/23] net/sxe2: added Linkdata sxe2 ethernet driver liujie5
2026-06-26 18:18   ` Stephen Hemminger [this message]
2026-06-26  6:38 ` [PATCH v9 01/23] net/sxe2: remove software statistics devargs liujie5
2026-06-26  6:39 ` [PATCH v9 02/23] net/sxe2: add Rx framework and packet types callback liujie5
2026-06-26  6:39 ` [PATCH v9 03/23] net/sxe2: support AVX512 vectorized path for Rx and Tx liujie5
2026-06-26  6:40 ` [PATCH v9 04/23] net/sxe2: add AVX2 vector data " liujie5
2026-06-26  6:40 ` [PATCH v9 05/23] net/sxe2: add link update callback liujie5
2026-06-26  6:41 ` [PATCH v9 06/23] net/sxe2: support L2 filtering and MAC config liujie5
2026-06-26  6:41 ` [PATCH v9 07/23] drivers: support RSS feature liujie5
2026-06-26  6:42 ` [PATCH v9 08/23] net/sxe2: support TM hierarchy and shaping liujie5
2026-06-26  6:42 ` [PATCH v9 09/23] net/sxe2: support IPsec inline protocol offload liujie5
2026-06-26  6:43 ` [PATCH v9 10/23] net/sxe2: support statistics and multi-process liujie5
2026-06-26  6:43 ` [PATCH v9 11/23] drivers: interrupt handling liujie5
2026-06-26  6:44 ` [PATCH v9 12/23] net/sxe2: add NEON vec Rx/Tx burst functions liujie5
2026-06-26  6:44 ` [PATCH v9 13/23] drivers: add support for VF representors liujie5
2026-06-26  6:45 ` [PATCH v9 14/23] net/sxe2: add support for custom UDP tunnel ports liujie5
2026-06-26  6:45 ` [PATCH v9 15/23] net/sxe2: support firmware version reading liujie5
2026-06-26  6:46 ` [PATCH v9 16/23] net/sxe2: implement get monitor address liujie5
2026-06-26  6:46 ` [PATCH v9 17/23] common/sxe2: add shared SFP module definitions liujie5
2026-06-26  6:47 ` [PATCH v9 18/23] net/sxe2: support SFP module info and EEPROM access liujie5
2026-06-26  6:47 ` [PATCH v9 19/23] net/sxe2: add mbuf validation in Tx debug mode liujie5
2026-06-26 18:21   ` Stephen Hemminger
2026-06-27  4:00     ` liujie5
2026-06-26  6:48 ` [PATCH v9 20/23] common/sxe2: add callback for memory event handling liujie5
2026-06-26  6:48 ` [PATCH v9 21/23] net/sxe2: add private devargs parsing liujie5
2026-06-26  6:49 ` [PATCH v9 22/23] net/sxe2: implement private dump info liujie5
2026-06-26  6:49 ` [PATCH v9 23/23] net/sxe2: update sxe2 feature matrix docs liujie5
2026-06-27  4:04   ` [PATCH v10 00/23] et/sxe2: added Linkdata sxe2 ethernet driver liujie5
2026-06-27  4:05   ` [PATCH v10 01/23] net/sxe2: remove software statistics devargs liujie5
2026-06-27  4:06   ` [PATCH v10 02/23] net/sxe2: add Rx framework and packet types callback liujie5
2026-06-27  4:06   ` [PATCH v10 03/23] net/sxe2: support AVX512 vectorized path for Rx and Tx liujie5
2026-06-27  4:07   ` [PATCH v10 04/23] net/sxe2: add AVX2 vector data " liujie5
2026-06-27  4:07   ` [PATCH v10 05/23] net/sxe2: add link update callback liujie5
2026-06-27  4:08   ` [PATCH v10 06/23] net/sxe2: support L2 filtering and MAC config liujie5
2026-06-27  4:08   ` [PATCH v10 07/23] drivers: support RSS feature liujie5
2026-06-27  4:09   ` [PATCH v10 08/23] net/sxe2: support TM hierarchy and shaping liujie5
2026-06-27  4:09   ` [PATCH v10 09/23] net/sxe2: support IPsec inline protocol offload liujie5
2026-06-27  4:10   ` [PATCH v10 10/23] net/sxe2: support statistics and multi-process liujie5
2026-06-27  4:10   ` [PATCH v10 11/23] drivers: interrupt handling liujie5
2026-06-27  4:11   ` [PATCH v10 12/23] net/sxe2: add NEON vec Rx/Tx burst functions liujie5
2026-06-27  4:11   ` [PATCH v10 13/23] drivers: add support for VF representors liujie5
2026-06-27  4:12   ` [PATCH v10 14/23] net/sxe2: add support for custom UDP tunnel ports liujie5
2026-06-27  4:12   ` [PATCH v10 15/23] net/sxe2: support firmware version reading liujie5
2026-06-27  4:13   ` [PATCH v10 16/23] net/sxe2: implement get monitor address liujie5
2026-06-27  4:13   ` [PATCH v10 17/23] common/sxe2: add shared SFP module definitions liujie5
2026-06-27  4:14   ` [PATCH v10 18/23] net/sxe2: support SFP module info and EEPROM access liujie5
2026-06-27  4:14   ` [PATCH v10 19/23] net/sxe2: add mbuf validation in Tx debug mode liujie5
2026-06-27  4:15   ` [PATCH v10 20/23] common/sxe2: add callback for memory event handling liujie5
2026-06-27  4:15   ` [PATCH v10 21/23] net/sxe2: add private devargs parsing liujie5
2026-06-27  4:16   ` [PATCH v10 22/23] net/sxe2: implement private dump info liujie5
2026-06-27  4:16   ` [PATCH v10 23/23] net/sxe2: update sxe2 feature matrix docs liujie5

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=20260626111842.589a7d12@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=liujie5@linkdatatechnology.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 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.