]> git.droids-corp.org - dpdk.git/commit
pipeline: fix emit instruction for invalid headers
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>
Wed, 27 Apr 2022 21:56:52 +0000 (22:56 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 1 Jun 2022 11:06:06 +0000 (13:06 +0200)
commit775be5b5399da981100f77988b100613ce44a9d5
treeea65cf5bda144ad0fab9e4c69f45dc8e5a8fa862
parent924de7b8e64489231351c48767973a1042d8ffd3
pipeline: fix emit instruction for invalid headers

Fix the emit instruction for the pathological case of all headers to
be emitted being invalid. In this case, the for loop was essentially
skipped and the last emitted header (or an invalid memory location)
getting corrupted by setting its size to 0 through the assignment to
ho->n_bytes right after the for loop.

Fixes: d60dbdc88a3e ("pipeline: create inline functions for emit instruction")
Cc: stable@dpdk.org
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
lib/pipeline/rte_swx_pipeline_internal.h