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 0889642CC0; Thu, 15 Jun 2023 07:17:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87F54427F2; Thu, 15 Jun 2023 07:17:31 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6753B40DDA; Thu, 15 Jun 2023 07:17:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686806249; x=1718342249; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tyJWIH+bhyCO8CmL4tBvlHLpYA8x34z9skOYE0c9lxY=; b=X6iW/rfYzFfmg/gRnIrK+arlRlwM8ZJV3qqK1vtljYEGolF2ktfO6ULJ b27m5vnEtOVjJYjbsgloxTcH90OMicAT/5dfxK5DeUM0ixHI2vFzFfTUd WpIsoxL3htKTsIS0XhtRRVXir+t6obchtuNJ0swgQHSt5Uhp8asUcT4bE u+aiH4bQlOYCLUOCfUnHHQwGyiOyQch5Og0svVHDwPxg0ry/10NhDlIGM eJ5DEwNVstTbsUpr3I8I6Ywuycra2ysN0DaxLJyZHgxi6r8NLUazwruAF ghOMpkbYBjx6UQLcmnnuvHmln60lYKkZaK8MTckB0NU1MWv934j5I/GNY A==; X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="348482460" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="348482460" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 22:17:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="1042491884" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="1042491884" Received: from dpdk-jf-ntb-v2.sh.intel.com ([10.67.119.19]) by fmsmga005.fm.intel.com with ESMTP; 14 Jun 2023 22:17:27 -0700 From: Junfeng Guo To: qi.z.zhang@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, stable@dpdk.org, ting.xu@intel.com, Junfeng Guo Subject: [PATCH 1/2] net/ice: fix variable type in pattern parsing for raw flow Date: Thu, 15 Jun 2023 13:17:16 +0800 Message-Id: <20230615051717.2906443-2-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230615051717.2906443-1-junfeng.guo@intel.com> References: <20230615051717.2906443-1-junfeng.guo@intel.com> 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 In current pattern parsing function for protocol agnostic flow offloading (raw flow), some of the variables of packet length are defined as uint8_t, which are too small for some large-size packets, such as srv6 (Segment Routing over IPv6 dataplane) type. Change the type to uint16_t. Fixes: 25be39cc1760 ("net/ice: enable protocol agnostic flow offloading in FDIR") Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS") Cc: stable@dpdk.org Signed-off-by: Ting Xu Signed-off-by: Junfeng Guo --- drivers/net/ice/ice_fdir_filter.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 480b369af8..e8842bc242 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -1876,7 +1876,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, (uint8_t *)(uintptr_t)raw_mask->pattern; uint8_t *tmp_spec, *tmp_mask; uint16_t tmp_val = 0; - uint8_t pkt_len = 0; + uint16_t pkt_len = 0; uint8_t tmp = 0; int i, j; diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index f35727856e..52646e9408 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -653,8 +653,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad, const struct rte_flow_item_raw *raw_spec, *raw_mask; struct ice_parser_profile prof; struct ice_parser_result rslt; + uint16_t spec_len, pkt_len; uint8_t *pkt_buf, *msk_buf; - uint8_t spec_len, pkt_len; uint8_t tmp_val = 0; uint8_t tmp_c = 0; int i, j; -- 2.25.1