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 9152443AAF; Wed, 7 Feb 2024 23:36:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75C0E402A9; Wed, 7 Feb 2024 23:36:55 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 53E134027D for ; Wed, 7 Feb 2024 23:36:54 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6e054f674b3so887775b3a.1 for ; Wed, 07 Feb 2024 14:36:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1707345413; x=1707950213; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=4/tLCnSoq6gcs1+0wt0MY5Bwz+j/huGQ53VNMrTxFTs=; b=JNJPDnwk+Tuk3sn4BC8Bwk8hRpj6NjXNpZWChYeisG7bKT8AMWmX7fsugqUL6AkUu1 JvoMX7Txj2gj0Qo/AvzKjUaIFTZw1Zy2ZwlVJAwIQ/p5+wRY//D1DwPcBbsUXw3ZFBM2 twbazv9rQnSxLpHeGKx0NKZdkAio8vl1zjm8uManp4czCq1tvTZVGCjyvbGxk96uxMUn D8N4x4pVKMB279JXZDky0S75AC0Mq171BWNb2Rqz+8IibtE508CjJxoMVeRjoJrtVMm6 1jkX60zgVbJt2J4UqB25cxVDs0Ule4VF/aeHpeXGQQVIvqJC6gez5h6LHyaPGdcVCOtH Qe/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707345413; x=1707950213; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4/tLCnSoq6gcs1+0wt0MY5Bwz+j/huGQ53VNMrTxFTs=; b=TNNqnW61WXCrzhUNYIQRuxFCkq1HwnJU156cSvCTicWFLy9oxBnLdnBSuT8Ae9/lBR Z/HYwESUHZmapbL6FqGt2YO5/udDj7M8EIgG31a1f0irxU9Dq7rR44qYna9KgbDU2pqO hU6adNUc8E+8o8QYLV0Lk8PzaL+y3uJFX2aHE+8KFxZDLZp0Kh8uPlYer7Rkmmv7FSW8 /R8HVpjG+Gp/zCTll3zoKWV3/8H4oC+F4qXAR17CFQ1dA+jJFn7opk/nfoAJWJk1DKbj 3RD37zhEQmtgfRnWIu2+Sgogi2QItttYOseb3LN8aW/U4ByPQu/oPva7GrRYRcwjnPgz FvTA== X-Gm-Message-State: AOJu0YwTjniNMQmWD9xm/iNrITSjlx+uXUefkSy7617wCipPVk9lpA6h wVvUm6DPVtQfqDPfYQOfReYZUhpv/WWucIyUrfv5V/5/HuvBYl5wVaOD1Zg+eAU= X-Google-Smtp-Source: AGHT+IEteuEU+EpzPrH0Vqz2gO+f6wcsKaEgq9TddarMgeNQPJQQezMiK4UJgiNuStQVNMrdRlLHnQ== X-Received: by 2002:a05:6a00:80de:b0:6e0:6dbb:38f6 with SMTP id ei30-20020a056a0080de00b006e06dbb38f6mr1999525pfb.13.1707345413480; Wed, 07 Feb 2024 14:36:53 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUOCCUU/bQT3lTaDkRoKkPJH1IBA6QjmlfVq+oTZ/DC7Cfm4sxZYEaBhqYx4W2KGA8qP1aXU3IUcYJUCtioe5h837lVNS4NTLM= Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id r5-20020a632b05000000b005d8e280c879sm2193212pgr.84.2024.02.07.14.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 14:36:53 -0800 (PST) Date: Wed, 7 Feb 2024 14:36:51 -0800 From: Stephen Hemminger To: Ferruh Yigit Cc: dev@dpdk.org, Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [PATCH v2] common/sfc: replace out of bounds condition with static_assert Message-ID: <20240207143651.6b6f1b3b@hermes.local> In-Reply-To: References: <20240118201843.189978-1-stephen@networkplumber.org> <20240119221401.68182-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 7 Feb 2024 19:10:37 +0000 Ferruh Yigit wrote: > ../drivers/common/sfc_efx/base/ef10_filter.c:1246:18: error: shift count > >= width of type [-Werror,-Wshift-count-overflow] > matches_count = MCDI_OUT_DWORD(req, > ^~~~~~~~~~~~~~~~~~~ > ../drivers/common/sfc_efx/base/efx_mcdi.h:493:2: note: expanded from > macro 'MCDI_OUT_DWORD' > EFX_DWORD_FIELD(*MCDI_OUT2(_emr, efx_dword_t, _ofst), \ > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../drivers/common/sfc_efx/base/efx_types.h:533:30: note: expanded from > macro 'EFX_DWORD_FIELD' > EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) > ^~~~~~~~~~~~~~~~~~ > ../drivers/common/sfc_efx/base/efx_types.h:145:23: note: expanded from > macro 'EFX_MASK32' > (((((uint32_t)1) << EFX_WIDTH(_field))) - 1)) None of this got changed by the patch. Looks like it would not compile even without the patch on your version of clang.