> -----Original Message----- > From: Pravin Pathak <pravin. pathak@ intel. com> > Sent: Friday, May 9, 2025 9: 54 AM > To: dev@ dpdk. org > Cc: Jerin Jacob <jerinj@ marvell. com>; mike. ximing. chen@ intel. com; > bruce. richardson@ intel. com;
ZjQcmQRYFpfptBannerStart
Prioritize security for external emails:
Confirm sender and content safety before clicking links or opening attachments
ZjQcmQRYFpfptBannerEnd
> -----Original Message-----
> From: Pravin Pathak <pravin.pathak@intel.com>
> Sent: Friday, May 9, 2025 9:54 AM
> To: dev@dpdk.org
> Cc: Jerin Jacob <jerinj@marvell.com>; mike.ximing.chen@intel.com;
> bruce.richardson@intel.com; thomas@monjalon.net;
> david.marchand@redhat.com; nipun.gupta@amd.com; chenbox@nvidia.com;
> tirthendu.sarkar@intel.com; Pravin Pathak <pravin.pathak@intel.com>
> Subject: [EXTERNAL] [PATCH v1 4/7] event/dlb2: support managing history list
> resource
>
> Add support for setting application specified port history Set HL equal to CQ
> depth when inflight control is enabled Added command line parameters
> 'use_default_hl' (default: 1) and 'alloc_hl_entries' - When 'use_default_hl = 1' *
> Per port HL ZjQcmQRYFpfptBannerStart Prioritize security for external emails:
> Confirm sender and content safety before clicking links or opening attachments
> <https://us-phishalarm-
> ewt.proofpoint.com/EWT/v1/CRVmXkqW!tm3Z1f8UAnV69S-
> 8OZ3abn2jU1Fw7JxGFGecPxaCk1uQu97fQz1QdXWof_KxtumPzB31X_fWX1Ns4
> HIeAFdHnOYAiGPs37vC1U0$>
> Report Suspicious
>
> ZjQcmQRYFpfptBannerEnd
> Add support for setting application specified port history Set HL equal to CQ
> depth when inflight control is enabled Added command line parameters
> 'use_default_hl' (default: 1)
> and 'alloc_hl_entries'
> - When 'use_default_hl = 1'
> * Per port HL is set to DLB2_FIXED_CQ_HL_SIZE (32)
> * Recommended CQ depth by dlb2_eventdev_port_default_conf_get()
> is DLB2_FIXED_CQ_HL_SIZE/2
> * command line parameter alloc_hl_entries is ignored
> - When 'use_default_hl = 0'
> * Per LDB port HL = 2 * CQ depth
> * Recommended CQ depth by dlb2_eventdev_port_default_conf_get()
> is DLB2_FIXED_CQ_HL_SIZE
> * User should calculate needed HL entries based on CQ depths the
> application will use and specify it as command line parameter
> 'alloc_hl_entries'. This will be used to allocate HL entries.
> alloc_hl_entries = (Sum of all LDB ports CQ depths * 2)
> * If alloc_hl_entries is not specified, then
> Total HL entries for the eventdev = num_ldb_ports * 64
>
> Signed-off-by: Pravin Pathak <pravin.pathak@intel.com>
> Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
> ---
> drivers/event/dlb2/dlb2.c | 220 +++++++++++++++++----
> drivers/event/dlb2/dlb2_iface.c | 5 +-
> drivers/event/dlb2/dlb2_iface.h | 4 +-
> drivers/event/dlb2/dlb2_priv.h | 19 +-
> drivers/event/dlb2/dlb2_user.h | 24 +++
> drivers/event/dlb2/pf/base/dlb2_regs.h | 9 +
> drivers/event/dlb2/pf/base/dlb2_resource.c | 74 +++++++
> drivers/event/dlb2/pf/base/dlb2_resource.h | 18 ++
> drivers/event/dlb2/pf/dlb2_pf.c | 29 ++-
> drivers/event/dlb2/rte_pmd_dlb2.c | 23 +++
> drivers/event/dlb2/rte_pmd_dlb2.h | 40 ++++
> drivers/event/dlb2/version.map | 1 +
> 12 files changed, 422 insertions(+), 44 deletions(-)
>
> diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index
> 24c56a7968..cd843bb9d0 100644
> --- a/drivers/event/dlb2/dlb2.c
> +++ b/drivers/event/dlb2/dlb2.c
> @@ -727,6 +727,50 @@ set_enable_cq_weight(const char *key __rte_unused,
> return 0;
> }
>
> +static int set_hl_override(const char *key __rte_unused, const char *value,
> + void *opaque)
> +{
> + bool *default_hl = opaque;
> +
> + if (value == NULL || opaque == NULL) {
> + DLB2_LOG_ERR("NULL pointer");
> + return -EINVAL;
> + }
> +
> + if ((*value == 'n') || (*value == 'N') || (*value == '0'))
> + *default_hl = false;
> + else
> + *default_hl = true;
> +
> + return 0;
> +}
> +
> +static int set_hl_entries(const char *key __rte_unused, const char *value,
> + void *
> +
> + return dlb2_set_port_param(dlb2, port_id, flags, val); }
> diff --git a/drivers/event/dlb2/rte_pmd_dlb2.h
> b/drivers/event/dlb2/rte_pmd_dlb2.h
> index 207ce6a3fd..3f529860ba 100644
> --- a/drivers/event/dlb2/rte_pmd_dlb2.h
> +++ b/drivers/event/dlb2/rte_pmd_dlb2.h
> @@ -91,6 +91,46 @@ rte_pmd_dlb2_set_token_pop_mode(uint8_t dev_id,
> uint8_t port_id,
> enum dlb2_token_pop_mode mode);
>
> +/** Set inflight threshold for flow migration */ #define
> +DLB2_FLOW_MIGRATION_THRESHOLD RTE_BIT64(0)
> +
> +/** Set port history list */
> +#define DLB2_SET_PORT_HL RTE_BIT64(1)
> +
> +struct dlb2_port_param {
> + uint16_t inflight_threshold : 12;
> + uint16_t port_hl;
> +};
> +
> +/*!
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior
> +notice
> + *
> + * Configure various port parameters.
> + * AUTO_POP. This function must be called before calling
> +rte_event_port_setup()
> + * for the port, but after calling rte_event_dev_configure().
> + *
> + * @param dev_id
> + * The identifier of the event device.
> + * @param port_id
> + * The identifier of the event port.
> + * @param flags
> + * Bitmask of the parameters being set.
> + * @param val
> + * Structure coantaining the values of parameters being set.
> + *
> + * @return
> + * - 0: Success
> + * - EINVAL: Invalid dev_id, port_id, or mode
> + * - EINVAL: The DLB2 is not configured, is already running, or the port is
> + * already setup
> + */
> +__rte_experimental
> +int
> +rte_pmd_dlb2_set_port_param(uint8_t dev_id,
> + uint8_t port_id,
> + uint64_t flags,
> + void *val);
> #ifdef __cplusplus
> }
> #endif
> diff --git a/drivers/event/dlb2/version.map b/drivers/event/dlb2/version.map
> index c37d2302cd..be5a8f6f2b 100644
> --- a/drivers/event/dlb2/version.map
> +++ b/drivers/event/dlb2/version.map
> @@ -7,4 +7,5 @@ EXPERIMENTAL {
>
> # added in 20.11
> rte_pmd_dlb2_set_token_pop_mode;
> + rte_pmd_dlb2_set_port_param;
> };
> --
> 2.25.1