<div data-ntes="ntes_mail_body_root" style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div id="spnEditorContent"><div style="margin: 0;"><br></div></div><pre>Hi Stephen,<br><br>Thanks for the followup. Replies below;<br><br>At 2026-11-12 22:27:22, "Stephen Hemminger" <stephen@networkplumber.org> wrote:<br>>On Tue, 10 Nov 2026 00:20:04 +0800<br>>Jiacheng Ye <yejiacheng4@h-partners.com> wrote:<br>><br>>> This series fixes offload capability advertisement, cmdq/compact CQE<br>>> configuration, and several defects found during review, and adds NIC<br>>> type identification, FEC, CIR drop statistics, VF LAG/link state, COS<br>>> mask/map, mbox recording, RSS hash configuration, compact CQE Rx/Tx<br>>> paths, TSO segment expansion, Tx burst mode reporting, queue statistics,<br>>> pseudo-header checksum, per-tile cmdq ops, SP560 NIC support, and device<br>>> kvargs tunables.<br>>> <br>>> Changes in v6:<br>>> - Rebase on current main and address the v5 review comments.<br>>> - 0003/0005: correct the Fixes: tags, drop the Cc: stable request for<br>>>   fixes to code that has never been in a stable release, and remove the<br>>>   dead null check in the vport enable fix.<br>>> - 0006: clear the stale hardware consumer index on Rx queue reset.<br>>> - 0009: reject a packet whose first segment is shorter than the<br>>>   pseudo-header, narrow the shared-mbuf check to the L4/TSO flags,<br>>>   compare the tunnel type as a whole enum, and compute the outer and inner<br>>>   pseudo-header checksums.<br>>> - 0010: arm the SP230 per-queue vectors when Rx interrupts are disabled,<br>>>   so vfio masks them after the first assertion, and keep the<br>>>   coalescing-only fallback for igb_uio/uio_pci_generic.<br>>> - 0011: advertise OUTER_UDP_CKSUM now that the outer UDP pseudo-header is<br>>>   written in the software prepare step. Drop the stale QinQ features.ini<br>>>   entry and unused QINQ mbuf flag.<br>>> - 0012: select the CIR drop counters by NIC type in calc_num, get_names<br>>>   and get.<br>>> - 0013: report the needed capability count for a short array, mask<br>>>   AUTO out of the reported capabilities, keep the GET-side firmware<br>>>   NOT_SET to AUTO mapping, and reject unknown firmware values.<br>>> - 0014: take the PCI device from the ethdev in priv_dump so a secondary<br>>>   process does not dereference a stale pointer.<br>>> - 0016: keep a separate admin-down flag so a PF link up event cannot<br>>>   override dev_set_link_down().<br>>> - 0018: cache RSS enablement per queue and clear rss_type when RSS is<br>>>   disabled.<br>>> - 0019: reject outer IPv6 with an inner L3, and stop setting the VLAN<br>>>   flag mask in the TCAM keys.<br>>> - 0021: document that the coalescing tunables only take effect with<br>>>   HW compact CQE.<br>>> - 0022: report the combined compact-CQE checksum error as an unknown<br>>>   result instead of blaming the IP or the L4 layer, and keep the ptype<br>>>   table in sync with the advertised ptype set.<br>>> - 0023: reject a queue depth that differs from the first queue instead<br>>>   of coercing it, reset the expected depth in dev_configure() and<br>>>   dev_stop(), validate it in dev_start(), and mark Tx queues stopped in<br>>>   dev_stop().<br>>> - 0024: reject TSO packets that need more SGEs than the ring can hold,<br>>>   reject a tso_segsz that does not fit the 14-bit MSS field, and report<br>>>   nb_seg_max/nb_mtu_seg_max.<br>>> - 0025: clear queue_info in the scalar burst for compact WQEs like<br>>>   hinic3_master, clear the per-packet offload state, guard the prefetch<br>>>   against an empty burst, and remove the per-packet data path logs.<br>>>   Per-packet unsupported-type messages are lowered to DEBUG.<br>>>   Tunnel packets are accepted by type instead of by feature bit;<br>>>   VXLAN_GPE TSO and IPIP TSO on SP620 stay rejected.<br>>>   SP230 does not get the software pseudo-header writes because its<br>>>   hardware derives the inner checksums and TSO headers itself.<br>>> - 0027: report the Tx burst mode of the function that is installed.<br>>> <br>>> Changes in v5:<br>>> - Register hinic3_prep_pkts() in the pseudo-header checksum patch instead<br>>>   of the compact CQE Rx patch.<br>>> - Mention only SP620 in that commit message.<br>>> - Document the RQ CEQ EN bit and the INTR field for SW compact CQE.<br>>> - Drop the per-packet ERR log for a zero tso_segsz.<br>>> - Keep log and error messages on a single line.<br>>> - Check the non-TSO packet length before the early SGE-count return.<br>>> - Scale the coalescing parameters by their unit in the log.<br>>> - Clear the stale Rx hardware CI write-back memory on queue reset.<br>>> <br>>> Changes in v4:<br>>> - Reordered the queue-depth, TSO and pseudo-header patches to keep the<br>>>   series bisectable; sized the copy pool from the Tx queue depth, kept the<br>>>   copy chain consistent and rejected a zero tso_segsz.<br>>> - Fixed the pseudo-header L4 protocol and dropped the IPv6 extension-header<br>>>   walk; split the SP230 MSI-X handling; validated the VXLAN-GPE mask and<br>>>   the device kvargs.<br>>> <br>>> Changes in v3:<br>>> - Moved the TCAM leak fix into its own patch; set the burst pointers and<br>>>   tx_pkt_prepare for secondary processes; zeroed the RQ/SQ contexts.<br>>> - Fixed the Tx burst return count and prefetch guard; validated kvargs;<br>>>   reset the queue depths in dev_configure(); reported FEC per speed;<br>>>   routed priv_dump through fprintf(); derived the pseudo-header protocol<br>>>   from the offload flags.<br>>> <br>>> Changes in v2:<br>>> - Added the five bug fixes (SP230 VF ID, ethertype double removal, VXLAN<br>>>   VNI mask, vport NULL deref, secondary ops); split the NIC type<br>>>   identification; added hinic3.rst/features.ini.<br>>> - Dropped the unused devargs and Tx/Rx spin loops; corrected the<br>>>   GENEVE/VXLAN-GPE/SP620 IP-in-IP rule handling.<br>>> <br>>> Changes in v1:<br>>> - Initial posting.<br>>> <br>>> Every commit builds with -Dwerror=true.<br>>> <br>>> Jiacheng Ye (28):<br>>>   net/hinic3: fix SP230 VF PCI device ID<br>>>   net/hinic3: fix double removal in ethertype flow destroy<br>>>   net/hinic3: fix TCAM index leak on ethertype flow set<br>>>   net/hinic3: fix VXLAN VNI spec and mask write<br>>>   net/hinic3: fix vport enable null dereference<br>>>   net/hinic3: clear stale Rx hardware CI on queue reset<br>>>   net/hinic3: attach ethdev and set ops in secondary process<br>>>   net/hinic3: add NIC type identification<br>>>   net/hinic3: fix pseudo-header checksum calculation<br>>>   net/hinic3: add SP230 Rx queue interrupt handling<br>>>   net/hinic3: fix offload and cmdq/compact CQE config<br>>>   net/hinic3: add CIR drop statistics and VF LAG support<br>>>   net/hinic3: add FEC mode get/set and capability support<br>>>   net/hinic3: add mbox message recording and debug dump<br>>>   net/hinic3: add COS mask and COS map support<br>>>   net/hinic3: add VF link state and promiscuous support<br>>>   net/hinic3: convert cmdq ops to static global variables<br>>>   net/hinic3: update RSS hash type configuration<br>>>   net/hinic3: refactor flow rule parsing<br>>>   net/hinic3: add SP560 NIC type identification and handling<br>>>   net/hinic3: add device kvargs parameters support<br>>>   net/hinic3: add compact CQE Rx path and ptype table<br>>>   net/hinic3: ensure queue depth and state consistency<br>>>   net/hinic3: expand TSO from 127 to 255 segments<br>>>   net/hinic3: split Tx burst function for compact CQE support<br>>>   net/hinic3: add SP230 VF software statistics<br>>>   net/hinic3: add Tx burst mode get<br>>>   net/hinic3: expose Tx queue copied-mbuf statistics<br>>> <br>>>  .mailmap                                      |    1 +<br>>>  doc/guides/nics/features/hinic3.ini           |    5 +-<br>>>  doc/guides/nics/hinic3.rst                    |   27 +-<br>>>  doc/guides/rel_notes/release_26_11.rst        |   13 +<br>>>  drivers/net/hinic3/base/hinic3_cmd.h          |    2 +<br>>>  drivers/net/hinic3/base/hinic3_csr.h          |    6 +-<br>>>  drivers/net/hinic3/base/hinic3_eqs.c          |   64 +-<br>>>  drivers/net/hinic3/base/hinic3_eqs.h          |    9 +-<br>>>  drivers/net/hinic3/base/hinic3_hw_cfg.c       |    2 +<br>>>  drivers/net/hinic3/base/hinic3_hw_cfg.h       |    8 +-<br>>>  drivers/net/hinic3/base/hinic3_hw_comm.c      |    9 +-<br>>>  drivers/net/hinic3/base/hinic3_hwdev.h        |    3 +-<br>>>  drivers/net/hinic3/base/hinic3_hwif.c         |    4 +-<br>>>  drivers/net/hinic3/base/hinic3_mbox.c         |   45 +<br>>>  drivers/net/hinic3/base/hinic3_mbox.h         |   19 +<br>>>  drivers/net/hinic3/base/hinic3_nic_cfg.c      |  201 ++-<br>>>  drivers/net/hinic3/base/hinic3_nic_cfg.h      |  105 +-<br>>>  drivers/net/hinic3/base/hinic3_nic_event.c    |   71 +-<br>>>  drivers/net/hinic3/hinic3_ethdev.c            |  904 ++++++++++++--<br>>>  drivers/net/hinic3/hinic3_ethdev.h            |   58 +-<br>>>  drivers/net/hinic3/hinic3_fdir.c              |   51 +-<br>>>  drivers/net/hinic3/hinic3_fdir.h              |    8 +-<br>>>  drivers/net/hinic3/hinic3_flow.c              |  590 ++++++---<br>>>  drivers/net/hinic3/hinic3_flow.h              |  196 ---<br>>>  drivers/net/hinic3/hinic3_nic_io.c            |  184 +--<br>>>  drivers/net/hinic3/hinic3_nic_io.h            |   98 ++<br>>>  drivers/net/hinic3/hinic3_rx.c                |  633 ++++++++--<br>>>  drivers/net/hinic3/hinic3_rx.h                |  206 ++--<br>>>  drivers/net/hinic3/hinic3_tx.c                | 1098 +++++++++++++----<br>>>  drivers/net/hinic3/hinic3_tx.h                |   53 +-<br>>>  .../net/hinic3/htn_adapt/hinic3_htn_cmdq.c    |   65 +-<br>>>  .../net/hinic3/htn_adapt/hinic3_htn_cmdq.h    |    6 +-<br>>>  .../net/hinic3/stn_adapt/hinic3_stn_cmdq.c    |   76 +-<br>>>  .../net/hinic3/stn_adapt/hinic3_stn_cmdq.h    |    6 +-<br>>>  34 files changed, 3641 insertions(+), 1185 deletions(-)<br>>>  delete mode 100644 drivers/net/hinic3/hinic3_flow.h<br>>> <br>><br>>AI review feedback. This was followon to earlier review and I fed in<br>>your response as well. I see two warnings that still need to be<br>>addressed.<br>><br>>-----------------------------------------------------------------<br>><br>><br>>Subject: Re: [PATCH v6 00/28] net/hinic3: fixes and new features<br>><br>>Applies to main and every commit builds with -Dwerror=true. The three<br>>v5 errors are fixed: stale rss_type, the IPv6-outer IP-in-IP rule, and<br>>the 255-segment TSO stall. So are most of the v5 warnings.<br>><br>>On your hinic3.ini question: no new rows are needed. features.rst<br>>maps OUTER_IPV4_CKSUM to "Inner L3 checksum" and OUTER_UDP_CKSUM to<br>>"Inner L4 checksum" (the names are confusing). hinic3.ini already<br>>lists both, so v6 is correct as is. I was wrong to ask for "Outer"<br>>rows in v5.<br>><br>><br>>Warnings<br>>========<br>><br>>[PATCH 10/28] net/hinic3: add SP230 Rx queue interrupt handling<br>><br>>The new rationale is wrong. vfio-pci auto-masks INTx only. For MSI-X<br>>its handler signals the eventfd and returns, so nothing masks the<br>>vector after it fires. The fall-through also makes things worse,<br>>because it runs the full Rx interrupt setup:<br>><br>>               /* Fall through to the per-queue MSI-X setup. */<br>>  ...<br>>               rxq->dp_intr_en = 1;<br>><br>>dp_intr_en = 1 clears intr_disable in the RQ context<br>>(hinic3_nic_io.c), so with intr_conf.rxq == 0 the queues now raise<br>>interrupts that nobody waits on. The host still takes every one of<br>>them.<br>><br>>To keep the vectors quiet, program coalescing and then disable each<br>>vector, as hinic3_disable_queue_intr() already does:<br>><br>> for (i = 0; i < dev->data->nb_rx_queues; i++) {<br>>          uint16_t vec = i + HINIC3_RX_VEC_START;<br>><br>>             err = hinic3_init_rxq_msix_attr(nic_dev->hwdev, vec);<br>>          if (err)<br>>                  return err;<br>>               hinic3_set_msix_state(nic_dev->hwdev, vec,<br>>                                   HINIC3_MSIX_DISABLE);<br>>       }<br>> return 0;<br>><br>>This works with any interrupt backend: no eventfds, no intr_vec, and<br>>dp_intr_en stays 0. Fix the commit message to match.<br>[Jiacheng] You are right that only INTx is auto-masked: the v6 rationale was<br>wrong, and the v7 commit message will no longer claim otherwise.<br><br>V7 will clear intr_disable in the RQ context (dp_intr_en = 1, EN = 0) and<br>will write the queue vector into INTR. It will not enable that vector, so no<br>interrupt will be reported while Rx keeps polling the descriptor ring.<br>Nothing in this configuration will touch the MSI-X table: disable_all_msix()<br>already disabled every vector during hwif init, and the only vector turned on<br>afterwards is the AEQ vector 0. hinic3_dev_rx_queue_intr_enable() will return<br>0 for SP230 before it touches the MSI-X table. Unlike the HTN tile, the STN<br>tile used by SP560 can encode an unused INTR.<br><br>INTR cannot simply be left at 0 on SP230: 0 selects MSI-X vector 0, which is<br>the AEQ vector. Measured on SP230 with vfio-pci: EN=0 with INTR=0 and EN=1<br>with INTR=0 both raise on vector 0, while EN=0 with INTR=1 raises nothing<br>because vector 1 is not enabled. Pointing INTR at a queue vector that is<br>never enabled is therefore the only way to keep the event silent without<br>touching the MSI-X table. No eventfds, no intr_vec and no MSI-X attribute<br>commands are involved.<br><br>That is also why the coalescing-then-disable recipe does not help here: the<br>raise happens on the AEQ vector 0, which is enabled and which that recipe<br>does not program, so neither its coalescing attributes nor the MSI-X state<br>of the queue vectors changes anything.<br><br>On igb_uio and uio_pci_generic the branch will return 0 without touching the<br>device. Nothing will be programmed there, so the original interrupt behaviour<br>will be unchanged and will not be fixed by this series: those backends expose<br>a single interrupt and give the PMD no per-vector state, so the queue vectors<br>cannot be named and the configuration will be left untouched.<br>><br>><br>>[PATCH 16/28] net/hinic3: add VF link state and promiscuous support<br>><br>>admin_down survives stop/start, but dev_start enables the vport<br>>unconditionally:<br>><br>>        err = hinic3_set_vport_enable(nic_dev->hwdev, true);<br>><br>>So after set_link_down, stop and start, the vport passes traffic while<br>>hinic3_vf_link_status() reports the link down. On the PF, the next<br>>link-up event leaves the vport disabled. Either clear admin_down in<br>>dev_start, or skip the vport enable there while it is set.<br>><br>>admin_down is also set before hinic3_set_vport_enable() is called and<br>>is not restored when that call fails. Set it after the call succeeds.<br>[Jiacheng] Accepted for both. dev_start() will skip the vport enable while<br>admin_down is set, so a stop/start cycle will not bring the vport back up.<br>dev_set_link_down() will record admin_down before it disables the vport and<br>will clear it again if that call fails, so a link-up event cannot re-enable<br>the vport between the two commands, and a failed disable will leave the<br>driver state unchanged.<br>><br>><br>>Info<br>>====<br>><br>>[PATCH 11/28] The Fixes: tags sit in the middle of the body, before<br>>the hinic3.ini paragraph. Move that paragraph above the tags so they<br>>are trailers again.<br>[Jiacheng] Accepted, the paragraphs will be reordered so the tags are<br>trailers again.<br>><br>>[PATCH 15/28] "Fixes: 9204b6b7bb" needs the 12-character hash:<br>>9204b6b7bb1a.<br>[Jiacheng] Accepted.<br>><br>>[PATCH 18/28] rxq->rss_en only follows rss_state.<br>>hinic3_rss_hash_update() with rss_hf == 0 on a port with RSS enabled<br>>sets rss_type to 0 but leaves rss_state at ENABLE. The compact CQE<br>>path then keeps setting RTE_MBUF_F_RX_RSS_HASH. v5 avoided this by<br>>testing rss_type.val. Either reject rss_hf == 0 there, or include<br>>rss_type.val != 0 when setting rss_en.<br>[Jiacheng] I will take the second option: rss_en will be derived from both<br>rss_state and rss_type, and hinic3_rss_hash_update() will refresh it on every<br>queue. A queue may keep the old value for one more burst because the cached<br>flag is refreshed while the fast path reads it, but the flag will be declared<br>as RTE_ATOMIC(uint8_t) and every access will use rte_atomic_load_explicit() or<br>rte_atomic_store_explicit() with rte_memory_order_relaxed, so the two paths<br>will no longer mix atomic and non-atomic accesses to the same object. Dynamic<br>reconfiguration is rare, so a slower control path is preferable to reading<br>the shared nic_dev on every packet.<br><br>Thanks again for the review.<br><br>Regards,<br>Jiacheng<br><br></pre></div>