net/iavf: fix refine protocol header
Protocol header count should be changed when tunnel level is larger than 1.
Fixes: 0b241667cc
("net/iavf: fix tainted scalar")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
0c550022fb
commit
0f044b6681
@ -1210,7 +1210,7 @@ iavf_refine_proto_hdrs_by_pattern(struct virtchnl_proto_hdrs *proto_hdrs,
|
||||
struct virtchnl_proto_hdr *hdr2;
|
||||
int i, shift_count = 1;
|
||||
int tun_lvl = proto_hdrs->tunnel_level;
|
||||
int phdrs_count = proto_hdrs->count;
|
||||
int phdrs_count = 0;
|
||||
|
||||
if (!(phint & IAVF_PHINT_GTPU_MSK) && !(phint & IAVF_PHINT_GRE))
|
||||
return;
|
||||
@ -1219,6 +1219,7 @@ iavf_refine_proto_hdrs_by_pattern(struct virtchnl_proto_hdrs *proto_hdrs,
|
||||
if (phint & IAVF_PHINT_LAYERS_MSK)
|
||||
shift_count = 2;
|
||||
|
||||
phdrs_count = proto_hdrs->count;
|
||||
/* shift headers layer */
|
||||
for (i = phdrs_count - 1 + shift_count;
|
||||
i > shift_count - 1; i--) {
|
||||
|
Loading…
Reference in New Issue
Block a user