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 4001BA00C2 for ; Thu, 6 Oct 2022 09:51:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3277542B92; Thu, 6 Oct 2022 09:51:38 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 3C15D4280E for ; Thu, 6 Oct 2022 09:51:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665042695; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X34tXZH+2x/7ZhWfImKCEwMTVGnSsUTv05hMc9iyedM=; b=g9nzIkq+tWRPPMtTBgHi7qlgesza3PwuWkR9MdUOvEYcDm/pWlM9ufygGI8rbe78n0k1yt J90LVANeeYev7vF1ygFfhsnOHGEAB7XvyJCdgsQacCqy7ooEOY8d2LQa8+5vMDx8saXarb o44uxaMEVi9OyKj7C04ZhmGLOtk7eIA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-CF6qWwMYNTCfr3B2K73-9w-1; Thu, 06 Oct 2022 03:51:32 -0400 X-MC-Unique: CF6qWwMYNTCfr3B2K73-9w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 24D0F29AB42F; Thu, 6 Oct 2022 07:51:32 +0000 (UTC) Received: from [10.39.208.19] (unknown [10.39.208.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 85528400E88C; Thu, 6 Oct 2022 07:51:30 +0000 (UTC) Message-ID: <3ef7068d-5e05-4a4d-653c-43b1b31dd869@redhat.com> Date: Thu, 6 Oct 2022 09:51:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 To: Stephen Hemminger Cc: dev@dpdk.org, cheng1.jiang@intel.com, chenbo.xia@intel.com, zhoumin@loongson.cn, david.marchand@redhat.com, thomas@monjalon.net, stable@dpdk.org References: <20221005151159.72366-1-maxime.coquelin@redhat.com> <20221005203524.89336-1-maxime.coquelin@redhat.com> <20221005170143.6235a939@hermes.local> From: Maxime Coquelin Subject: Re: [PATCH v3] vhost: fix build issues with GCC 12 In-Reply-To: <20221005170143.6235a939@hermes.local> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi Stephen, On 10/6/22 02:01, Stephen Hemminger wrote: > On Wed, 5 Oct 2022 22:35:24 +0200 > Maxime Coquelin wrote: > >> In practice, it would never happen since 'pkt->pkt_len' is >> unlikely to be close to UINT32_MAX, but let's just change >> 'size' to uint64_t to make the compiler happy without >> having to add runtime checks. > > > Would the standard typedef size_t work since that is what sizeof() returns. > I'm not sure it would not create issues on 32 bits architectures build given size_t is 32bits in this case if I'm not mistaken, as it adds something to a u32, so it could wrap to 0.