event/dlb2: fix event weight handling in SSE code path

Message ID 20250121171135.2705818-1-bruce.richardson@intel.com (mailing list archive)
State Accepted
Delegated to: Jerin Jacob
Headers
Series event/dlb2: fix event weight handling in SSE code path |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing warning Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Bruce Richardson Jan. 21, 2025, 5:11 p.m. UTC
Commit 6e2e98d6775b ("event/dlb2: support independent enqueue") updated
the avx512 code path with support for the event, or "qe" weights.
However, the SSE code path looks to have been missed in the update.
Update the SSE "build_hcws" function to match the changes made to the
AVX-512 version.

Bugzilla ID: 1616
Fixes: 6e2e98d6775b ("event/dlb2: support independent enqueue")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/event/dlb2/dlb2_sse.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
  

Comments

Jerin Jacob Feb. 4, 2025, 2:48 p.m. UTC | #1
Unaddressed
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Tuesday, January 21, 2025 10:42 PM
> To: dev@dpdk.org
> Cc: Pravin Pathak <pravin.pathak@intel.com>; Bruce Richardson
> <bruce.richardson@intel.com>; stable@dpdk.org
> Subject: [EXTERNAL] [PATCH] event/dlb2: fix event weight handling in SSE code
> path
> 
> Commit 6e2e98d6775b ("event/dlb2: support independent enqueue") updated
> the avx512 code path with support for the event, or "qe" weights. However, the
> SSE code path looks to have been missed in the update. Update the SSE
> "build_hcws" function 
> Commit 6e2e98d6775b ("event/dlb2: support independent enqueue") updated
> the avx512 code path with support for the event, or "qe" weights.
> However, the SSE code path looks to have been missed in the update.
> Update the SSE "build_hcws" function to match the changes made to the
> AVX-512 version.
> 
> Bugzilla ID: 1616
> Fixes: 6e2e98d6775b ("event/dlb2: support independent enqueue")
> Cc: stable@dpdk.org


@Pravin Pathak Please review and ack to merge for rc1.

> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  drivers/event/dlb2/dlb2_sse.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/event/dlb2/dlb2_sse.c b/drivers/event/dlb2/dlb2_sse.c index
> 248d7519d5..f2e1f9fb7e 100644
> --- a/drivers/event/dlb2/dlb2_sse.c
> +++ b/drivers/event/dlb2/dlb2_sse.c
> @@ -190,11 +190,11 @@ dlb2_event_build_hcws(struct dlb2_port *qm_port,
>  		qe[3].data = ev[3].u64;
> 
>  		/* will only be set for DLB 2.5 + */
> -		if (qm_port->cq_weight) {
> -			qe[0].weight = ev[0].impl_opaque & 3;
> -			qe[1].weight = ev[1].impl_opaque & 3;
> -			qe[2].weight = ev[2].impl_opaque & 3;
> -			qe[3].weight = ev[3].impl_opaque & 3;
> +		if (qm_port->dlb2->enable_cq_weight) {
> +			qe[0].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[0]);
> +			qe[1].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[1]);
> +			qe[2].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[2]);
> +			qe[3].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[3]);
>  		}
> 
>  		break;
> @@ -205,6 +205,7 @@ dlb2_event_build_hcws(struct dlb2_port *qm_port,
>  			qe[i].cmd_byte =
>  				cmd_byte_map[qm_port-
> >is_directed][ev[i].op];
>  			qe[i].sched_type = sched_type[i];
> +			qe[i].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[i]);
>  			qe[i].data = ev[i].u64;
>  			qe[i].qid = queue_id[i];
>  			qe[i].priority = EV_TO_DLB2_PRIO(ev[i].priority);
> --
> 2.43.0
  
Pravin Pathak Feb. 6, 2025, 2:49 p.m. UTC | #2
Reviewed-by: Pravin Pathak <pravin.pathak@intel.com>

> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Tuesday, January 21, 2025 12:12 PM
> To: dev@dpdk.org
> Cc: Pathak, Pravin <pravin.pathak@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; stable@dpdk.org
> Subject: [PATCH] event/dlb2: fix event weight handling in SSE code path
> 
> Commit 6e2e98d6775b ("event/dlb2: support independent enqueue")
> updated the avx512 code path with support for the event, or "qe" weights.
> However, the SSE code path looks to have been missed in the update.
> Update the SSE "build_hcws" function to match the changes made to the
> AVX-512 version.
> 
> Bugzilla ID: 1616
> Fixes: 6e2e98d6775b ("event/dlb2: support independent enqueue")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  drivers/event/dlb2/dlb2_sse.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/event/dlb2/dlb2_sse.c b/drivers/event/dlb2/dlb2_sse.c
> index 248d7519d5..f2e1f9fb7e 100644
> --- a/drivers/event/dlb2/dlb2_sse.c
> +++ b/drivers/event/dlb2/dlb2_sse.c
> @@ -190,11 +190,11 @@ dlb2_event_build_hcws(struct dlb2_port
> *qm_port,
>  		qe[3].data = ev[3].u64;
> 
>  		/* will only be set for DLB 2.5 + */
> -		if (qm_port->cq_weight) {
> -			qe[0].weight = ev[0].impl_opaque & 3;
> -			qe[1].weight = ev[1].impl_opaque & 3;
> -			qe[2].weight = ev[2].impl_opaque & 3;
> -			qe[3].weight = ev[3].impl_opaque & 3;
> +		if (qm_port->dlb2->enable_cq_weight) {
> +			qe[0].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[0]);
> +			qe[1].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[1]);
> +			qe[2].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[2]);
> +			qe[3].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[3]);
>  		}
> 
>  		break;
> @@ -205,6 +205,7 @@ dlb2_event_build_hcws(struct dlb2_port *qm_port,
>  			qe[i].cmd_byte =
>  				cmd_byte_map[qm_port-
> >is_directed][ev[i].op];
>  			qe[i].sched_type = sched_type[i];
> +			qe[i].weight =
> RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[i]);
>  			qe[i].data = ev[i].u64;
>  			qe[i].qid = queue_id[i];
>  			qe[i].priority = EV_TO_DLB2_PRIO(ev[i].priority);
> --
> 2.43.0
  
