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 F128AA0C43; Wed, 20 Oct 2021 22:51:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D42FF40150; Wed, 20 Oct 2021 22:51:31 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id 8EF3640150 for ; Wed, 20 Oct 2021 22:51:31 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id q187so192908pgq.2 for ; Wed, 20 Oct 2021 13:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aQ5uGvSTiBSWlQWMLQES1cIBMzaUp4Lf6fYSpTZ6888=; b=rKOwIZ3Q2vMe5gLufGIsWA3dQs9aUKU2zPheR+pHIJwIx26dp7SYG8cso0161R7hbm 3uLh/KpaUwUzjTRtopfsJztc58Kr8d2G5jKjYKOB5g/CvzvstwNTuDSFevtGBI7uSYPj VHUyZ7XuhR5CAPn1PS64G4BgK1reNFXRkgwYHaiEJE/X//znfbUxW4qSqYmhhmkWeUZr 2I6r3TUZSNgzUCOIw9RTYZ734sOvUjJ6k2BPj+ZshRMDUVREVe+SutFTb9P6aaYhclzF cWa8V/Ej3qoDVYpvkiKv+Oid9Ba16y5/RJVgxAIO4KNgh2LiT/lG2L8eGrjNlrLM0kGO 9nGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aQ5uGvSTiBSWlQWMLQES1cIBMzaUp4Lf6fYSpTZ6888=; b=m7eT1ETz1+HjgJei02GJo/n4ZNKk38jIk+JIzOoY9WYtHrDxwQzY8E0ppL+XqvnVok tJrBvDSXjEPgv8YeNDk4n4VVzFXnD48rmWw3G369yAuDIQuZq/GU2tblgrOfQC1JsNsX pe/vWYoRn+F0OD7uifqgqx9UJuWmDWlK66mgEDDECZdG4ROTeygKNl+41qIZF+/dOy08 iMc97d0jYwjnkNlXjuygO4oc6ERJUVkioH3injPUGFlpI9zPB1eODGoV3njxAy+yhUGd az/lT2sYMHmLzG04E+qQb2c2EMCuzcBju52Kcm2fKwvpPa6jZfYGJkXzNf9d5sUjiul1 gRqg== X-Gm-Message-State: AOAM533dl7gPHyVUHqQ3LhUCjoWI9HCV4mYkkrEQvigZvbcuQfRyfDLu XIl4c1dE5E2qfxl2F0S+uXbocg== X-Google-Smtp-Source: ABdhPJzKI1yZU8mGrVp9Z9v7A76hFEMka7ADKLBNbjZzvHoLcCRG4ekHXE7B0z29zthiQF+CrrctlA== X-Received: by 2002:a65:5082:: with SMTP id r2mr1168149pgp.353.1634763090503; Wed, 20 Oct 2021 13:51:30 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id x65sm3235704pjj.42.2021.10.20.13.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 13:51:30 -0700 (PDT) Date: Wed, 20 Oct 2021 13:51:27 -0700 From: Stephen Hemminger To: David Marchand Cc: Konstantin Ananyev , dev , dpdk stable , Aaron Conole Message-ID: <20211020135127.6aaf62e4@hermes.local> In-Reply-To: References: <20211018134052.10514-1-konstantin.ananyev@intel.com> <20211018085847.2cb4ddc6@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] test/bpf: fix auto-test with clang fails 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 Sender: "dev" On Wed, 20 Oct 2021 20:46:31 +0200 David Marchand wrote: > On Mon, Oct 18, 2021 at 5:59 PM Stephen Hemminger > wrote: > > Konstantin Ananyev wrote: > > > test_shift1_check() function fails with clang build. > > > The reason for that is that clang uses 64-bit shift instruction for > > > what expected to be 32-bit operation. > > > To be more specific, this C code: > > > r2 = (uint32_t)r2 >> r4; > > > With clang produces: > > > 41a4eb: 48 d3 ef shr %cl,%rdi > > > In that particular case it is an allowed choice, as from one side > > > left-operand value is known to fit into 32 bits, from other side > > > according to 'C' standard: > > > "...if the value of the right operand is negative or is greater than > > > or equal to the width of the promoted left operand, the behavior is > > > undefined." > > > The problem is that on x86 behavior for 64-bit and 32-bit shift > > > operation might differ. > > > The fix avoids undefined behavior by making sure > > > that right operand will not exceed width of the promoted left operand. > > > > > > Bugzilla ID: 811 > > > Fixes: 9f8f9d91a701 ("test/bpf: introduce functional test") > > > Cc: stable@dpdk.org > > > > > > Reported-by: Stephen Hemminger > > > Signed-off-by: Konstantin Ananyev > > Acked-by: Stephen Hemminger > > Applied, thanks. > > Probably worth adding bpf_autotest in the fast-tests list. > There are other missing tests in this list, for my todolist unless > someone wants to look at it. That is what found this... https://patchwork.dpdk.org/project/dpdk/patch/20211015201129.63220-11-stephen@networkplumber.org/