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 59F63A0C45 for ; Wed, 20 Oct 2021 20:46:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B188410F1; Wed, 20 Oct 2021 20:46:48 +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 46CF0410EA 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-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-33-t6m72gxhNeexAiacD2qBdg-1; Wed, 20 Oct 2021 14:46:44 -0400 X-MC-Unique: t6m72gxhNeexAiacD2qBdg-1 Received: by mail-lj1-f197.google.com with SMTP id j12-20020a2e800c000000b00210c475e1aaso2195519ljg.15 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=QqH/FQcHdhTLnIrD+x2/9YNQfVA3VW0ukUp/4Xw6qVh+1oO+mgB8vjR+Rd8uQvWpfh p3vSLCH8oj3pRv9RclYUAdHY7nZYMHVzuU0OSjjIQbWkpeuEugpix8ttTbcXotc1UaVJ 3IgHMTZc8H9WuMBospdZvKDJrtsqfjUf8avJ53JByN52CWLDvY1/J0YZuih+P5DpZXUw R+q5L8FxWdQ1PLftv5rzTLopEfJADAV3vLgp+lRB2wVmRyKnCjpnz+5F2kKpWik7JzQ/ Dfvvr0GxM01rCk/zetegdcuVFmpBgN2LgO48f5qMTNLEr7Zm8f4JqqSA3msKZ3gsiH9j 8oBg== X-Gm-Message-State: AOAM530hpgNediLRBxP7fMg7xxXTYni3JgMFDwzpkqqx9IPwP2C2sCb1 0ohHA/2RbxXjXbkANd5fSly3d3BL4d5yEG3hqDex5PeW4vbaano318dmwLx6/5Vr6/OTq3fWWLF CQNpswAKjzk77Qo952r79YAQ= X-Received: by 2002:a2e:a54a:: with SMTP id e10mr757965ljn.159.1634755602985; 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-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 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