All of lore.kernel.org
 help / color / mirror / Atom feed
From: "wangfeifei (J)" <wangfeifei40@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Feifei Wang <wff_light@vip.163.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"chenyi (CY)" <chenyi221@huawei.com>,
	zengweiliang zengweiliang <zengweiliang.zengweiliang@huawei.com>
Subject: 回复: [V2 0/7] hinic3 change for support new SPx NIC
Date: Thu, 19 Mar 2026 02:50:26 +0000	[thread overview]
Message-ID: <2f53819ae73642a2b4837cef530c15e9@huawei.com> (raw)
In-Reply-To: <20260316084553.0b732977@phoenix.local>



> -----邮件原件-----
> 发件人: Stephen Hemminger <stephen@networkplumber.org>
> 发送时间: 2026年3月16日 23:46
> 收件人: Feifei Wang <wff_light@vip.163.com>
> 抄送: dev@dpdk.org; chenyi (CY) <chenyi221@huawei.com>
> 主题: Re: [V2 0/7] hinic3 change for support new SPx NIC
> 
> On Mon, 16 Mar 2026 21:43:22 +0800
> Feifei Wang <wff_light@vip.163.com> wrote:
> 
> > From: chenyi221 <chenyi221@huawei.com>
> >
> > Change hinic3 driver to support Huawei new SPx series NIC.
> >
> > v2:
> > --fix build issues
> >
> > Feifei Wang (7):
> >   net/hinic3: add support for new SPx series NIC
> >   net/hinic3: add enhance cmdq support for new SPx series NIC
> >   net/hinic3: use different callback func to split new/old cmdq
> >     operations
> >   net/hinic3: add fun init ops to support Compact CQE
> >   net/hinic3: add rx ops to support Compact CQE
> >   net/hinic3: add tx ops to support Compact CQE
> >   net/hinic3: use different callback func to support htn fdir
> >
> >  drivers/net/hinic3/base/hinic3_cmd.h          |  80 ++-
> >  drivers/net/hinic3/base/hinic3_cmdq.c         | 370 ++++------
> >  drivers/net/hinic3/base/hinic3_cmdq.h         | 112 ++-
> >  drivers/net/hinic3/base/hinic3_cmdq_enhance.c | 111 +++
> > drivers/net/hinic3/base/hinic3_cmdq_enhance.h | 125 ++++
> >  drivers/net/hinic3/base/hinic3_csr.h          |  18 +-
> >  drivers/net/hinic3/base/hinic3_hw_comm.c      |  15 +-
> >  drivers/net/hinic3/base/hinic3_hw_comm.h      |  31 +-
> >  drivers/net/hinic3/base/hinic3_hwdev.c        |  13 +-
> >  drivers/net/hinic3/base/hinic3_hwdev.h        |  18 +
> >  drivers/net/hinic3/base/hinic3_hwif.c         |  10 +-
> >  drivers/net/hinic3/base/hinic3_mgmt.c         |   5 +-
> >  drivers/net/hinic3/base/hinic3_mgmt.h         |   2 +
> >  drivers/net/hinic3/base/hinic3_nic_cfg.c      | 182 ++---
> >  drivers/net/hinic3/base/hinic3_nic_cfg.h      |  98 ++-
> >  drivers/net/hinic3/base/meson.build           |   1 +
> >  drivers/net/hinic3/hinic3_ethdev.c            | 280 ++++++--
> >  drivers/net/hinic3/hinic3_ethdev.h            | 120 ++--
> >  drivers/net/hinic3/hinic3_fdir.c              | 657 +++++++++++++-----
> >  drivers/net/hinic3/hinic3_fdir.h              | 361 ++++++++--
> >  drivers/net/hinic3/hinic3_nic_io.c            | 525 ++++++--------
> >  drivers/net/hinic3/hinic3_nic_io.h            | 163 ++++-
> >  drivers/net/hinic3/hinic3_rx.c                | 265 +++++--
> >  drivers/net/hinic3/hinic3_rx.h                | 182 ++++-
> >  drivers/net/hinic3/hinic3_tx.c                | 458 ++++++------
> >  drivers/net/hinic3/hinic3_tx.h                | 154 +++-
> >  .../net/hinic3/htn_adapt/hinic3_htn_cmdq.c    | 167 +++++
> >  .../net/hinic3/htn_adapt/hinic3_htn_cmdq.h    |  63 ++
> >  drivers/net/hinic3/htn_adapt/meson.build      |   7 +
> >  drivers/net/hinic3/meson.build                |   8 +-
> >  .../net/hinic3/stn_adapt/hinic3_stn_cmdq.c    | 151 ++++
> >  .../net/hinic3/stn_adapt/hinic3_stn_cmdq.h    |  46 ++
> >  drivers/net/hinic3/stn_adapt/meson.build      |   7 +
> >  33 files changed, 3362 insertions(+), 1443 deletions(-)  create mode
> > 100644 drivers/net/hinic3/base/hinic3_cmdq_enhance.c
> >  create mode 100644 drivers/net/hinic3/base/hinic3_cmdq_enhance.h
> >  create mode 100644 drivers/net/hinic3/htn_adapt/hinic3_htn_cmdq.c
> >  create mode 100644 drivers/net/hinic3/htn_adapt/hinic3_htn_cmdq.h
> >  create mode 100644 drivers/net/hinic3/htn_adapt/meson.build
> >  create mode 100644 drivers/net/hinic3/stn_adapt/hinic3_stn_cmdq.c
> >  create mode 100644 drivers/net/hinic3/stn_adapt/hinic3_stn_cmdq.h
> >  create mode 100644 drivers/net/hinic3/stn_adapt/meson.build
> >
> > --
> > 2.45.1.windows.1
> >
> 
> Still lots of things that need to be addressed here.
> See the following AI patch review.
> 
> 
> Patch 1/7: net/hinic3: add support for new SPx series NIC
> 
> HINIC3_DEV_ID_SP230 is defined as 0X0229 with an uppercase X.
> Every other hex constant in the file uses lowercase 0x. Should be 0x0229.
[Feifei] Done
> 
> HINIC3_DEV_ID_SP920 has no VF counterpart and no entry in hinic3_is_vf_dev().
> Is that intentional?
[Feifei] Yes, SP920 now doesn't support VF function.
> 
> Patch 2/7: net/hinic3: add enhance cmdq support
> 
> The unified cmdq_sync_cmd() retains rte_smp_rmb() which is a deprecated barrier.
> Since this function is being rewritten, please convert to
> rte_atomic_thread_fence(rte_memory_order_acquire).
[Feifei] Done
> 
> HINIC3_CMDQ_BUF_SIZE changed from 2048 to 1024 without any explanation in
> the commit message. If existing normal-cmdq commands relied on the larger
> buffer this could silently truncate them.
[Feifei] Done, explanation is written in patch 2 commit message:
"HINIC3_CMDQ_BUF_SIZE changed from 2048 to 1024 to adapt to
the two types of NICs"
> 
> Patch 3/7: net/hinic3: use different callback func to split new/old cmdq operations
> 
> The call sites in hinic3_ethdev.c use hinic3_cmdq_get_stn_ops() and
> hinic3_cmdq_get_htn_ops() but the actual definitions are
> hinic3_nic_cmdq_get_stn_ops() and hinic3_nic_cmdq_get_htn_ops().
> This will not link. Patch 4 fixes the call site but each commit must compile
> independently.
[Feifei] Done.
> 
> In htn_adapt/hinic3_htn_cmdq.c the static function
> prepare_rss_indir_table_cmd_header() is called before it is defined, with no
> forward declaration. This will fail with -Werror=implicit-function-declaration.
[Feifei]Done.
> 
> Patch 4/7: net/hinic3: add fun init ops to support Compact CQE
> 
> In hinic3_rx_queue_setup(), when ci_mz allocation fails the code calls
> hinic3_memzone_free(ci_mz) on a NULL pointer before jumping to the error label.
> This call is either a NULL dereference or dead code and should be removed.
[Feifei]Done.
> 
> The error-path goto labels in hinic3_func_init() are misordered.
> The allocation order is mac_addrs, cmdq_ops, rx_ops, tx_ops, mc_list but the
> cleanup labels do not reverse this properly. For example if cmdq_ops allocation
> fails, mac_addrs is never freed.
> If tx_ops fails, neither cmdq_ops nor mac_addrs are freed. This leaks memory on
> every init failure path.
[Feifei]Done.
> 
> The ternary in hinic3_pf_get_default_cos() assigns HINIC3_COS_NUM_MAX (8)
> when NIC_F_HTN_CMDQ is set and HINIC3_COS_NUM_MAX_HTN (4) when it is
> not. The naming suggests this is backwards. Please verify.
[Feifei]Done
> 
> Patch 5/7: net/hinic3: add rx ops to support Compact CQE
> 
> hinic3_poll_integrated_cqe_rq_empty() uses __atomic_load_n() with
> __ATOMIC_ACQUIRE. New code must use rte_atomic_load_explicit() with
> rte_memory_order_acquire instead of the GCC built-in.
[Feifei] Done.
> 
> Patch 7/7: net/hinic3: use different callback func to support htn fdir
> 
> Copy-paste bug in hinic3_rss_hash_update() and hinic3_rss_conf_get().
> In both functions the else branch has:
> 
>     rss_type.ipv6_ext = 0;
>     rss_type.ipv6_ext = 0;
> 
> The second line should be rss_type.tcp_ipv6_ext = 0. As written tcp_ipv6_ext is
> never cleared on non-HTN hardware which will produce incorrect RSS
> configuration.
[Feifei] Done

  reply	other threads:[~2026-03-19  2:50 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-31 10:05 [PATCH 0/7] hinic3 change for support new SPx NIC Feifei Wang
2026-01-31 10:05 ` [PATCH 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-16 13:43   ` [V2 0/7] hinic3 change for support new SPx NIC Feifei Wang
2026-03-16 13:43     ` [V2 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-16 13:43     ` [V2 2/7] net/hinic3: add enhance cmdq " Feifei Wang
2026-03-16 13:43     ` [V2 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-03-16 13:43     ` [V2 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-03-16 13:43     ` [V2 5/7] net/hinic3: add rx " Feifei Wang
2026-03-16 13:43     ` [V2 6/7] net/hinic3: add tx " Feifei Wang
2026-03-16 13:43     ` [V2 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-03-16 15:45     ` [V2 0/7] hinic3 change for support new SPx NIC Stephen Hemminger
2026-03-19  2:50       ` wangfeifei (J) [this message]
2026-03-19 13:52     ` [v6 " Feifei Wang
2026-03-19 13:52       ` [V6 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-19 13:52       ` [V6 2/7] net/hinic3: add enhance cmdq " Feifei Wang
2026-03-19 13:52       ` [V6 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-03-19 13:52       ` [V6 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-03-19 13:52       ` [V6 5/7] net/hinic3: add rx " Feifei Wang
2026-03-19 13:52       ` [V6 6/7] net/hinic3: add tx " Feifei Wang
2026-03-19 13:52       ` [V6 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-03-21 17:32       ` [v6 0/7] hinic3 change for support new SPx NIC Stephen Hemminger
2026-03-22 16:32       ` Stephen Hemminger
2026-03-23  8:04     ` [PATCH v7 " Feifei Wang
2026-03-23  8:04       ` [PATCH v7 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-23 19:51         ` Stephen Hemminger
2026-03-23  8:04       ` [PATCH v7 2/7] net/hinic3: add enhance cmdq " Feifei Wang
2026-03-23  8:04       ` [PATCH v7 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-03-23  8:04       ` [PATCH v7 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-03-23  8:04       ` [PATCH v7 5/7] net/hinic3: add rx " Feifei Wang
2026-03-23  8:04       ` [PATCH v7 6/7] net/hinic3: add tx " Feifei Wang
2026-03-23  8:04       ` [PATCH v7 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-03-23 19:50         ` Stephen Hemminger
2026-03-24  1:19           ` 回复: " wangfeifei (J)
2026-03-24  1:55     ` [PATCH v8 0/7] hinic3 change for support new SPx NIC Feifei Wang
2026-03-24  1:55       ` [PATCH v8 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-24  1:55       ` [PATCH v8 2/7] net/hinic3: add enhance cmdq " Feifei Wang
2026-03-24  1:55       ` [PATCH v8 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-03-24  1:55       ` [PATCH v8 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-03-24  1:55       ` [PATCH v8 5/7] net/hinic3: add rx " Feifei Wang
2026-03-24  1:55       ` [PATCH v8 6/7] net/hinic3: add tx " Feifei Wang
2026-03-24  1:55       ` [PATCH v8 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-03-24  3:27       ` [PATCH v8 0/7] hinic3 change for support new SPx NIC Stephen Hemminger
2026-03-24  3:31       ` Stephen Hemminger
2026-03-24 14:41       ` Stephen Hemminger
2026-03-24 14:42       ` Stephen Hemminger
2026-03-25  1:30         ` 回复: " wangfeifei (J)
2026-03-25 13:37         ` Thomas Monjalon
2026-03-25 14:02           ` Thomas Monjalon
2026-03-18  2:19   ` [v3 " Feifei Wang
2026-03-18  2:19     ` [V3 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-18  2:19     ` [V3 2/7] net/hinic3: add enhance cmdq " Feifei Wang
2026-03-18  2:19     ` [V3 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-03-18  2:19     ` [V3 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-03-18  2:19     ` [V3 5/7] net/hinic3: add rx " Feifei Wang
2026-03-18  2:19     ` [V3 6/7] net/hinic3: add tx " Feifei Wang
2026-03-18  2:19     ` [V3 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-03-18  6:20   ` [v4 0/7] hinic3 change for support new SPx NIC Feifei Wang
2026-03-18  6:20     ` [V4 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-18  6:20     ` [V4 2/7] net/hinic3: add enhance cmdq " Feifei Wang
2026-03-18  6:20     ` [V4 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-03-18  6:20     ` [V4 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-03-18  6:20     ` [V4 5/7] net/hinic3: add rx " Feifei Wang
2026-03-18  6:20     ` [V4 6/7] net/hinic3: add tx " Feifei Wang
2026-03-18  6:20     ` [V4 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-03-18 12:31   ` [v5 0/7] hinic3 change for support new SPx NIC Feifei Wang
2026-03-18 12:31     ` [V5 1/7] net/hinic3: add support for new SPx series NIC Feifei Wang
2026-03-18 12:31     ` [V5 2/7] net/hinic3: add enhance cmdq " Feifei Wang
2026-03-18 12:31     ` [V5 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-03-18 12:31     ` [V5 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-03-18 12:32     ` [V5 5/7] net/hinic3: add rx " Feifei Wang
2026-03-18 12:32     ` [V5 6/7] net/hinic3: add tx " Feifei Wang
2026-03-18 12:32     ` [V5 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-01-31 10:05 ` [PATCH 2/7] net/hinic3: add enhance cmdq support for new SPx series NIC Feifei Wang
2026-01-31 10:05 ` [PATCH 3/7] net/hinic3: use different callback func to split new/old cmdq operations Feifei Wang
2026-01-31 10:06 ` [PATCH 4/7] net/hinic3: add fun init ops to support Compact CQE Feifei Wang
2026-01-31 10:06 ` [PATCH 5/7] net/hinic3: add rx " Feifei Wang
2026-01-31 10:06 ` [PATCH 6/7] net/hinic3: add tx " Feifei Wang
2026-01-31 10:06 ` [PATCH 7/7] net/hinic3: use different callback func to support htn fdir Feifei Wang
2026-01-31 18:17   ` [REVIEW] net/hinic3: use different callback func to support htnfdir Stephen Hemminger
2026-02-02  1:17     ` 回复: " wangfeifei (J)

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=2f53819ae73642a2b4837cef530c15e9@huawei.com \
    --to=wangfeifei40@huawei.com \
    --cc=chenyi221@huawei.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=wff_light@vip.163.com \
    --cc=zengweiliang.zengweiliang@huawei.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.