event/dlb2: remove cos from port probing
A message that is not in the archive (sent off-list or not yet received): [email protected],
[email protected]
PATCH v2 1/4 event/dlb2: remove cos from port probing
This commit removes cos (class of service) from port probing criteria and applies enhancements for selection of ports from best cos when default cos (255) is used.
--- drivers/event/dlb2/dlb2.c | 5 +- drivers/event/dlb2/dlb2_priv.h | 2 +- drivers/event/dlb2/dlb2_user.h | 2 +- drivers/event/dlb2/pf/base/dlb2_hw_types.h | 2 +- drivers/event/dlb2/pf/base/dlb2_resource.c | 85 ++++++++++++++-------- 5 files changed, 60 insertions(+), 36 deletions(-)
drivers/event/dlb2/dlb2.c +3 -2
@@ -180,11 +180,12 @@ dlb2_init_port_cos(struct dlb2_eventdev *dlb2, int *port_cos) {int q; -for (q =0 ; q <DLB2_MAX_NUM_PORTS_ALL ; q++) +for (q =0 ; q <DLB2_MAX_NUM_PORTS_ALL ; q++) { + dlb2->ev_ports[q].cos_id = port_cos[q];if (port_cos[q] !=DLB2_COS_DEFAULT ) { - dlb2->ev_ports[q].cos_id = port_cos[q]; dlb2->cos_ports[port_cos[q]]++; } + } } static void
drivers/event/dlb2/dlb2_priv.h +1 -1
@@ -421,7 +421,7 @@ struct dlb2_config { };enum dlb2_cos { -DLB2_COS_DEFAULT =-1 , +DLB2_COS_DEFAULT =255 ,DLB2_COS_0 =0 ,DLB2_COS_1 ,DLB2_COS_2 ,
drivers/event/dlb2/dlb2_user.h +1 -1
@@ -450,7 +450,7 @@ struct dlb2_create_dir_queue_args {* - num_hist_list_entries: Number of history list entries. This must be * greater than or equal cq_depth. * - cos_id: class-of-service to allocate this port from. Must be between 0 and -* 3, inclusive. +* 3, inclusive. Should be 255 if default. * - cos_strict: If set, return an error if there are no available ports in the * requested class-of-service. Else, allocate the port from a different * class-of-service if the requested class has no available ports.
drivers/event/dlb2/pf/base/dlb2_hw_types.h +1 -1
@@ -351,7 +351,7 @@ struct dlb2_hw {int prod_core_list[RTE_MAX_LCORE ];u8 num_prod_cores;int dir_pp_allocations[DLB2_MAX_NUM_DIR_PORTS_V2_5 ]; -int ldb_pp_allocations[DLB2_MAX_NUM_LDB_PORTS ]; +int ldb_pp_allocations[DLB2_MAX_NUM_LDB_PORTS +DLB2_NUM_COS_DOMAINS ];/* Virtualization */ int virt_mode;
drivers/event/dlb2/pf/base/dlb2_resource.c +54 -31
160 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v2 2/4 event/dlb2: add check valid producer coremask
This commit add checks during port probing for validating producer core masks if they are a subset of eal coremask. Error is returned if producer coremask is not a subset of eal coremask.
--- drivers/event/dlb2/pf/base/dlb2_resource.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/event/dlb2/pf/base/dlb2_resource.c +13 -8
@@ -918,9 +918,8 @@ int dlb2_resource_probe(struct dlb2_hw *hw, const void *probe_args) { const struct dlb2_devargs *args = (const struct dlb2_devargs *)probe_args; -const char *mask =NULL ; -int cpu =0 , cnt =0 , cores[RTE_MAX_LCORE ]; -int i; +const char *mask = args ? args->producer_coremask :NULL ; +int cpu =0 , cnt =0 , cores[RTE_MAX_LCORE ], i;if (args) { mask = (const char *)args->producer_coremask;
@@ -933,16 +932,17 @@ dlb2_resource_probe(struct dlb2_hw *hw, const void *probe_args) hw->num_prod_cores =0 ;for (i =0 ; i <RTE_MAX_LCORE ; i++) { +bool is_pcore = (mask && cores[i] !=-1 ); +if (rte_lcore_is_enabled (i)) { -if (mask) { +if (is_pcore) {/* * Populate the producer cores from parsed * coremask */ -if (cores[i] !=-1 ) { - hw->prod_core_list[cores[i]] = i; - hw->num_prod_cores++; - } + hw->prod_core_list[cores[i]] = i; + hw->num_prod_cores++; + }else if ((++cnt ==DLB2_EAL_PROBE_CORE ||rte_lcore_count () <DLB2_EAL_PROBE_CORE )) {/*
@@ -952,7 +952,12 @@ dlb2_resource_probe(struct dlb2_hw *hw, const void *probe_args) cpu = i;break ; } + }else if (is_pcore) { +DLB2_LOG_ERR ("Producer coremask(%s) must be a subset of EAL coremask" , + mask); +return -1 ; } + }/* Use the first core in producer coremask to probe */ if (hw->num_prod_cores)
Signature · 1 line
2.25.1
PATCH v2 3/4 event/dlb2: remove cos from devargs
In reply to Abdullah SevincerThis commit removes the cos argument from devargs struct. Since cos is now per port specific only and supported through port_cos in dev_args, there is no need to
to have a cos argument in dev_args struct.
--- drivers/event/dlb2/dlb2.c | 1 - drivers/event/dlb2/dlb2_priv.h | 2 -- 2 files changed, 3 deletions(-)
drivers/event/dlb2/dlb2.c +0 -1
@@ -4763,7 +4763,6 @@ dlb2_parse_params(const char *params,DLB2_NUM_DIR_CREDITS ,DEV_ID_ARG ,DLB2_QID_DEPTH_THRESH_ARG , -DLB2_COS_ARG ,DLB2_POLL_INTERVAL_ARG ,DLB2_SW_CREDIT_QUANTA_ARG , DLB2_HW_CREDIT_QUANTA_ARG,
drivers/event/dlb2/dlb2_priv.h +0 -2
@@ -40,7 +40,6 @@#define DLB2_NUM_DIR_CREDITS "num_dir_credits"#define DEV_ID_ARG "dev_id"#define DLB2_QID_DEPTH_THRESH_ARG "qid_depth_thresh" -#define DLB2_COS_ARG "cos"#define DLB2_POLL_INTERVAL_ARG "poll_interval"#define DLB2_SW_CREDIT_QUANTA_ARG "sw_credit_quanta"#define DLB2_HW_CREDIT_QUANTA_ARG "hw_credit_quanta"
@@ -661,7 +660,6 @@ struct dlb2_devargs {int num_dir_credits_override;int dev_id;struct dlb2_qid_depth_thresholds qid_depth_thresholds; -enum dlb2_cos cos_id;int poll_interval;int sw_credit_quanta;int hw_credit_quanta;
Signature · 1 line
2.25.1
PATCH v2 4/4 event/dlb2: fix port cos override calculation
In reply to Abdullah SevincerThis commit fixes a calculation error
of total number of ldb ports during port cos
override from dlb2 event structure.
--- drivers/event/dlb2/dlb2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/event/dlb2/dlb2.c +2 -1
@@ -848,10 +848,11 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2, } cfg->cos_strict =0 ;/* Best effort */ - cfg->num_cos_ldb_ports[0 ] = resources_asked->num_ldb_ports - cos_ports; + cfg->num_cos_ldb_ports[0 ] = dlb2->cos_ports[0 ]; cfg->num_cos_ldb_ports[1 ] = dlb2->cos_ports[1 ]; cfg->num_cos_ldb_ports[2 ] = dlb2->cos_ports[2 ]; cfg->num_cos_ldb_ports[3 ] = dlb2->cos_ports[3 ]; + cfg->num_ldb_ports = resources_asked->num_ldb_ports - cos_ports;if (device_version ==DLB2_HW_V2 ) cfg->num_ldb_credits = resources_asked->num_ldb_credits;
Signature · 1 line
2.25.1
Re: [PATCH v2 4/4] event/dlb2: fix port cos override calculation
Quoted 9 lines · Abdullah Sevincer
This commit fixes a calculation error
of total number of ldb ports during port cos
override from dlb2 event structure.Fixes bec8901bfe9f ("event/dlb2: support ldb port specific COS")Signed-off-by Abdullah Sevincer <[email protected]>
Series applied to dpdk-next-net-eventdev/for-main. Thanks
I have updated the git commit log. Please check changes and try to do similar for new patches
commit fa8dd9829c9e83154be8b9c8da65b4698e6a898b (HEAD -> for-main)
Author: Abdullah Sevincer <[email protected]> Date: Wed Oct 12 18:50:37 2022 -0500
event/dlb2: fix port COS override calculation
Fix the calculation error of the total number of LDB ports during port COS override from dlb2 event structure.
commit 67332a696bef5b92dee0d1479a0895ad149883cd
Author: Abdullah Sevincer <[email protected]> Date: Wed Oct 12 18:50:36 2022 -0500
event/dlb2: remove COS from devargs
Since COS is now per port specific only and supported through port_cos in dev_args, there is no need to have a COS argument in dev_args.
commit f83ab599df9fe2c62208d0815715e53117e9958f
Author: Abdullah Sevincer <[email protected]> Date: Wed Oct 12 18:50:35 2022 -0500
event/dlb2: validate producer coremask
Add checks during port probing for validating producer core masks if they are a subset of EAL coremask. Error is returned if producer coremask is not a subset of EAL coremask.
commit 4346d7f5424f4b97ec530ee5320ea931f4179230
Author: Abdullah Sevincer <[email protected]> Date: Wed Oct 12 18:50:34 2022 -0500
event/dlb2: remove COS from port probing
Remove COS (class of service) from port probing criteria and apply enhancements for selection of ports from best COS when default COS (255) is used.
Quoted 24 lines
--- drivers/event/dlb2/dlb2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/event/dlb2/dlb2.c +2
-2@@ -848,10 +848,11 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2, } cfg->cos_strict =0 ;/* Best effort */ - cfg->num_cos_ldb_ports[0 ] = resources_asked->num_ldb_ports - cos_ports; + cfg->num_cos_ldb_ports[0 ] = dlb2->cos_ports[0 ]; cfg->num_cos_ldb_ports[1 ] = dlb2->cos_ports[1 ]; cfg->num_cos_ldb_ports[2 ] = dlb2->cos_ports[2 ]; cfg->num_cos_ldb_ports[3 ] = dlb2->cos_ports[3 ]; + cfg->num_ldb_ports = resources_asked->num_ldb_ports - cos_ports;if (device_version ==DLB2_HW_V2 ) cfg->num_ldb_credits = resources_asked->num_ldb_credits; --2.25.1