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 21B76A0C45; Mon, 13 Sep 2021 11:07:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95F6640151; Mon, 13 Sep 2021 11:07:33 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 0056A4014F; Mon, 13 Sep 2021 11:07:31 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10105"; a="221665511" X-IronPort-AV: E=Sophos;i="5.85,288,1624345200"; d="scan'208";a="221665511" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2021 02:07:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,288,1624345200"; d="scan'208";a="507024504" Received: from dpdk-liulingy-1.sh.intel.com ([10.67.118.194]) by fmsmga008.fm.intel.com with ESMTP; 13 Sep 2021 02:07:11 -0700 From: Lingyu Liu To: dev@dpdk.org, qi.z.zhang@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com Cc: Lingyu Liu , stable@dpdk.org, Junfeng Guo Date: Mon, 13 Sep 2021 15:34:02 +0000 Message-Id: <20210913153402.312779-1-lingyu.liu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210901164751.258544-1-lingyu.liu@intel.com> References: <20210901164751.258544-1-lingyu.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/iavf: fix QFI fields of GTPU UL and DL for FDIR 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" Fix QFI fields matching of GTPU UL/DL for FDIR. Fixes: 78e8a87f6324 ("net/iavf: fix GTPU UL and DL support for flow director") Cc: stable@dpdk.org Signed-off-by: Junfeng Guo Signed-off-by: Lingyu Liu --- V2: * Fix coding style issue --- drivers/net/iavf/iavf_fdir.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index 32b06044f2..560589a496 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -1171,7 +1171,17 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, if (gtp_psc_spec && gtp_psc_mask) { if (gtp_psc_mask->qfi == UINT8_MAX) { input_set |= IAVF_INSET_GTPU_QFI; - VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, GTPU_EH, QFI); + if (gtp_psc_spec->pdu_type == + IAVF_GTPU_EH_UPLINK) + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, + GTPU_UP, QFI); + else if (gtp_psc_spec->pdu_type == + IAVF_GTPU_EH_DWLINK) + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, + GTPU_DWN, QFI); + else + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, + GTPU_EH, QFI); } rte_memcpy(hdr->buffer, gtp_psc_spec, -- 2.25.1