From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com
Subject: [dpdk-dev] [PATCH] pipeline: fix multiple emit pattern detection
Date: Thu, 12 Nov 2020 14:50:13 +0000 [thread overview]
Message-ID: <20201112145013.21778-1-cristian.dumitrescu@intel.com> (raw)
Fix the detection of instruction pattern with multiple emits followed
by TX. Once detected, this is one of the instruction patterns that is
internally replaced with a single optimized instruction, as long as
none of the instructions to be replaced is referenced by a jump
instruction. The fix enforces this check for the TX instruction of
the pattern.
Fixes: 31035e87b207 ("pipeline: add SWX instruction optimizer")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_pipeline/rte_swx_pipeline.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
index fe8bfc8b3..eaaed7a0a 100644
--- a/lib/librte_pipeline/rte_swx_pipeline.c
+++ b/lib/librte_pipeline/rte_swx_pipeline.c
@@ -5796,6 +5796,9 @@ instr_pattern_emit_many_tx_detect(struct instruction *instr,
if (instr[i].type != INSTR_TX)
return 0;
+ if (data[i].n_users)
+ return 0;
+
i++;
*n_pattern_instr = i;
--
2.17.1
next reply other threads:[~2020-11-12 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 14:50 Cristian Dumitrescu [this message]
2020-11-15 15:59 ` David Marchand
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=20201112145013.21778-1-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
/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).