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 28CAFA00C3; Thu, 23 Jun 2022 09:43:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E763040DDB; Thu, 23 Jun 2022 09:43:15 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id AFCA94067B for ; Thu, 23 Jun 2022 09:43:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655970193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dPPEwX9ONyIEJkFWHDgOZZlsoRPh5JlE5y+pOK6tItY=; b=Zytj3V0bVa5HbW9vfCf2J57afLhO9NQ/JQAT1xYr4xl2/ZEBkBKeo2NMeK42NbzAqMznzi Xplvokm8ecP4eXTzM13vyk57pgHofuLVM11ylNhGtqZON/R1+0TYTMDwVXZDz3qVQLCvHg bL7zdvTB3ua1isZqgjSnogIBnXwtPD4= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-148-e7czFBixP5izHFyWzJZqrA-1; Thu, 23 Jun 2022 03:43:09 -0400 X-MC-Unique: e7czFBixP5izHFyWzJZqrA-1 Received: by mail-lj1-f198.google.com with SMTP id a16-20020a05651c211000b002557bb9091bso2853267ljq.11 for ; Thu, 23 Jun 2022 00:43:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dPPEwX9ONyIEJkFWHDgOZZlsoRPh5JlE5y+pOK6tItY=; b=5Ta5nutNXW7aV+oB+r6L2WmuUyXD3HUsSwRF1lXLJ75IGgcJva4ALFeyEF8PK6xbxs MQEGzJtKMEzBosyMXbjr+Ef+C+Iq4w80/6IHuaJxrMfNTXMeI8cEjCrqzFNhHkWaafoz LI+zBIHpHf0UoYY+I2wmFpWk8Q/07bn9zarLpRqsE9o30TzEWPZXaLX3SVCEsArtH3u7 1lnX3fX43tweT2YpIenMvaFJlfms5BM+yC4QfCzO8Em8LOssopFipFrzkPOeOJRoRI3m 725ZoNIe38VnokEKGO8rp6sKhCSBpgBptpqetyZF3ObQJXrnTYuQzYD0tZMyyhy4K8AS dzCA== X-Gm-Message-State: AJIora9ITkEu24UbsVweQwy+70CbtAumD8PhQhFpVB52GXMhKHC99c7r zXpItFn6EE4eKPFP/XFCL5MLFDbjJyt5KQ0HFaE09XpDbl6N5EyXP9orgm/eIb7bdpqFyIa0lEf XfDFiJKdhEz/WfyP4HyU= X-Received: by 2002:a2e:6e0c:0:b0:255:98fb:cb45 with SMTP id j12-20020a2e6e0c000000b0025598fbcb45mr4107120ljc.55.1655970187793; Thu, 23 Jun 2022 00:43:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1so3hvdlyUsSFBfPDogHLJPrSh11jGzChAN4l6WOzQ4fyTrTtQtuqLRCyTxhquN6ghg8IvrJKCbSDyw99c3rx0= X-Received: by 2002:a2e:6e0c:0:b0:255:98fb:cb45 with SMTP id j12-20020a2e6e0c000000b0025598fbcb45mr4107112ljc.55.1655970187593; Thu, 23 Jun 2022 00:43:07 -0700 (PDT) MIME-Version: 1.0 References: <20220616103304.132368-1-wenxuanx.wu@intel.com> In-Reply-To: From: David Marchand Date: Thu, 23 Jun 2022 09:42:56 +0200 Message-ID: Subject: Re: [PATCH] ice/base: fix gcc 12 warning stringop-overflow To: "Wu, WenxuanX" , "Zhang, Qi Z" Cc: "Yang, Qiming" , "dev@dpdk.org" , "thomas@monjalon.net" , "stephen@networkplumber.org" , "stable@dpdk.org" , Ferruh Yigit Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 On Mon, Jun 20, 2022 at 7:06 AM Wu, WenxuanX wrote: > > > > diff --git a/drivers/net/ice/base/ice_protocol_type.h > > > > b/drivers/net/ice/base/ice_protocol_type.h > > > > index 0e6e5990be..cfe3b62630 100644 > > > > --- a/drivers/net/ice/base/ice_protocol_type.h > > > > +++ b/drivers/net/ice/base/ice_protocol_type.h > > > > @@ -421,7 +421,7 @@ struct ice_recp_grp_entry { #define > > > > ICE_INVAL_CHAIN_IND 0xFF > > > > u16 rid; > > > > u8 chain_idx; > > > > - u16 fv_idx[ICE_NUM_WORDS_RECIPE]; > > > > + u8 fv_idx[ICE_NUM_WORDS_RECIPE]; > > > > > > If you change the data type from u16 to u8 for the FV index, you'd > > > better also change the type of all the symbols to store the same > > > thing. e.g. the parameter "fv_idx" of ice_find_prot_off. > > > So, what's exactly the issue that GCC 12 reported? can we fix it from > > > the other side without changing a type in the base code? > change from u8 lkup_indx[5] to u16 lkup_indx[5] can also resolve this issue. Any update? Thanks. -- David Marchand