[PATCH 07/11] net/dpaa2: replace data stashing getenv with devargs
Hemant Agrawal
hemant.agrawal at oss.nxp.com
Thu Feb 19 14:44:38 CET 2026
On 18-02-2026 21:34, Maxime Leroy wrote:
> Replace the getenv("DPAA2_DATA_STASHING_OFF") call with a proper
> devargs option "drv_no_data_stashing", aligned with the existing
> DPDK devargs pattern used by drv_loopback, drv_no_prefetch, etc.
>
> fslmc:dpni.1,drv_no_data_stashing=1
>
> Fixes: c794f2cab6cc ("net/dpaa2: support FLC stashing")
> Signed-off-by: Maxime Leroy <maxime at leroys.fr>
> ---
> drivers/net/dpaa2/dpaa2_ethdev.c | 11 +++++++++--
> drivers/net/dpaa2/dpaa2_ethdev.h | 3 +++
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index 578ad98b8e..0a68365de2 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -35,6 +35,7 @@
> #define DRIVER_RX_PARSE_ERR_DROP "drv_rx_parse_drop"
> #define DRIVER_ERROR_QUEUE "drv_err_queue"
> #define DRIVER_NO_TAILDROP "drv_no_taildrop"
> +#define DRIVER_NO_DATA_STASHING "drv_no_data_stashing"
> #define CHECK_INTERVAL 100 /* 100ms */
> #define MAX_REPEAT_TIME 90 /* 9s (90 * 100ms) in total */
>
> @@ -961,7 +962,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
> options |= DPNI_QUEUE_OPT_FLC;
> cfg.flc.stash_control = true;
> dpaa2_flc_stashing_clear_all(&cfg.flc.value);
> - if (getenv("DPAA2_DATA_STASHING_OFF")) {
> + if (priv->flags & DPAA2_DATA_STASHING_OFF) {
I will not like to remove it completely. Can we OR it priv->flags ?
devargs are good. In most cases DPDK based application has specific set
of devargs hard coded. They need to re-build if they want different boot
args.
This is one of the env, which is used by customer to dynamically tune
the system for performance without the need to re-build their app every
time.
> dpaa2_flc_stashing_set(DPAA2_FLC_DATA_STASHING, 0,
> &cfg.flc.value);
> dpaa2_q->data_stashing_off = 1;
> @@ -2938,6 +2939,11 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
> DPAA2_PMD_INFO("Rx taildrop disabled");
> }
>
> + if (dpaa2_get_devargs(dev->devargs, DRIVER_NO_DATA_STASHING)) {
> + priv->flags |= DPAA2_DATA_STASHING_OFF;
> + DPAA2_PMD_INFO("Data stashing disabled");
> + }
> +
> /* For secondary processes, the primary has done all the work */
> if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
> /* In case of secondary, only burst and ops API need to be
> @@ -3425,5 +3431,6 @@ RTE_PMD_REGISTER_PARAM_STRING(NET_DPAA2_PMD_DRIVER_NAME,
> DRIVER_TX_CONF "=<int>"
> DRIVER_RX_PARSE_ERR_DROP "=<int>"
> DRIVER_ERROR_QUEUE "=<int>"
> - DRIVER_NO_TAILDROP "=<int>");
> + DRIVER_NO_TAILDROP "=<int>"
> + DRIVER_NO_DATA_STASHING "=<int>");
> RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_pmd, NOTICE);
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
> index 86b3022ddb..4da47a543a 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.h
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.h
> @@ -97,6 +97,9 @@
> */
> #define DPAA2_TX_DYNAMIC_CONF_ENABLE RTE_BIT32(9)
>
> +/* Disable data stashing (prefetch of packet data into CPU cache) */
> +#define DPAA2_DATA_STASHING_OFF RTE_BIT32(10)
> +
> #define DPAAX_RX_ERROR_QUEUE_FLAG RTE_BIT32(11)
>
> /* DPDMUX index for DPMAC */
More information about the dev
mailing list