From 8cd9b090b46056e15aa3b533cb94c0f1b9ecad79 Mon Sep 17 00:00:00 2001 From: Wenjun Wu Date: Tue, 17 Aug 2021 14:49:55 +0800 Subject: [PATCH] net/iavf: fix flow director L3 field for IPv4 fragments Originally, the value of field_selector for IPV4_FRAG header hdr1 is the same as the previous header hdr2. For IPv4 packets, field_selector for hdr2 can be any value between 0 and 4, depending on the selected field. Actually, this value for IPV4_FRAG should be constant 0, which denotes the field packet ID. This patch adds an assignment to hdr1->field_selector to make sure that it is always 0. Fixes: 3334513ef484 ("net/iavf: support flow director for IP fragment") Cc: stable@dpdk.org Signed-off-by: Wenjun Wu Acked-by: Qi Zhang --- drivers/net/iavf/iavf_fdir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index da3eec8b59..ca72d457fd 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -664,6 +664,7 @@ iavf_fdir_add_fragment_hdr(struct virtchnl_proto_hdrs *hdrs, int layer) /* adding dummy fragment header */ hdr1 = &hdrs->proto_hdr[layer]; VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, IPV4_FRAG); + hdr1->field_selector = 0; hdrs->count = ++layer; } -- 2.20.1