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 B2DF5A0C43; Wed, 20 Oct 2021 20:46:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65C6C40150; Wed, 20 Oct 2021 20:46:47 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 2488140150 for ; Wed, 20 Oct 2021 20:46:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634755605; 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=cQNX5Fi7ypHBRtjX6rmwUaOpXasf4MY3uoiwmqz2vQA=; b=ASjqEmfkUKbTmLZ/xz5DIo10EbER7WcH3B9W4qKEennR8FGiRNHkI3PjKOVpGBfupT5+Jd d+r+aZMgNZyAgAlTmL8rTR55ihgyfnCv4SHPoDSwcQN6lmOCa/Hv0kRZta3k2KN3UU/gwi NY+PiFsyVpvNgOA3hH9Yzd6q/ywogMk= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-GscJY4PaOxaLJ6MdW8U8mQ-1; Wed, 20 Oct 2021 14:46:44 -0400 X-MC-Unique: GscJY4PaOxaLJ6MdW8U8mQ-1 Received: by mail-lj1-f200.google.com with SMTP id v13-20020a2e2f0d000000b0021126b5cca2so2191406ljv.19 for ; Wed, 20 Oct 2021 11:46:44 -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=cQNX5Fi7ypHBRtjX6rmwUaOpXasf4MY3uoiwmqz2vQA=; b=Z6jr/4ldepeHeppUlAQXLY+jpYoUks+/PCCiVCsEUkVwtzj7sztA5rlLcI7po9AOic C7PIHnGqfR00fy6Fe7QH4ZGUrYoEoTOcl/uLBVpd3p51jQOEsU9/6cYW4YNYOxAxVlRZ sGRYCEfC1poXrQHEXnqdu0JqZn4cIgKEKWQe3cAG0U3mIvRVGPvo6GVY+9VJacjYovXb LrLPnzS88rd65/EINfPV3yXUd1HGKDDuCjA+oEtXFg/N8C0CgVtfPfagwYr6PfGf4RHd hF+TJJ1QShlxXIj/wzN3LFcARqTAtrSEmQrItW+54Uu4f30kPKUenHuTXeYsUQzQidHm OXqw== X-Gm-Message-State: AOAM530PVqT2Togfxtjzyv54KumEk+nJQ/AkRBBQo2nzVDTmwXD6dR/+ Ga1juRFnJRF7NqLREKIwk6NQIJQpDqGffIuLiLXUtR1zdnoecgY5Qksz4MKB8OxgBpHJCmlhA1/ dsMkvagIV7dLCe7vTcSQ= X-Received: by 2002:a2e:a54a:: with SMTP id e10mr757956ljn.159.1634755602841; Wed, 20 Oct 2021 11:46:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPpdg6Z5mribOtlmHfHj5ur6Q7HCqKWkcHn4WDwNN31YPBcvfjrG1aZ4M3q1KwIFClMNTPHPd1VyEHHCakaYg= X-Received: by 2002:a2e:a54a:: with SMTP id e10mr757941ljn.159.1634755602652; Wed, 20 Oct 2021 11:46:42 -0700 (PDT) MIME-Version: 1.0 References: <20211018134052.10514-1-konstantin.ananyev@intel.com> <20211018085847.2cb4ddc6@hermes.local> In-Reply-To: <20211018085847.2cb4ddc6@hermes.local> From: David Marchand Date: Wed, 20 Oct 2021 20:46:31 +0200 Message-ID: To: Konstantin Ananyev Cc: dev , dpdk stable , Stephen Hemminger , Aaron Conole 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" 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 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. -- David Marchand