From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E77FDA0548; Tue, 17 Aug 2021 09:08:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE6734014E; Tue, 17 Aug 2021 09:08:07 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 3890440143 for ; Tue, 17 Aug 2021 09:08:06 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10078"; a="238088098" X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="238088098" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2021 00:08:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="676374657" Received: from wuwenjun.sh.intel.com ([10.67.110.178]) by fmsmga006.fm.intel.com with ESMTP; 17 Aug 2021 00:08:04 -0700 From: Wenjun Wu To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com Cc: Wenjun Wu Date: Tue, 17 Aug 2021 14:49:55 +0800 Message-Id: <20210817064955.160102-1-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210802075754.952979-1-wenjun1.wu@intel.com> References: <20210802075754.952979-1-wenjun1.wu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/iavf: fix wrong FDIR L3 field set for IPv4 fragment packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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") Signed-off-by: Wenjun Wu --- v2: reword commit log --- 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 2869a8b424..32b06044f2 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.25.1