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 2273B430F0; Thu, 24 Aug 2023 14:25:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9D6C40EE1; Thu, 24 Aug 2023 14:25:57 +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 2058D40150 for ; Thu, 24 Aug 2023 14:25:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692879956; 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=EhTDsNxPugySdscyVN/13H+merTK/f3x7vA3+3M3xIk=; b=eUCbElch6Cm5mVxFjox3jKttB8Gkp3uAd7jZrl5uKZ7PGHfHkLSjU/l/OjCe4si1Lcl/UH RNX3EL3wwDmeOCOdHHSobY184MQ2RuQqAnvftmjj7JjjlpM0qI9EGe5JWzSKwnGzx+O0KG FIEqksQ/hXh8joOeO9cUmCQAK5KMEPM= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-XxO2bVO3O7yZawKiQCZmFQ-1; Thu, 24 Aug 2023 08:25:55 -0400 X-MC-Unique: XxO2bVO3O7yZawKiQCZmFQ-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-4ffa28f3911so7854496e87.2 for ; Thu, 24 Aug 2023 05:25:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692879954; x=1693484754; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EhTDsNxPugySdscyVN/13H+merTK/f3x7vA3+3M3xIk=; b=Y+VTd9wfru3buAZ3ehcZdpxrFpy6ULtTnaJwGunSRCXnar+m8cATCuULatafamZPMx QiOXmDUAlNnTCdSHHqPixnJ9JQb2Ms3Rz7Khe7ndTs0ckA/ArEtYp2umOgugk5chdscQ bLu+3gemTdwS8EfiKh2EU9Kca/6eqeiyQ7eo+gTyn2L7lTObyy+7mN3rp7mkwSBvyyvw O/te6O26O2T+soURf3H1KQhSk7y9IRb3FosORCSCQuz12ECros6/y4UqqGlrKAEvv+Of jHXou6EL8Z/k95+pGp/ZaomJGkeg7ICn4VLNTyO9dZFu/ruIPYPqIbRs0kEp8arCrvG9 ep2Q== X-Gm-Message-State: AOJu0YzLMFqv8taoWdWK85IKTlLbjZIa2YdYCrRDNlg4bdfBbpftd5vz MTk/ivXA5PnXJT4o8Rw9qrjBU4oE/XtNpAjg0KyUy7O/gUJ0SQlL+II6kulCINm0CO5X1N/oSoZ A5YXk0LD9Px/90piok6s= X-Received: by 2002:a05:6512:ba6:b0:500:a378:db71 with SMTP id b38-20020a0565120ba600b00500a378db71mr444547lfv.57.1692879953873; Thu, 24 Aug 2023 05:25:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG7Wck8Dmk0Nkm7phWynYHDQCgNVt7QLnLemQiv6CmYhtgjFVLY9jhXjk57icct5wFnNCGANE6dGnCNZ1xsFRo= X-Received: by 2002:a05:6512:ba6:b0:500:a378:db71 with SMTP id b38-20020a0565120ba600b00500a378db71mr444522lfv.57.1692879953568; Thu, 24 Aug 2023 05:25:53 -0700 (PDT) MIME-Version: 1.0 References: <1680558751-17931-1-git-send-email-roretzla@linux.microsoft.com> <1691781658-32520-1-git-send-email-roretzla@linux.microsoft.com> <1691781658-32520-7-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: From: David Marchand Date: Thu, 24 Aug 2023 14:25:35 +0200 Message-ID: Subject: Re: [PATCH v11 06/16] eal: use prefetch intrinsics To: Tyler Retzlaff , Maxime Coquelin Cc: dev@dpdk.org, Bruce Richardson , Konstantin Ananyev , Ciara Power , thomas@monjalon.net, mb@smartsharesystems.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Thu, Aug 24, 2023 at 2:06=E2=80=AFPM David Marchand wrote: > I had a look at the vhost library and I think the compiler thinks size ma= y be 0. > Changing the loop on size with a do { } while (size > 0); resolves the wa= rning. > I can post a change for this, as we hit a similar issue in the past > and the code does not make sense comparing size on the first iteration > of this loop. This sounds like a commit 4226aa9caca9 ("vhost: fix build with GCC 12") we had on LoongArch. And the 32bits build warning goes away with this: diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index d7624d18c8..41328b7530 100644 --- a/lib/vhost/virtio_net.c +++ b/lib/vhost/virtio_net.c @@ -1906,7 +1906,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev, uint16_t buf_id =3D 0; uint32_t len =3D 0; uint16_t desc_count =3D 0; - uint64_t size =3D pkt->pkt_len + sizeof(struct virtio_net_hdr_mrg_r= xbuf); + uint64_t size =3D (uint64_t)pkt->pkt_len + sizeof(struct virtio_net_hdr_mrg_rxbuf); uint32_t buffer_len[vq->size]; uint16_t buffer_buf_id[vq->size]; uint16_t buffer_desc_count[vq->size]; > > However, I am a bit puzzled why the prefetch change makes the compiler > consider this loop differently. > We have the same constructs everywhere in this library and x86_64 > builds are fine... --=20 David Marchand