At 2026-11-20 23:43:18, "Stephen Hemminger" <[email protected]> wrote:
>On Tue, 17 Nov 2026 23:56:41 +0800
>Jiacheng Ye <[email protected]> wrote:
>
>> net/hinic3: add PMD features and fixes
>>
>> This series fixes offload capability advertisement, cmdq/compact CQE
>> configuration, and a handful of driver defects, and adds NIC
>> type identification, FEC, CIR drop statistics, VF LAG/link state, COS
>> mask/map, mbox recording, RSS hash configuration, compact CQE Rx/Tx
>> paths, TSO segment expansion, Tx burst mode reporting, queue statistics,
>> pseudo-header checksum, per-tile cmdq ops, SP560 NIC support, and device
>> kvargs tunables.
>>
>> Changes in v7:
>
>Need to resolve the last warning.
>
>Subject: Re: [PATCH v7 00/29] net/hinic3 series
>
>All 29 patches apply to main and every commit builds with
>-Dwerror=true. The open items from v6 are resolved: SP230 no longer
>allocates eventfds or enables the Rx vectors when intr_conf.rxq is
>off, dev_start honours admin_down, set_link_down restores admin_down
>on failure, the Fixes: hashes are 12 characters, and rss_en now
>tracks rss_type.
>
>Two warnings remain, both about documentation rather than code.
>
>
>Warning
>=======
>
>[PATCH 20/29] net/hinic3: refactor flow rule parsing
>
>The patch drops every vlan_flag mask/value pair from the TCAM key,
>e.g.:
>
> - tcam_key->key_mask.vlan_flag = 1;
> - tcam_key->key_info.vlan_flag = 0;
>
>Before, FDIR rules matched only untagged packets. Now they match
>tagged and untagged packets alike. That is a behaviour change, and
>the commit message does not mention it. If it is intended, add a
>sentence such as:
>
> FDIR rules no longer match on the VLAN flag, so a rule now
> hits both tagged and untagged packets.
>
>If it is not intended, restore the vlan_flag lines.
[Jiacheng] Intended, and the commit message now says so. The TCAM does not
support VLAN matching, so the vlan_flag mask/value pairs in the key were
meaningless and all of them are removed. A rule now matches both tagged and
untagged packets. Added to the commit message:
The TCAM does not support VLAN matching, so the vlan_flag mask/value
pairs in the key were meaningless and are removed. A rule now matches
both tagged and untagged packets.
Code unchanged.
>
>
>[PATCH 22/29] net/hinic3: add device kvargs parameters support
>[PATCH 23/29] net/hinic3: add compact CQE Rx path and ptype table
>
>The new "Runtime Configuration" section uses a bullet list of
>term/description pairs. Make it a definition list:
>
> ``tx_pending_limit`` (default ``2``)
> Tx completion coalescing pending limit, in units of 8
> packets.
>
> ``tx_coalescing_time`` (default ``2``)
> Tx completion coalescing time, in microseconds.
>
> ``rx_cqe_compact_en`` (default ``1``)
> Enable (``1``) or disable (``0``) compact CQE mode.
> Ignored on NICs without compact CQE support.
>
> ``rx_cqe_coalesce_num`` (default ``7``)
> Rx CQE coalescing count, in units of 8 packets.
>
> ``rx_cqe_timer_loop`` (default ``5``)
> Rx CQE coalescing timer, in microseconds.
>
>The rx_cqe_compact_en entry belongs in 23/29 and the rest in 22/29.
[Jiacheng] Fixed. Adopted your definition-list layout: the term on its own line
and the description indented by three spaces, defaults and units included.
Ownership is split the way you asked -- rx_cqe_compact_en is in 22/28 (the
compact CQE patch, old 23/29) and tx_pending_limit, tx_coalescing_time,
rx_cqe_coalesce_num and rx_cqe_timer_loop are in 21/28 (the kvargs patch, old
22/29).
One wording change: the rx_cqe_compact_en description no longer keeps the
sentence that was in the patch. That sentence said the option is "Ignored on
NICs without compact CQE support", but the driver does more than ignore it. The
Rx burst is chosen from the requested mode, while the RQ context, the CEQ
attributes and the vport flag are built from the compact CQE capability
bits, so on a NIC that has the SW compact CQE bit the two must agree. The
entry now reads:
``rx_cqe_compact_en`` (default ``1``)
Enable (``1``) or disable (``0``) compact CQE mode. The SP230 reports the
HW compact CQE feature bit and always uses the compact Rx mode; the SP560
reports the SW compact CQE feature bit and follows this setting; the SP620
reports neither.
The layout you asked for, the defaults and the units are unchanged; only the
description text differs from the earlier wording.
>
>
>Info
>====
>
>[PATCH 06/29] rte_atomic_thread_fence() orders memory between CPUs,
>not between the CPU and the device. If the cleared rq_ci has to be
>ordered before the device runs again, use rte_io_wmb(). Otherwise
>drop the fence.
[Jiacheng] Agreed, and the fence is deleted. hinic3_reset_rx_queue() runs from
dev_start(), before the RQ is started, so the device is not running at that
point and there is no CPU-to-device ordering for the fence to provide. The
clear itself stays.
>
>[PATCH 07/29] dev_private is always present in a secondary process,
>so this check is dead code, and the message and -ENOMEM do not match
>what it tests:
>
> if (nic_dev == NULL) {
> PMD_DRV_LOG(ERR, "nic_dev hwdev is NULL, dev_name: %s",
>
>Drop it.
[Jiacheng] Dropped. The mismatched ERR message and the -ENOMEM return are gone
with it; the nic_dev assignment that the following code uses is kept.
>
>[PATCH 10/29] This patch has Cc: stable, but it uses
>HINIC3_IS_SP230_NIC() from 09/29, which is not tagged. Either tag
>09/29 as well, or name the dependency so 25.11 backporters can find
>it.
[Jiacheng] Fixed by folding 09/29 into 10/29. The merged commit keeps the
Fixes: tag and the Cc: [email protected] of the old 10/29, so
HINIC3_IS_SP230_NIC() and its only user are in the same backportable commit.
The NIC identification added by the old 09/29 is used in exactly one place, so
the subject is now "net/hinic3: fix pseudo-header checksum and identify NIC
type" and the body covers that part as well. Measured: the merged commit
cherry-picks onto the base and builds with -Dwerror=true on its own. Eight
later commits use the nic_type mechanism, but none of them carries Cc: stable,
so there is no other tagged commit that depends on untagged code. The series is
28 patches from here on, and the later numbering is one lower than in v7.
>
>[PATCH 11/29] The explanation in the v6 reply checks out:
>disable_all_msix() turns off every vector at hwif init, and
>hinic3_dev_rx_queue_intr_enable() returns before
>hinic3_set_msix_state(..., HINIC3_MSIX_ENABLE) on SP230 when
>intr_conf.rxq is off. One gap remains. Nothing compares
>nb_rx_queues + HINIC3_RX_VEC_START against hwif->attr.num_irqs, so
>on a function with fewer vectors than queues, INTR names a vector
>that does not exist. The intr_conf.rxq path has the same gap. Reject
>that configuration in dev_configure, or skip the SP230 branch when
>there are not enough vectors.
[Jiacheng] Fixed. Added hinic3_check_rxq_intr_vec(), which checks
HINIC3_RX_VEC_START + nb_rx_queues - 1 < num_irqs and returns -EINVAL with an
ERR log otherwise. It is called from both the intr_conf.rxq == 0 SP230 branch
and the intr_conf.rxq == 1 path, ahead of rte_intr_efd_enable().
We tested this during v6: with the typical configurations the vector count was
always sufficient and the overflow did not occur. We still add the check as
hardening.
>
>[PATCH 15/29] hinic3_dump_aeq_mbox_info() prints all
>HINIC3_MBOX_SAVE_NUM slots even when fewer messages were recorded,
>so empty slots appear as cmd 0, mod 0. Loop to save_mbox->count
>instead.
[Jiacheng] Fixed. The loop now runs to save_mbox->count and indexes from
save_mbox->start, so empty slots are no longer printed as cmd 0, mod 0.
>
>[PATCH 17/29] hinic3_dev_set_link_up() clears admin_down before the
>vport and port enable, but unlike set_link_down it does not restore
>it on failure. If either call fails, admin_down stays cleared, and
>the next PF link-up event enables the vport. Restore it on the error
>paths, as set_link_down does.
[Jiacheng] Accepted. Both error paths -- vport enable failure and port enable
failure -- now restore nic_dev->admin_down = 1, matching set_link_down().
>
>[PATCH 25/29] The hinic3_copy_mempool_init() comment says the pool
>"must be able to cover a full ring of in-flight packets", but the
>pool is capped at 256 mbufs per queue. Reword the comment to say the
>cap is deliberate, and that when the pool runs out the burst stops at
>that packet.
[Jiacheng] Reworded. The comment no longer claims the pool covers a full ring.
It now says the 256 mbufs per queue cap is deliberate (it bounds how much
hugepage memory one port can pin) and that when the pool runs out the burst
stops at that packet and is returned to the caller. Checked against the code:
hinic3_copy_tx_mbuf_multi() returns NULL when the allocation fails, and the
call site in hinic3_tx.c returns -EINVAL there.
>
>[PATCH 26/29] Before this patch, every NIC got TCPUDP_CS set for
>VXLAN, VXLAN-GPE and GENEVE packets:
>
> SQ_CTRL_QUEUE_INFO_SET(queue_info->udp_dp_en, TCPUDP_CS) |
>
>The new scalar path builds queue_info from TSO, PLDOFF, MSS and UC
>only, so NICs without TX_WQE_COMPACT_TASK no longer set the bit. The
>commit message does not mention this.
[Jiacheng] Commit message only, code unchanged. Your description is exact: the
scalar path builds queue_info from TSO, PLDOFF, MSS and UC only, so NICs
without TX_WQE_COMPACT_TASK no longer set TCPUDP_CS, while the compact task
path still sets it. That is the intended behaviour of the new path and is now
stated in the commit message.
>
>[PATCH 26/29, 28/29] The Tx path is selected by
>NIC_F_TX_WQE_COMPACT_TASK and has no CQE, yet the function is named
>hinic3_xmit_pkts_compact_cqe() and burst mode reports "compact CQE".
>"compact task" would match what it does. In the scalar burst,
>hinic3_get_sq_wqe() never returns NULL, so the !sq_wqe branch is dead
>code.
[Jiacheng] Fixed. Renamed to hinic3_xmit_pkts_compact_task() (definition,
header prototype and the assignment all updated), burst mode now reports
"compact task", and the dead !sq_wqe branch is removed.
[Jiacheng] One more point: on a NIC that reports the SW compact CQE bit, asking
for the separate mode now clears that bit as well, so the module parameter, the
RQ context, the CEQ attributes and the vport flag cannot disagree.
[PS] The SP230 and the SP560 actually support both Rx modes and both Tx modes.
We prefer the native pairing and, to avoid extra changes, restricted the path
selection above. The SP560 works perfectly with the old separate Rx, so both
Rx paths are left open for it.
>
>Review-Result: WARNING