DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harman Kalra <hkalra@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Cc: <dev@dpdk.org>, <jerinj@marvell.com>,
	Hanumanth Pothula <hpothula@marvell.com>
Subject: [PATCH v3 5/5] net/cnxk: fix representor port mapping
Date: Mon, 24 Jun 2024 18:54:15 +0530	[thread overview]
Message-ID: <20240624132415.32291-5-hkalra@marvell.com> (raw)
In-Reply-To: <20240624132415.32291-1-hkalra@marvell.com>

From: Hanumanth Pothula <hpothula@marvell.com>

As part of ready and exit messages only first half of the ports
were processed, i.e. represented to representor port mapping was
setup and released. While later half of the ports were not
processed.

Fixes: 804c585658ea ("net/cnxk: add representor control plane")

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
V2:
 * Added fixes tag
 * Better commit message

 drivers/net/cnxk/cnxk_rep_msg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_rep_msg.c b/drivers/net/cnxk/cnxk_rep_msg.c
index f3a62a805e..29ce94e5c6 100644
--- a/drivers/net/cnxk/cnxk_rep_msg.c
+++ b/drivers/net/cnxk/cnxk_rep_msg.c
@@ -369,12 +369,12 @@ notify_rep_dev_ready(cnxk_rep_msg_ready_data_t *rdata, void *data,
 
 	memset(rep_id_arr, 0, RTE_MAX_ETHPORTS * sizeof(uint64_t));
 	/* For ready state */
-	if ((rdata->nb_ports / 2) > eswitch_dev->repr_cnt.nb_repr_probed) {
+	if (rdata->nb_ports > eswitch_dev->repr_cnt.nb_repr_probed) {
 		rc = CNXK_REP_CTRL_MSG_NACK_INV_REP_CNT;
 		goto fail;
 	}
 
-	for (i = 0; i < rdata->nb_ports / 2; i++) {
+	for (i = 0; i < rdata->nb_ports; i++) {
 		rep_id = UINT16_MAX;
 		rc = cnxk_rep_state_update(eswitch_dev, rdata->data[i], &rep_id);
 		if (rc) {
@@ -475,7 +475,7 @@ notify_rep_dev_exit(cnxk_rep_msg_exit_data_t *edata, void *data)
 		rc = -EINVAL;
 		goto fail;
 	}
-	if ((edata->nb_ports / 2) > eswitch_dev->repr_cnt.nb_repr_probed) {
+	if (edata->nb_ports > eswitch_dev->repr_cnt.nb_repr_probed) {
 		rc = CNXK_REP_CTRL_MSG_NACK_INV_REP_CNT;
 		goto fail;
 	}
-- 
2.18.0


  parent reply	other threads:[~2024-06-24 13:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  7:48 [PATCH 1/6] net/cnxk: stale offload flag reset Harman Kalra
2024-06-24  7:48 ` [PATCH 2/6] net/cnxk: add MTU set ops Harman Kalra
2024-06-24  7:48 ` [PATCH 3/6] net/cnxk: add multi seg support in eswitch Harman Kalra
2024-06-24  7:48 ` [PATCH 4/6] net/cnxk: increment number of flow pattern Harman Kalra
2024-06-24  9:14   ` Jerin Jacob
2024-06-24  7:48 ` [PATCH 5/6] net/cnxk: update processing ready message Harman Kalra
2024-06-24  7:48 ` [PATCH 6/6] common/cnxk: flow aginig delaying app shutdown Harman Kalra
2024-06-24  9:13 ` [PATCH 1/6] net/cnxk: stale offload flag reset Jerin Jacob
2024-06-24 11:57 ` [PATCH v2 1/5] net/cnxk: fix " Harman Kalra
2024-06-24 11:57   ` [PATCH v2 2/5] net/cnxk: add MTU set ops Harman Kalra
2024-06-24 11:57   ` [PATCH v2 3/5] net/cnxk: add multi seg support in eswitch Harman Kalra
2024-06-24 11:57   ` [PATCH v2 4/5] net/cnxk: fix invalid pattern count Harman Kalra
2024-06-24 11:57   ` [PATCH v2 5/5] net/cnxk: fix representor port mapping Harman Kalra
2024-06-24 13:24 ` [PATCH v3 1/5] net/cnxk: fix stale offload flag reset Harman Kalra
2024-06-24 13:24   ` [PATCH v3 2/5] net/cnxk: add MTU set ops Harman Kalra
2024-06-24 13:24   ` [PATCH v3 3/5] net/cnxk: add multi seg support in eswitch Harman Kalra
2024-06-24 13:24   ` [PATCH v3 4/5] net/cnxk: fix invalid pattern count Harman Kalra
2024-06-24 13:24   ` Harman Kalra [this message]
2024-06-25  9:46     ` [PATCH v3 5/5] net/cnxk: fix representor port mapping Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240624132415.32291-5-hkalra@marvell.com \
    --to=hkalra@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hpothula@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).