pipeline: fix instruction translation
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>
Wed, 24 Mar 2021 11:36:03 +0000 (11:36 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 24 Mar 2021 17:54:04 +0000 (18:54 +0100)
commitd366a48f467a973c7453ef1729e97a9d46a380ef
treeaa671eaccbe3cc2e651f95e1101787ea26461faa
parent0d644eb621d6bb0bcb7c74031b9bb53fe9396ee3
pipeline: fix instruction translation

The SWX pipeline instructions work with operands of different types:
header fields (h.header.field), packet meta-data (m.field), extern
object mailbox field (e.obj.field), extern function (f.field), action
data read from table entries (t.field), or immediate values; hence the
HMEFTI acronym.

For some pipeline instructions (add/sub, srl/shr, jmplt/jmpgt), only
the H, M and I cases were handled, while the E, F and T cases were
disregarded. This is what we fix here.

Fixes: baf7999303d0 ("pipeline: introduce SWX add instruction")
Fixes: c88c62943818 ("pipeline: introduce SWX subtract instruction")
Fixes: b09ba6d0a3c2 ("pipeline: introduce SWX SHL instruction")
Fixes: e0f51638b715 ("pipeline: introduce SWX SHR instruction")
Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions")
Cc: stable@dpdk.org
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_pipeline/rte_swx_pipeline.c