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 4E22D43E86; Tue, 16 Apr 2024 19:32:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1660F40268; Tue, 16 Apr 2024 19:32:40 +0200 (CEST) Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by mails.dpdk.org (Postfix) with ESMTP id BD9D440262 for ; Tue, 16 Apr 2024 19:32:38 +0200 (CEST) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-22f746c56a2so2344827fac.0 for ; Tue, 16 Apr 2024 10:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713288758; x=1713893558; 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=lvhaWcMwJjm49+RQzQSiH13KEKuRwfPj3Ac8JdO+ux4=; b=ohmvnWggVnPM7fUcGGndNEQGqop1diISiGj4k2z7GySHtrkebcVx2UA+w1jwAYlfE0 CiHEnQwyrkC5O6lSyHpqfwGtN/xK6oaV/r9gC/n/ii5JH+ACbpvMJ0NlCC266kBdYleV Wb1PeDqUVcho7nHMQOgXMu5I0iddgVxJNG1g9udtl+btms00ZJNeeW6kjsQzhACdvBvX pJXSguq+I0rgxvfNrc6P6usbMWwn9sHPwtgNARIqKs+RAKCb+1p+5vAQ0K5r+6/HWrYx papveQhq+vNyzXDfsUcdyRBOkVNNcEB7vSYOHYLmOkq4xJUFPJB1KFz11/QKqRgnV4+g 3IBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713288758; x=1713893558; 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=lvhaWcMwJjm49+RQzQSiH13KEKuRwfPj3Ac8JdO+ux4=; b=gsRKoZ5vvGuNJkABVFhaWa38Dy9eAF1uJ0Pjt2L1rnKbKUMMTkfJxpWEI/30EF/HVU m9DvNYsXUba7o6IauamOhx+/GDxVL+nRclXRXgoNNVwuO7+c0yPJUEKbhU7c56sE1gtG Bgj7B+9IMHj7CEyAp6HmSVcBFi+W9Y99EWAW1AVnstIZjdTrXuLnxjVJo3z1mvZ41TWw 2tWawUwne8zEoXs9ZXdrNpfYmQeTizJQMYwubZPDPc31cTNHS/wO8GfvVtAyqbqEZEqX EF0oGDRyuTrfzmYtY0/qCs3AQcA5sz7rDv4k3fG54ysD/ol4NbA7QvQJAvV4QQUcnj6o xsjg== X-Gm-Message-State: AOJu0YxFO1CTlU5nstKBpwwNOJEeRs3Kje6DU5WEo2s1fscNmtqPgPSZ CwubQAzvfFnoRiRRFQlU5wI7FHb6RL9BrlVNxTA/2VxxdeV2nFaXmSnqXO5uYEE= X-Google-Smtp-Source: AGHT+IEpU3ahZUfv6ASrCjYkgmMtpC0gIveL0g7U6WFNK1IgO5ufS7DlBm6HrPITak3yyuNZnHsrSw== X-Received: by 2002:a05:6871:b410:b0:235:453b:be89 with SMTP id br16-20020a056871b41000b00235453bbe89mr864918oac.44.1713288757906; Tue, 16 Apr 2024 10:32:37 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id e10-20020a63aa0a000000b005dc5129ba9dsm8961709pgf.72.2024.04.16.10.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 10:32:37 -0700 (PDT) Date: Tue, 16 Apr 2024 10:32:34 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: dev@dpdk.org, Shepard Siegel , Ed Czeck , John Miller , Ajit Khaparde , Somnath Kotur , Jingjing Wu , Rosen Xu , Jiawen Wu , Harman Kalra , Jian Wang Subject: Re: [PATCH 5/5] drivers/net: use RTE_DIM Message-ID: <20240416103234.1b59ff6a@hermes.local> In-Reply-To: <5db982a1-b126-41a9-9641-c46e97d2e1bc@amd.com> References: <20240416152124.69590-1-stephen@networkplumber.org> <20240416152124.69590-6-stephen@networkplumber.org> <5db982a1-b126-41a9-9641-c46e97d2e1bc@amd.com> 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 Tue, 16 Apr 2024 17:29:25 +0100 Ferruh Yigit wrote: > On 4/16/2024 4:19 PM, Stephen Hemminger wrote: > > Use RTE_DIM instead of computing directly with sizeof. > > Patch automatically generated via cocci/rte_dim.cocci. > > Code in base/ subdirectory manually excluded. > > > > Signed-off-by: Stephen Hemminger > > > > Updated ones looks good to me, but I can see a few more, I don't know if > you excluded base file one intentionally, > searched as `git grep "sizeof.*\[0\]" drivers/net/` > > > - > drivers/net/bnxt/tf_core/cfa_tcam_mgr.h:28:#define ARRAY_SIZE(_array) > (sizeof(_array) / sizeof(_array[0])) > > - For the drivers that choose to define and use ARRAY_SIZE() that is fine. Since base/ directories often come from other upstream repos, I ignored those. Something about the Intel drivers was causing warnings and the script would not automatically change those.