]> git.droids-corp.org - dpdk.git/commitdiff
pipeline: fix SWX jump instruction parsing
authorChurchill Khangar <churchill.khangar@intel.com>
Fri, 16 Oct 2020 13:57:57 +0000 (14:57 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 19 Oct 2020 07:20:25 +0000 (09:20 +0200)
This patch fixes the jump if not valid header instruction parsing.

Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions")
Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_pipeline/rte_swx_pipeline.c

index 2c9fbf4da7cb489c9f7448728c209c4c82b819a1..9d64611018d4dd39e54af8f3eb303b8fb1821f8c 100644 (file)
@@ -4658,7 +4658,7 @@ instr_jmp_invalid_translate(struct rte_swx_pipeline *p,
 {
        struct header *h;
 
-       CHECK(n_tokens == 2, EINVAL);
+       CHECK(n_tokens == 3, EINVAL);
 
        strcpy(data->jmp_label, tokens[1]);