DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] pipeline: fix multiple emit pattern detection
@ 2020-11-12 14:50 Cristian Dumitrescu
  2020-11-15 15:59 ` David Marchand
  0 siblings, 1 reply; 2+ messages in thread
From: Cristian Dumitrescu @ 2020-11-12 14:50 UTC (permalink / raw)
  To: dev; +Cc: david.marchand

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


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

* Re: [dpdk-dev] [PATCH] pipeline: fix multiple emit pattern detection
  2020-11-12 14:50 [dpdk-dev] [PATCH] pipeline: fix multiple emit pattern detection Cristian Dumitrescu
@ 2020-11-15 15:59 ` David Marchand
  0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2020-11-15 15:59 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: dev

On Thu, Nov 12, 2020 at 3:50 PM Cristian Dumitrescu
<cristian.dumitrescu@intel.com> wrote:
>
> 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>

Applied, thanks.


-- 
David Marchand


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

end of thread, other threads:[~2020-11-15 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 14:50 [dpdk-dev] [PATCH] pipeline: fix multiple emit pattern detection Cristian Dumitrescu
2020-11-15 15:59 ` David Marchand

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