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 40EF3A0540; Wed, 6 Jul 2022 04:48:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D589740687; Wed, 6 Jul 2022 04:48:30 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 696F040395 for ; Wed, 6 Jul 2022 04:48:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657075709; x=1688611709; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rOBa5yT4aC+14LDPz759e1BI/jefjTQFvZ64/t3C+fk=; b=eP5Og5f2aTRU2qhkwSm5xUadoOM9lTyMQqJTaPg643s7iOMGQFv2ri+N 7Cf91WEehzgORUOA5sqiOMwzzxNma/vGBx90rn90isHFpxs2H6VqgiJuB 7hCsuTUqCLlnxhLHo7yQUcNsPfCACCYCTN82+AczAiJ8r2DBu65HIVwxm r9C2kHKrvRLazLf6fpb2rEb8zIa67JAI2AD9wWCxqaV3d5ngYx12/yYe6 2xdZ9E8qtgoifIdp6QRloMKf5NHziwOQ6iipikzOLpw9sxRis3roC9mYx zye5W0n2IUb/48ZtSVIcLewowX4OoYYj9v+uTcuWHm2UdXl5Q42fuuVk0 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10399"; a="282376654" X-IronPort-AV: E=Sophos;i="5.92,248,1650956400"; d="scan'208";a="282376654" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 19:48:16 -0700 X-IronPort-AV: E=Sophos;i="5.92,248,1650956400"; d="scan'208";a="620113711" Received: from unknown (HELO localhost.localdomain) ([10.239.252.3]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 19:48:13 -0700 From: wenxuanx.wu@intel.com To: qiz.zhang@intel.com, beilei.xing@intel.com, dev@dpdk.org Cc: qiming.yang@intel.com, yidingx.zhou@intel.com, wenxuanx.wu@intel.com, simei.su@intel.com, stable@dpdk.com Subject: [PATCH v2] net/iavf: fix gtpu extension flow error Date: Wed, 6 Jul 2022 10:45:02 +0800 Message-Id: <20220706024502.1069651-1-wenxuanx.wu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Wenxuan Wu Due to the change of struct rte_gtp_psc_generic_hdr, kernel driver can not handle gtp_psc properly, we introduce a new structure to fix this gap between kernel driver and struct rte_gtp_psc_generic_hdr. Fixes: d5eb3e600d9e ("net/iavf: support flow director basic rule") Cc: simei.su@intel.com Cc: stable@dpdk.com Signed-off-by: Wenxuan Wu --- v2: refine doc. --- drivers/net/iavf/iavf_fdir.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index f236260502..4789d46ab2 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -1300,8 +1300,22 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, GTPU_DWN, QFI); } - rte_memcpy(hdr->buffer, gtp_psc_spec, - sizeof(*gtp_psc_spec)); + /* + * New structure to fix gap between kernel driver and + * rte_gtp_psc_generic_hdr. + */ + struct iavf_gtp_psc_spec_hdr { + uint8_t len; + uint8_t qfi:6; + uint8_t type:4; + uint8_t next; + } psc; + psc.len = gtp_psc_spec->hdr.ext_hdr_len; + psc.qfi = gtp_psc_spec->hdr.qfi; + psc.type = gtp_psc_spec->hdr.type; + psc.next = 0; + rte_memcpy(hdr->buffer, &psc, + sizeof(struct iavf_gtp_psc_spec_hdr)); } hdrs->count = ++layer; -- 2.25.1