event/dlb2: add port probing enhancements
PATCH 1/1 event/dlb2: add port probing enhancements
This commit is an enhancement for previously
implemented port probing optimizations. Changes
are below:
1-Since cos is now per port, remove the device and domain specific cos from dev_args struct.
2-Changes for using best cos as default cos during LDB port selection.
3-Changed LDB_COS_DEFAULT to 255 (UINT8_MAX) from -1.
4-Add check for valid producer coremask during probing dbl2 resources.
--- drivers/event/dlb2/dlb2.c | 9 +- drivers/event/dlb2/dlb2_priv.h | 4 +- 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 | 106 +++++++++++++-------- 5 files changed, 72 insertions(+), 51 deletions(-)
drivers/event/dlb2/dlb2.c +5 -4
@@ -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
@@ -847,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;
@@ -4762,7 +4764,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 +1 -3
@@ -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"
@@ -421,7 +420,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 ,
@@ -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;
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 +64 -42
196 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 8 lines · Abdullah Sevincer
This commit is an enhancement for previously
implemented port probing optimizations. Changes
are below:1-Since cos is now per port, remove the device and domain specific cos from
dev_argsstruct.
Quoted 7 lines
2-Changes for using best cos as default cos during LDB port selection.
3-Changed
LDB_COS_DEFAULTto 255 (UINT8_MAX) from -1.4-Add check for valid producer coremask during probing dbl2 resources.
4 items, Make it as patches with enough information why the change per patch