From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00825CA5FCE for ; Thu, 1 Oct 2026 07:34:03 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 895A842E95; Thu, 1 Oct 2026 09:33:23 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 78695427E9 for ; Thu, 1 Oct 2026 09:33:20 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5AF041A010B; Thu, 1 Oct 2026 09:33:20 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 25FFF1A00FB; Thu, 1 Oct 2026 09:33:20 +0200 (CEST) Received: from lsv031405.swis.in-blr01.nxp.com (lsv031405.swis.in-blr01.nxp.com [92.120.147.93]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id C1B7D18000BA; Thu, 1 Oct 2026 15:33:18 +0800 (+08) From: Prashant Gupta To: stephen@networkplumber.org, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH v5-S2 07/13] net/dpaa2: set default flow miss action per device Date: Thu, 1 Oct 2026 13:03:01 +0530 Message-ID: <20261001073307.1125305-8-prashant.gupta_3@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261001073307.1125305-1-prashant.gupta_3@nxp.com> References: <20260922095528.2469885-1-prashant.gupta_3@nxp.com> <20261001073307.1125305-1-prashant.gupta_3@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Gagandeep Singh The flow steering miss flow id was a file-scope global configured only via the DPAA2_FLOW_CONTROL_MISS_FLOW environment variable and defaulted to 0. Replace it with a per-device default_flow field in the private device structure, initialised to 0 at probe time, so that each device has its own independent miss-flow setting and the env variable override is no longer needed. The DPAA2_FLOW_CONTROL_MISS_FLOW environment variable is removed. Users who relied on it to redirect unmatched frames to a specific queue must now use the rte_flow API instead. A release-note entry for this removal should be added to doc/guides/rel_notes/release_26_11.rst. Signed-off-by: Gagandeep Singh --- drivers/net/dpaa2/dpaa2_ethdev.c | 2 ++ drivers/net/dpaa2/dpaa2_ethdev.h | 2 ++ drivers/net/dpaa2/dpaa2_flow.c | 14 +------------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index d23c73b21d..70f271ec45 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -3543,6 +3543,8 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) priv->dist_queues = attr.num_queues; priv->num_channels = attr.num_channels; priv->channel_inuse = 0; + priv->default_flow = RTE_MIN(priv->fs_entries, + priv->dist_queues) - 1; rte_spinlock_init(&priv->lpbk_qp_lock); rte_spinlock_init(&priv->meter_lock); diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h index e329111c0b..58a47cd1a2 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -436,6 +436,8 @@ struct dpaa2_dev_priv { uint8_t max_cgs; uint8_t cgid_in_use[MAX_RX_QUEUES]; rte_spinlock_t meter_lock; + /* Lowest priority FS flow id to receive flow steering miss frames. */ + uint16_t default_flow; /* Current hash distribution size per RX TC, written by * dpaa2_setup_flow_dist_size() and read by reta_query / reta_update. diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c index b2f1778de3..2e844121a8 100644 --- a/drivers/net/dpaa2/dpaa2_flow.c +++ b/drivers/net/dpaa2/dpaa2_flow.c @@ -24,7 +24,6 @@ #include static char *dpaa2_flow_control_log; -static uint16_t dpaa2_flow_miss_flow_id; /* Default miss flow id is 0. */ static int dpaa2_sp_loaded = -1; enum dpaa2_flow_entry_size { @@ -4590,7 +4589,7 @@ dpaa2_configure_fs_rss_table(struct dpaa2_dev_priv *priv, return 0; tc_cfg.enable = true; - tc_cfg.fs_miss_flow_id = dpaa2_flow_miss_flow_id; + tc_cfg.fs_miss_flow_id = priv->default_flow; ret = dpni_set_rx_fs_dist(dpni, CMD_PRI_LOW, priv->token, &tc_cfg); if (ret < 0) { @@ -5224,17 +5223,6 @@ dpaa2_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, dpaa2_flow_control_log = getenv("DPAA2_FLOW_CONTROL_LOG"); - if (getenv("DPAA2_FLOW_CONTROL_MISS_FLOW")) { - dpaa2_flow_miss_flow_id = - (uint16_t)atoi(getenv("DPAA2_FLOW_CONTROL_MISS_FLOW")); - if (dpaa2_flow_miss_flow_id >= priv->dist_queues) { - DPAA2_PMD_ERR("Missed flow ID %d >= dist size(%d)", - dpaa2_flow_miss_flow_id, - priv->dist_queues); - return NULL; - } - } - flow = rte_zmalloc(NULL, sizeof(struct dpaa2_dev_flow), RTE_CACHE_LINE_SIZE); if (!flow) { -- 2.43.0