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 EE6BFA0C45 for ; Wed, 20 Oct 2021 22:51:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E25894112E; Wed, 20 Oct 2021 22:51:32 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 8CF6640142 for ; Wed, 20 Oct 2021 22:51:31 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id e65so21187188pgc.5 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=m4ZEL3H/y60BGGjbWUOKCmmdoA063ZnL0qPnr/w188celMste/TyFwYeoVzICFjRf5 ZXNxyGumI9UKXcFT5uWDgEVtlNMc4/yfbaRa0diaqmSWzvhtBsfsEdOGHfTKCWBzraAe KTXO2jYNd8lX+JRQ+Vk9VDlpdFOTn+i2DPy33J/+jRVjbLgIlnZCtELX77qtO+9k2ZpI Yw29cs/sFd2C5/5QoD3kMOa/+Q0TSResu+eLJa23473X7qJegirYF0FWXrh4hVIL3Udz zHEWEkKGeh7GL9Dt3Ot8FZFr/JU2JvDuVTEz0Q+5UNBEJTZW6/3/1W1FcvmfaCjpM2Yy 7oQQ== X-Gm-Message-State: AOAM530RyzqIXqea/NGiickjnm3e6WNTO5GjRXtA5yOCkizmNTs9hnMG 9U6oUpgnqWP+AEuCQovmvF9GlA== 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-stable] [PATCH] test/bpf: fix auto-test with clang fails 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 Sender: "stable" 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/