From: Harman Kalra <hkalra@marvell.com>
To: Pavan Nikhilesh <pbhagavatula@marvell.com>,
Jerin Jacob <jerinj@marvell.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH v2 1/4] event/octeontx2: add switch tag flush op
Date: Fri, 9 Oct 2020 00:18:43 +0530 [thread overview]
Message-ID: <1602182927-18254-1-git-send-email-hkalra@marvell.com> (raw)
In-Reply-To: <CALBAE1OcrUKLzqS5T8Jd27w_rdFRXtmLacprrpYte_hN_iGxCQ@mail.gmail.com>
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Add SWTAG flush operation at the end of transmit sequence to
immediately release the tag held by the core.
Reuse Tag address to check SWTAG completion status.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/octeontx2/otx2_evdev.c | 2 +-
drivers/event/octeontx2/otx2_evdev.h | 18 +++++++++---------
drivers/event/octeontx2/otx2_worker.h | 27 +++++++++++++--------------
3 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c
index b8b57c388..faf8a5f17 100644
--- a/drivers/event/octeontx2/otx2_evdev.c
+++ b/drivers/event/octeontx2/otx2_evdev.c
@@ -771,7 +771,7 @@ sso_set_port_ops(struct otx2_ssogws *ws, uintptr_t base)
ws->tag_op = base + SSOW_LF_GWS_TAG;
ws->wqp_op = base + SSOW_LF_GWS_WQP;
ws->getwrk_op = base + SSOW_LF_GWS_OP_GET_WORK;
- ws->swtp_op = base + SSOW_LF_GWS_SWTP;
+ ws->swtag_flush_op = base + SSOW_LF_GWS_OP_SWTAG_FLUSH;
ws->swtag_norm_op = base + SSOW_LF_GWS_OP_SWTAG_NORM;
ws->swtag_desched_op = base + SSOW_LF_GWS_OP_SWTAG_DESCHED;
}
diff --git a/drivers/event/octeontx2/otx2_evdev.h b/drivers/event/octeontx2/otx2_evdev.h
index 873724dd4..9577d867d 100644
--- a/drivers/event/octeontx2/otx2_evdev.h
+++ b/drivers/event/octeontx2/otx2_evdev.h
@@ -162,15 +162,15 @@ struct otx2_sso_evdev {
struct otx2_timesync_info *tstamp;
} __rte_cache_aligned;
-#define OTX2_SSOGWS_OPS \
- /* WS ops */ \
- uintptr_t getwrk_op; \
- uintptr_t tag_op; \
- uintptr_t wqp_op; \
- uintptr_t swtp_op; \
- uintptr_t swtag_norm_op; \
- uintptr_t swtag_desched_op; \
- uint8_t cur_tt; \
+#define OTX2_SSOGWS_OPS \
+ /* WS ops */ \
+ uintptr_t getwrk_op; \
+ uintptr_t tag_op; \
+ uintptr_t wqp_op; \
+ uintptr_t swtag_flush_op; \
+ uintptr_t swtag_norm_op; \
+ uintptr_t swtag_desched_op; \
+ uint8_t cur_tt; \
uint8_t cur_grp
/* Event port aka GWS */
diff --git a/drivers/event/octeontx2/otx2_worker.h b/drivers/event/octeontx2/otx2_worker.h
index cde1288d9..80dfe3e73 100644
--- a/drivers/event/octeontx2/otx2_worker.h
+++ b/drivers/event/octeontx2/otx2_worker.h
@@ -190,8 +190,7 @@ otx2_ssogws_swtag_untag(struct otx2_ssogws *ws)
static __rte_always_inline void
otx2_ssogws_swtag_flush(struct otx2_ssogws *ws)
{
- otx2_write64(0, OTX2_SSOW_GET_BASE_ADDR(ws->getwrk_op) +
- SSOW_LF_GWS_OP_SWTAG_FLUSH);
+ otx2_write64(0, ws->swtag_flush_op);
ws->cur_tt = SSO_SYNC_EMPTY;
}
@@ -208,20 +207,18 @@ otx2_ssogws_swtag_wait(struct otx2_ssogws *ws)
#ifdef RTE_ARCH_ARM64
uint64_t swtp;
- asm volatile (
- " ldr %[swtb], [%[swtp_loc]] \n"
- " cbz %[swtb], done%= \n"
- " sevl \n"
- "rty%=: wfe \n"
- " ldr %[swtb], [%[swtp_loc]] \n"
- " cbnz %[swtb], rty%= \n"
- "done%=: \n"
- : [swtb] "=&r" (swtp)
- : [swtp_loc] "r" (ws->swtp_op)
- );
+ asm volatile(" ldr %[swtb], [%[swtp_loc]] \n"
+ " tbz %[swtb], 62, done%= \n"
+ " sevl \n"
+ "rty%=: wfe \n"
+ " ldr %[swtb], [%[swtp_loc]] \n"
+ " tbnz %[swtb], 62, rty%= \n"
+ "done%=: \n"
+ : [swtb] "=&r" (swtp)
+ : [swtp_loc] "r" (ws->tag_op));
#else
/* Wait for the SWTAG/SWTAG_FULL operation */
- while (otx2_read64(ws->swtp_op))
+ while (otx2_read64(ws->tag_op) & BIT_ULL(62))
;
#endif
}
@@ -309,6 +306,8 @@ otx2_ssogws_event_tx(struct otx2_ssogws *ws, struct rte_event ev[],
otx2_nix_xmit_one(cmd, txq->lmt_addr, txq->io_addr, flags);
}
+ otx2_write64(0, ws->swtag_flush_op);
+
return 1;
}
--
2.18.0
next prev parent reply other threads:[~2020-10-08 18:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 18:56 [dpdk-dev] [PATCH " Harman Kalra
2020-09-15 18:56 ` [dpdk-dev] [PATCH 2/4] event/octeontx2: improve single flow performance Harman Kalra
2020-10-05 9:29 ` Jerin Jacob
2020-10-08 18:48 ` Harman Kalra [this message]
2020-10-08 18:48 ` [dpdk-dev] [PATCH v2 " Harman Kalra
2020-10-08 18:48 ` [dpdk-dev] [PATCH v2 3/4] net/octeontx2: fix jumbo frame crash Harman Kalra
2020-10-16 4:04 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2020-10-08 18:48 ` [dpdk-dev] [PATCH v2 4/4] app/eventdev: enable fast free offload Harman Kalra
2020-10-11 10:33 ` Jerin Jacob
2020-10-13 19:06 ` Jerin Jacob
2020-10-11 10:40 ` [dpdk-dev] [PATCH v2 1/4] event/octeontx2: add switch tag flush op Jerin Jacob
2020-09-15 18:56 ` [dpdk-dev] [PATCH 3/4] net/octeontx2: fix jumbo frame crash Harman Kalra
2020-09-15 18:56 ` [dpdk-dev] [PATCH 4/4] app/eventdev: enable fast free offload Harman Kalra
2020-10-05 9:26 ` 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=1602182927-18254-1-git-send-email-hkalra@marvell.com \
--to=hkalra@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=pbhagavatula@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).