From patchwork Thu Jun 15 05:17:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junfeng Guo X-Patchwork-Id: 128725 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 45B2342CC0; Thu, 15 Jun 2023 07:17:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA29542D1D; Thu, 15 Jun 2023 07:17:32 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 234C541101; Thu, 15 Jun 2023 07:17:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686806251; x=1718342251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=136H3QVIn5MfUiTD98lboLhVoCuvDjyP+sp5QL8fjBM=; b=WfvUHr2+hoisJEoU43qcdZkqzenrp2NvGYGlxoLJlw9Y1hSKlVeyLJ/k BJvVVOxMyzQRhFimX+JQ9sze81V5UsiX6Ksk5LOYQ2ik+N8YG0j3bNgYY +S7rgf1POBuHY8XLcbW6gwABF6u11O2tgpQ8ephq25Npl0rUtDDdhLXOK XVU+hCBu077Ugc9EIRv4T0sUC6Zo1e71DwHHZrY8jXCuZlzmo7/5oRUvy VXl2YMdSO3xvGAxQThXQrYX+9rNylPgHoyEWRtiPVoprFqkuGoA+tpA59 0AqnHLwzT8VzyFq8Dj9q8NDTYKo0Vb+MeaYXs7+tQxIzBTt7P+eqjNX8L Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="348482462" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="348482462" 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:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="1042491889" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="1042491889" 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:29 -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 2/2] net/iavf: fix variable type in pattern parsing for raw flow Date: Thu, 15 Jun 2023 13:17:17 +0800 Message-Id: <20230615051717.2906443-3-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 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: bc0e85586eaf ("net/iavf: support VF RSS flow rule with raw pattern") Cc: stable@dpdk.org Signed-off-by: Ting Xu Signed-off-by: Junfeng Guo --- drivers/net/iavf/iavf_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index ae6fb38594..cf4d677101 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -886,8 +886,8 @@ iavf_hash_parse_raw_pattern(const struct rte_flow_item *item, struct iavf_rss_meta *meta) { const struct rte_flow_item_raw *raw_spec, *raw_mask; + 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;