* [PATCH] event/cnxk: add wmb after steorl for event mode
@ 2023-05-30 11:53 Srujana Challa
2023-05-31 10:32 ` [PATCH v2] event/cnxk: fix LMTST write for single " Srujana Challa
0 siblings, 1 reply; 7+ messages in thread
From: Srujana Challa @ 2023-05-30 11:53 UTC (permalink / raw)
To: pbhagavatula, sthotton, rbhansali, jerinj; +Cc: dev, schalla, ndabilpuram
LMTST area can be overwritten before read by HW between to consecutive
steorl operations. Hence, add wmb() after steorl op to make sure
the lmtst operation is complete.
Signed-off-by: Srujana Challa <schalla@marvell.com>
---
drivers/event/cnxk/cn10k_tx_worker.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/event/cnxk/cn10k_tx_worker.h b/drivers/event/cnxk/cn10k_tx_worker.h
index c18786a14c..81fe31c4b9 100644
--- a/drivers/event/cnxk/cn10k_tx_worker.h
+++ b/drivers/event/cnxk/cn10k_tx_worker.h
@@ -43,7 +43,6 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
const uint64_t *txq_data, const uint32_t flags)
{
uint8_t lnum = 0, loff = 0, shft = 0;
- uint16_t ref_cnt = m->refcnt;
struct cn10k_eth_txq *txq;
uintptr_t laddr;
uint16_t segdw;
@@ -98,10 +97,9 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
roc_lmt_submit_steorl(lmt_id, pa);
- if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
- if (ref_cnt > 1)
- rte_io_wmb();
- }
+ /* Memory barrier to make sure lmtst store completes */
+ rte_io_wmb();
+
return 1;
}
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] event/cnxk: fix LMTST write for single event mode
2023-05-30 11:53 [PATCH] event/cnxk: add wmb after steorl for event mode Srujana Challa
@ 2023-05-31 10:32 ` Srujana Challa
2023-05-31 10:55 ` Pavan Nikhilesh Bhagavatula
0 siblings, 1 reply; 7+ messages in thread
From: Srujana Challa @ 2023-05-31 10:32 UTC (permalink / raw)
To: pbhagavatula, sthotton, rbhansali, jerinj; +Cc: dev, schalla, ndabilpuram
LMTST area can be overwritten before read by HW between to consecutive
steorl operations. Hence, add wmb() after steorl op to make sure
the LMTST operation is complete.
Fixes: 313e884a22fd ("event/cnxk: support Tx adapter fast path")
Cc: pbhagavatula@marvell.com
Signed-off-by: Srujana Challa <schalla@marvell.com>
---
drivers/event/cnxk/cn10k_tx_worker.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/event/cnxk/cn10k_tx_worker.h b/drivers/event/cnxk/cn10k_tx_worker.h
index c18786a14c..81fe31c4b9 100644
--- a/drivers/event/cnxk/cn10k_tx_worker.h
+++ b/drivers/event/cnxk/cn10k_tx_worker.h
@@ -43,7 +43,6 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
const uint64_t *txq_data, const uint32_t flags)
{
uint8_t lnum = 0, loff = 0, shft = 0;
- uint16_t ref_cnt = m->refcnt;
struct cn10k_eth_txq *txq;
uintptr_t laddr;
uint16_t segdw;
@@ -98,10 +97,9 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
roc_lmt_submit_steorl(lmt_id, pa);
- if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
- if (ref_cnt > 1)
- rte_io_wmb();
- }
+ /* Memory barrier to make sure lmtst store completes */
+ rte_io_wmb();
+
return 1;
}
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v2] event/cnxk: fix LMTST write for single event mode
2023-05-31 10:32 ` [PATCH v2] event/cnxk: fix LMTST write for single " Srujana Challa
@ 2023-05-31 10:55 ` Pavan Nikhilesh Bhagavatula
2023-05-31 13:24 ` Jerin Jacob
0 siblings, 1 reply; 7+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2023-05-31 10:55 UTC (permalink / raw)
To: Srujana Challa, Shijith Thotton, Rahul Bhansali,
Jerin Jacob Kollanukkaran
Cc: dev, Srujana Challa, Nithin Kumar Dabilpuram
> -----Original Message-----
> From: Srujana Challa <schalla@marvell.com>
> Sent: Wednesday, May 31, 2023 4:03 PM
> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Shijith
> Thotton <sthotton@marvell.com>; Rahul Bhansali <rbhansali@marvell.com>;
> Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Cc: dev@dpdk.org; Srujana Challa <schalla@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpuram@marvell.com>
> Subject: [PATCH v2] event/cnxk: fix LMTST write for single event mode
>
> LMTST area can be overwritten before read by HW between to consecutive
> steorl operations. Hence, add wmb() after steorl op to make sure
> the LMTST operation is complete.
>
> Fixes: 313e884a22fd ("event/cnxk: support Tx adapter fast path")
> Cc: pbhagavatula@marvell.com
>
> Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> drivers/event/cnxk/cn10k_tx_worker.h | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/event/cnxk/cn10k_tx_worker.h
> b/drivers/event/cnxk/cn10k_tx_worker.h
> index c18786a14c..81fe31c4b9 100644
> --- a/drivers/event/cnxk/cn10k_tx_worker.h
> +++ b/drivers/event/cnxk/cn10k_tx_worker.h
> @@ -43,7 +43,6 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct
> rte_mbuf *m, uint64_t *cmd,
> const uint64_t *txq_data, const uint32_t flags)
> {
> uint8_t lnum = 0, loff = 0, shft = 0;
> - uint16_t ref_cnt = m->refcnt;
> struct cn10k_eth_txq *txq;
> uintptr_t laddr;
> uint16_t segdw;
> @@ -98,10 +97,9 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct
> rte_mbuf *m, uint64_t *cmd,
>
> roc_lmt_submit_steorl(lmt_id, pa);
>
> - if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
> - if (ref_cnt > 1)
> - rte_io_wmb();
> - }
> + /* Memory barrier to make sure lmtst store completes */
> + rte_io_wmb();
> +
> return 1;
> }
>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] event/cnxk: fix LMTST write for single event mode
2023-05-31 10:55 ` Pavan Nikhilesh Bhagavatula
@ 2023-05-31 13:24 ` Jerin Jacob
0 siblings, 0 replies; 7+ messages in thread
From: Jerin Jacob @ 2023-05-31 13:24 UTC (permalink / raw)
To: Pavan Nikhilesh Bhagavatula
Cc: Srujana Challa, Shijith Thotton, Rahul Bhansali,
Jerin Jacob Kollanukkaran, dev, Nithin Kumar Dabilpuram
On Wed, May 31, 2023 at 4:25 PM Pavan Nikhilesh Bhagavatula
<pbhagavatula@marvell.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Srujana Challa <schalla@marvell.com>
> > Sent: Wednesday, May 31, 2023 4:03 PM
> > To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Shijith
> > Thotton <sthotton@marvell.com>; Rahul Bhansali <rbhansali@marvell.com>;
> > Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> > Cc: dev@dpdk.org; Srujana Challa <schalla@marvell.com>; Nithin Kumar
> > Dabilpuram <ndabilpuram@marvell.com>
> > Subject: [PATCH v2] event/cnxk: fix LMTST write for single event mode
> >
> > LMTST area can be overwritten before read by HW between to consecutive
> > steorl operations. Hence, add wmb() after steorl op to make sure
> > the LMTST operation is complete.
> >
> > Fixes: 313e884a22fd ("event/cnxk: support Tx adapter fast path")
> > Cc: pbhagavatula@marvell.com
> >
> > Signed-off-by: Srujana Challa <schalla@marvell.com>
>
> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks
>
> > ---
> > drivers/event/cnxk/cn10k_tx_worker.h | 8 +++-----
> > 1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/event/cnxk/cn10k_tx_worker.h
> > b/drivers/event/cnxk/cn10k_tx_worker.h
> > index c18786a14c..81fe31c4b9 100644
> > --- a/drivers/event/cnxk/cn10k_tx_worker.h
> > +++ b/drivers/event/cnxk/cn10k_tx_worker.h
> > @@ -43,7 +43,6 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct
> > rte_mbuf *m, uint64_t *cmd,
> > const uint64_t *txq_data, const uint32_t flags)
> > {
> > uint8_t lnum = 0, loff = 0, shft = 0;
> > - uint16_t ref_cnt = m->refcnt;
> > struct cn10k_eth_txq *txq;
> > uintptr_t laddr;
> > uint16_t segdw;
> > @@ -98,10 +97,9 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct
> > rte_mbuf *m, uint64_t *cmd,
> >
> > roc_lmt_submit_steorl(lmt_id, pa);
> >
> > - if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
> > - if (ref_cnt > 1)
> > - rte_io_wmb();
> > - }
> > + /* Memory barrier to make sure lmtst store completes */
> > + rte_io_wmb();
> > +
> > return 1;
> > }
> >
> > --
> > 2.25.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] event/cnxk: add wmb after steorl for event mode
2023-05-30 9:42 [PATCH] event/cnxk: add wmb after steorl for " Srujana Challa
@ 2023-05-30 10:00 ` Jerin Jacob
0 siblings, 0 replies; 7+ messages in thread
From: Jerin Jacob @ 2023-05-30 10:00 UTC (permalink / raw)
To: Srujana Challa
Cc: pbhagavatula, sthotton, rbhansali, jerinj, dev, ndabilpuram
On Tue, May 30, 2023 at 3:12 PM Srujana Challa <schalla@marvell.com> wrote:
>
> From: Author Srujana Challa <schalla@marvell.com>
>
> LMTST area can be overwritten before read by HW between to consecutive
> steorl operations. Hence, add wmb() after steorl op to make sure
> the lmtst operation is complete.
lmtst -> LMTST
Change the subject to "fix ...."
And add Fixes: tag
>
> Signed-off-by: Srujana Challa <schalla@marvell.com>
> ---
> drivers/event/cnxk/cn10k_tx_worker.h | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/event/cnxk/cn10k_tx_worker.h b/drivers/event/cnxk/cn10k_tx_worker.h
> index c18786a14c..81fe31c4b9 100644
> --- a/drivers/event/cnxk/cn10k_tx_worker.h
> +++ b/drivers/event/cnxk/cn10k_tx_worker.h
> @@ -43,7 +43,6 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
> const uint64_t *txq_data, const uint32_t flags)
> {
> uint8_t lnum = 0, loff = 0, shft = 0;
> - uint16_t ref_cnt = m->refcnt;
> struct cn10k_eth_txq *txq;
> uintptr_t laddr;
> uint16_t segdw;
> @@ -98,10 +97,9 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
>
> roc_lmt_submit_steorl(lmt_id, pa);
>
> - if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
> - if (ref_cnt > 1)
> - rte_io_wmb();
> - }
> + /* Memory barrier to make sure lmtst store completes */
> + rte_io_wmb();
> +
> return 1;
> }
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] event/cnxk: add wmb after steorl for event mode
@ 2023-05-30 9:42 Srujana Challa
2023-05-30 10:00 ` Jerin Jacob
0 siblings, 1 reply; 7+ messages in thread
From: Srujana Challa @ 2023-05-30 9:42 UTC (permalink / raw)
To: pbhagavatula, sthotton, rbhansali, jerinj; +Cc: dev, schalla, ndabilpuram
From: Author Srujana Challa <schalla@marvell.com>
LMTST area can be overwritten before read by HW between to consecutive
steorl operations. Hence, add wmb() after steorl op to make sure
the lmtst operation is complete.
Signed-off-by: Srujana Challa <schalla@marvell.com>
---
drivers/event/cnxk/cn10k_tx_worker.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/event/cnxk/cn10k_tx_worker.h b/drivers/event/cnxk/cn10k_tx_worker.h
index c18786a14c..81fe31c4b9 100644
--- a/drivers/event/cnxk/cn10k_tx_worker.h
+++ b/drivers/event/cnxk/cn10k_tx_worker.h
@@ -43,7 +43,6 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
const uint64_t *txq_data, const uint32_t flags)
{
uint8_t lnum = 0, loff = 0, shft = 0;
- uint16_t ref_cnt = m->refcnt;
struct cn10k_eth_txq *txq;
uintptr_t laddr;
uint16_t segdw;
@@ -98,10 +97,9 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
roc_lmt_submit_steorl(lmt_id, pa);
- if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
- if (ref_cnt > 1)
- rte_io_wmb();
- }
+ /* Memory barrier to make sure lmtst store completes */
+ rte_io_wmb();
+
return 1;
}
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] event/cnxk: add wmb after steorl for event mode
@ 2023-05-30 9:39 Srujana Challa
0 siblings, 0 replies; 7+ messages in thread
From: Srujana Challa @ 2023-05-30 9:39 UTC (permalink / raw)
To: pbhagavatula, sthotton, rbhansali, jerinj
Cc: dev, schalla, ndabilpuram, sa_ip-toolkits-Jenkins
From: Author Srujana Challa <schalla@marvell.com>
LMTST area can be overwritten before read by HW between to consecutive
steorl operations. Hence, add wmb() after steorl op to make sure
the lmtst operation is complete.
Signed-off-by: Srujana Challa <schalla@marvell.com>
Change-Id: Ib16d7cd88cff79e9ca78eff8c47b7ddad2d234dd
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpdk/+/103549
Base-Builds: sa_ip-toolkits-Jenkins <sa_ip-toolkits-jenkins@marvell.com>
Tested-by: sa_ip-toolkits-Jenkins <sa_ip-toolkits-jenkins@marvell.com>
Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
---
drivers/event/cnxk/cn10k_tx_worker.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/event/cnxk/cn10k_tx_worker.h b/drivers/event/cnxk/cn10k_tx_worker.h
index c18786a14c..81fe31c4b9 100644
--- a/drivers/event/cnxk/cn10k_tx_worker.h
+++ b/drivers/event/cnxk/cn10k_tx_worker.h
@@ -43,7 +43,6 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
const uint64_t *txq_data, const uint32_t flags)
{
uint8_t lnum = 0, loff = 0, shft = 0;
- uint16_t ref_cnt = m->refcnt;
struct cn10k_eth_txq *txq;
uintptr_t laddr;
uint16_t segdw;
@@ -98,10 +97,9 @@ cn10k_sso_tx_one(struct cn10k_sso_hws *ws, struct rte_mbuf *m, uint64_t *cmd,
roc_lmt_submit_steorl(lmt_id, pa);
- if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
- if (ref_cnt > 1)
- rte_io_wmb();
- }
+ /* Memory barrier to make sure lmtst store completes */
+ rte_io_wmb();
+
return 1;
}
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-31 13:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 11:53 [PATCH] event/cnxk: add wmb after steorl for event mode Srujana Challa
2023-05-31 10:32 ` [PATCH v2] event/cnxk: fix LMTST write for single " Srujana Challa
2023-05-31 10:55 ` Pavan Nikhilesh Bhagavatula
2023-05-31 13:24 ` Jerin Jacob
-- strict thread matches above, loose matches on Subject: below --
2023-05-30 9:42 [PATCH] event/cnxk: add wmb after steorl for " Srujana Challa
2023-05-30 10:00 ` Jerin Jacob
2023-05-30 9:39 Srujana Challa
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).