[v2,4/4] event/dlb2: fix port cos override calculation

Message ID 20221012235037.3293072-4-abdullah.sevincer@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v2,1/4] event/dlb2: remove cos from port probing |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed

Commit Message

Abdullah Sevincer Oct. 12, 2022, 11:50 p.m. UTC
  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")
Cc: stable@dpdk.org

Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
---
 drivers/event/dlb2/dlb2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Jerin Jacob Oct. 13, 2022, 6:44 a.m. UTC | #1
On Thu, Oct 13, 2022 at 5:21 AM Abdullah Sevincer
<abdullah.sevincer@intel.com> wrote:
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>

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 <abdullah.sevincer@intel.com>
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.

    Fixes: bec8901bfe9f ("event/dlb2: support ldb port specific COS")
    Cc: stable@dpdk.org

    Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>

commit 67332a696bef5b92dee0d1479a0895ad149883cd
Author: Abdullah Sevincer <abdullah.sevincer@intel.com>
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.

    Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>

commit f83ab599df9fe2c62208d0815715e53117e9958f
Author: Abdullah Sevincer <abdullah.sevincer@intel.com>
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.

    Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>

commit 4346d7f5424f4b97ec530ee5320ea931f4179230
Author: Abdullah Sevincer <abdullah.sevincer@intel.com>
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.

    Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>

> ---
>  drivers/event/dlb2/dlb2.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
> index b200c9484e..02f0e57208 100644
> --- a/drivers/event/dlb2/dlb2.c
> +++ b/drivers/event/dlb2/dlb2.c
> @@ -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
>
  

Patch

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index b200c9484e..02f0e57208 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -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;