DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] mempool/octeontx: fix aura to pool mapping
@ 2020-07-28 18:43 pbhagavatula
  2020-07-28 18:43 ` [dpdk-dev] [PATCH 2/2] net/octeontx: fix Tx xmit command preparation pbhagavatula
  0 siblings, 1 reply; 3+ messages in thread
From: pbhagavatula @ 2020-07-28 18:43 UTC (permalink / raw)
  To: jerinj, Harman Kalra; +Cc: dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

When sending commands to Kernel FPA PF driver, it expects the
aura to be in the range of 0 to 16 for a given FPA pool.
In OCTEON TX we map a pool,aura pair as single mempool handle,
always set the aura id to 0 for a given FPA pool.

Fixes: 179c7e893f64 ("mempool/octeontx: fix pool to aura mapping")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/mempool/octeontx/octeontx_fpavf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 339da7824..94dc5cd81 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -259,7 +259,7 @@ octeontx_fpapf_pool_setup(unsigned int gpool, unsigned int buf_size,
 		POOL_LTYPE(0x2) | POOL_STYPE(0) | POOL_SET_NAT_ALIGN |
 		POOL_ENA;

-	cfg.aid = FPA_AURA_IDX(gpool);
+	cfg.aid = 0;
 	cfg.pool_cfg = reg;
 	cfg.pool_stack_base = phys_addr;
 	cfg.pool_stack_end = phys_addr + memsz;
@@ -345,7 +345,7 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
 	hdr.vfid = gpool_index;
 	hdr.res_code = 0;
 	memset(&cfg, 0x0, sizeof(struct octeontx_mbox_fpa_cfg));
-	cfg.aid = FPA_AURA_IDX(gpool_index);
+	cfg.aid = 0;

 	ret = octeontx_mbox_send(&hdr, &cfg,
 					sizeof(struct octeontx_mbox_fpa_cfg),
@@ -374,7 +374,7 @@ octeontx_fpapf_aura_detach(unsigned int gpool_index)
 		goto err;
 	}

-	cfg.aid = FPA_AURA_IDX(gpool_index);
+	cfg.aid = 0;
 	hdr.coproc = FPA_COPROC;
 	hdr.msg = FPA_DETACHAURA;
 	hdr.vfid = gpool_index;
--
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/octeontx: fix Tx xmit command preparation
  2020-07-28 18:43 [dpdk-dev] [PATCH 1/2] mempool/octeontx: fix aura to pool mapping pbhagavatula
@ 2020-07-28 18:43 ` pbhagavatula
  2020-09-27 13:06   ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: pbhagavatula @ 2020-07-28 18:43 UTC (permalink / raw)
  To: jerinj, Harman Kalra; +Cc: dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

When building send command for a given descriptor it expects
it to contain the AURA identifier of the pool that it belongs
to rather than the pool identifier itself.

Fixes: 7f4116bdbb1c ("net/octeontx: add framework for Rx/Tx offloads")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/octeontx/octeontx_rxtx.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h
index 8b46105b6..4dcd94530 100644
--- a/drivers/net/octeontx/octeontx_rxtx.h
+++ b/drivers/net/octeontx/octeontx_rxtx.h
@@ -337,8 +337,7 @@ __octeontx_xmit_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 		__mempool_check_cookies(tx_pkt->pool, (void **)&tx_pkt,
 					1, 0);
 	/* Get the gaura Id */
-	gaura_id = octeontx_fpa_bufpool_gpool((uintptr_t)
-					      tx_pkt->pool->pool_id);
+	gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)tx_pkt->pool->pool_id);
 
 	/* Setup PKO_SEND_BUFLINK_S */
 	cmd_buf[nb_desc++] = PKO_SEND_BUFLINK_SUBDC |
@@ -373,7 +372,7 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 		/* To handle case where mbufs belong to diff pools, like
 		 * fragmentation
 		 */
-		gaura_id = octeontx_fpa_bufpool_gpool((uintptr_t)
+		gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)
 						      tx_pkt->pool->pool_id);
 
 		/* Setup PKO_SEND_GATHER_S */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/octeontx: fix Tx xmit command preparation
  2020-07-28 18:43 ` [dpdk-dev] [PATCH 2/2] net/octeontx: fix Tx xmit command preparation pbhagavatula
@ 2020-09-27 13:06   ` Jerin Jacob
  0 siblings, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2020-09-27 13:06 UTC (permalink / raw)
  To: Pavan Nikhilesh, Ferruh Yigit
  Cc: Jerin Jacob, Harman Kalra, dpdk-dev, dpdk stable

On Wed, Jul 29, 2020 at 12:14 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> When building send command for a given descriptor it expects
> it to contain the AURA identifier of the pool that it belongs
> to rather than the pool identifier itself.
>
> Fixes: 7f4116bdbb1c ("net/octeontx: add framework for Rx/Tx offloads")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Series Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied to dpdk-next-net-mrvl/master. Thanks



> ---
>  drivers/net/octeontx/octeontx_rxtx.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h
> index 8b46105b6..4dcd94530 100644
> --- a/drivers/net/octeontx/octeontx_rxtx.h
> +++ b/drivers/net/octeontx/octeontx_rxtx.h
> @@ -337,8 +337,7 @@ __octeontx_xmit_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
>                 __mempool_check_cookies(tx_pkt->pool, (void **)&tx_pkt,
>                                         1, 0);
>         /* Get the gaura Id */
> -       gaura_id = octeontx_fpa_bufpool_gpool((uintptr_t)
> -                                             tx_pkt->pool->pool_id);
> +       gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)tx_pkt->pool->pool_id);
>
>         /* Setup PKO_SEND_BUFLINK_S */
>         cmd_buf[nb_desc++] = PKO_SEND_BUFLINK_SUBDC |
> @@ -373,7 +372,7 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
>                 /* To handle case where mbufs belong to diff pools, like
>                  * fragmentation
>                  */
> -               gaura_id = octeontx_fpa_bufpool_gpool((uintptr_t)
> +               gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)
>                                                       tx_pkt->pool->pool_id);
>
>                 /* Setup PKO_SEND_GATHER_S */
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-27 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 18:43 [dpdk-dev] [PATCH 1/2] mempool/octeontx: fix aura to pool mapping pbhagavatula
2020-07-28 18:43 ` [dpdk-dev] [PATCH 2/2] net/octeontx: fix Tx xmit command preparation pbhagavatula
2020-09-27 13:06   ` Jerin Jacob

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git