[PATCH v8 08/28] net/hinic3: fix per-queue start/stop on non-HTN devices
Jiacheng Ye
yejiacheng4 at h-partners.com
Fri Nov 20 17:34:33 CET 2026
On a device without HTN FDIR, rx_queue_start() and rx_queue_stop() return
-EINVAL whenever the queue has no TCAM rule:
hinic3_enable_rxq_fdir_filter() reports -EINVAL in that case and both
callers treat it as fatal. Such a queue has nothing to update, so return
success.
hinic3_start_rq() gates the RQ enable command on NIC_F_FDIR, but the
intended flag is NIC_F_HTN_FDIR, as the stop path already uses. Fix the
check so an STN device is not sent a command it rejects.
Fixes: b247199927a1 ("net/hinic3: fix return value of FDIR enabling")
Fixes: b20dc78b286a ("net/hinic3: support Compact CQE in Rx")
Signed-off-by: Jiacheng Ye <yejiacheng4 at h-partners.com>
---
drivers/net/hinic3/hinic3_fdir.c | 2 +-
drivers/net/hinic3/hinic3_rx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hinic3/hinic3_fdir.c b/drivers/net/hinic3/hinic3_fdir.c
index 95ce7cfe16..f3a570b358 100644
--- a/drivers/net/hinic3/hinic3_fdir.c
+++ b/drivers/net/hinic3/hinic3_fdir.c
@@ -1278,7 +1278,7 @@ hinic3_enable_rxq_fdir_filter(struct rte_eth_dev *dev, uint32_t queue_id, uint32
struct hinic3_nic_dev *nic_dev = HINIC3_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
struct hinic3_tcam_filter *it;
struct hinic3_tcam_cfg_rule fdir_tcam_rule;
- int ret = -EINVAL;
+ int ret = 0;
uint32_t queue_res;
uint16_t index;
diff --git a/drivers/net/hinic3/hinic3_rx.c b/drivers/net/hinic3/hinic3_rx.c
index ed753ba4ec..90681ce15c 100644
--- a/drivers/net/hinic3/hinic3_rx.c
+++ b/drivers/net/hinic3/hinic3_rx.c
@@ -784,7 +784,7 @@ hinic3_start_rq(struct rte_eth_dev *eth_dev, struct hinic3_rxq *rxq)
hinic3_add_rq_to_rx_queue_list(nic_dev, rxq->q_id);
if (nic_dev->rss_state == HINIC3_RSS_ENABLE) {
- if ((hinic3_get_driver_feature(nic_dev) & NIC_F_FDIR) != 0)
+ if ((hinic3_get_driver_feature(nic_dev) & NIC_F_HTN_FDIR) != 0)
err = hinic3_set_rq_enable(nic_dev, rxq->q_id, true);
if (err) {
PMD_DRV_LOG(ERR, "Flush rq failed, eth_dev:%s, queue_idx:%d",
--
2.33.0
More information about the dev
mailing list