Jerin Jacob Feb. 18, 2025, 8:47 a.m. UTC | #3
> -----Original Message-----
> From: Pathak, Pravin <pravin.pathak@intel.com>
> Sent: Thursday, February 6, 2025 8:20 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: [EXTERNAL] RE: [PATCH] event/dlb2: fix event weight handling in SSE
> code path
> 
> Reviewed-by: Pravin Pathak <pravin. pathak@ intel. com> > -----Original
> Message----- > From: Richardson, Bruce <bruce. richardson@ intel. com> > Sent:
> Tuesday, January 21, 2025 12: 12 PM > To: dev@ dpdk. org > Cc: Pathak, Pravin

> Reviewed-by: Pravin Pathak <pravin.pathak@intel.com>



Applied to dpdk-next-eventdev/for-main. Thanks

> 
> > -----Original Message-----
> > From: Richardson, Bruce <bruce.richardson@intel.com>
> > Sent: Tuesday, January 21, 2025 12:12 PM
> > To: dev@dpdk.org
> > Cc: Pathak, Pravin <pravin.pathak@intel.com>; Richardson, Bruce
> > <bruce.richardson@intel.com>; stable@dpdk.org
> > Subject: [PATCH] event/dlb2: fix event weight handling in SSE code
> > path
> >
> > Commit 6e2e98d6775b ("event/dlb2: support independent enqueue")
> > updated the avx512 code path with support for the event, or "qe" weights.
> > However, the SSE code path looks to have been missed in the update.
> > Update the SSE "build_hcws" function to match the changes made to the
> > AVX-512 version.
> >
> > Bugzilla ID: 1616
> > Fixes: 6e2e98d6775b ("event/dlb2: support independent enqueue")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  drivers/event/dlb2/dlb2_sse.c | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/event/dlb2/dlb2_sse.c
> > b/drivers/event/dlb2/dlb2_sse.c index 248d7519d5..f2e1f9fb7e 100644
> > --- a/drivers/event/dlb2/dlb2_sse.c
> > +++ b/drivers/event/dlb2/dlb2_sse.c
> > @@ -190,11 +190,11 @@ dlb2_event_build_hcws(struct dlb2_port
> *qm_port,
> >  		qe[3].data = ev[3].u64;
> >
> >  		/* will only be set for DLB 2.5 + */
> > -		if (qm_port->cq_weight) {
> > -			qe[0].weight = ev[0].impl_opaque & 3;
> > -			qe[1].weight = ev[1].impl_opaque & 3;
> > -			qe[2].weight = ev[2].impl_opaque & 3;
> > -			qe[3].weight = ev[3].impl_opaque & 3;
> > +		if (qm_port->dlb2->enable_cq_weight) {
> > +			qe[0].weight =
> > RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[0]);
> > +			qe[1].weight =
> > RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[1]);
> > +			qe[2].weight =
> > RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[2]);
> > +			qe[3].weight =
> > RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[3]);
> >  		}
> >
> >  		break;
> > @@ -205,6 +205,7 @@ dlb2_event_build_hcws(struct dlb2_port *qm_port,
> >  			qe[i].cmd_byte =
> >  				cmd_byte_map[qm_port-
> > >is_directed][ev[i].op];
> >  			qe[i].sched_type = sched_type[i];
> > +			qe[i].weight =
> > RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[i]);
> >  			qe[i].data = ev[i].u64;
> >  			qe[i].qid = queue_id[i];
> >  			qe[i].priority = EV_TO_DLB2_PRIO(ev[i].priority);
> > --
> > 2.43.0
  

Patch

diff --git a/drivers/event/dlb2/dlb2_sse.c b/drivers/event/dlb2/dlb2_sse.c
index 248d7519d5..f2e1f9fb7e 100644
--- a/drivers/event/dlb2/dlb2_sse.c
+++ b/drivers/event/dlb2/dlb2_sse.c
@@ -190,11 +190,11 @@  dlb2_event_build_hcws(struct dlb2_port *qm_port,
 		qe[3].data = ev[3].u64;
 
 		/* will only be set for DLB 2.5 + */
-		if (qm_port->cq_weight) {
-			qe[0].weight = ev[0].impl_opaque & 3;
-			qe[1].weight = ev[1].impl_opaque & 3;
-			qe[2].weight = ev[2].impl_opaque & 3;
-			qe[3].weight = ev[3].impl_opaque & 3;
+		if (qm_port->dlb2->enable_cq_weight) {
+			qe[0].weight = RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[0]);
+			qe[1].weight = RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[1]);
+			qe[2].weight = RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[2]);
+			qe[3].weight = RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[3]);
 		}
 
 		break;
@@ -205,6 +205,7 @@  dlb2_event_build_hcws(struct dlb2_port *qm_port,
 			qe[i].cmd_byte =
 				cmd_byte_map[qm_port->is_directed][ev[i].op];
 			qe[i].sched_type = sched_type[i];
+			qe[i].weight = RTE_PMD_DLB2_GET_QE_WEIGHT(&ev[i]);
 			qe[i].data = ev[i].u64;
 			qe[i].qid = queue_id[i];
 			qe[i].priority = EV_TO_DLB2_PRIO(ev[i].priority);