DPDK-dev Archive mirror
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Shepard Siegel <shepard.siegel@atomicrules.com>,
	Ed Czeck <ed.czeck@atomicrules.com>,
	John Miller <john.miller@atomicrules.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Rosen Xu <rosen.xu@intel.com>,
	Jiawen Wu <jiawenwu@trustnetic.com>,
	Harman Kalra <hkalra@marvell.com>,
	Jian Wang <jianwang@trustnetic.com>
Subject: Re: [PATCH 5/5] drivers/net: use RTE_DIM
Date: Wed, 17 Apr 2024 09:00:31 +0100	[thread overview]
Message-ID: <75154cd0-29c1-402c-a51a-d7e72b4c4fda@amd.com> (raw)
In-Reply-To: <20240416103234.1b59ff6a@hermes.local>

On 4/16/2024 6:32 PM, Stephen Hemminger wrote:
> On Tue, 16 Apr 2024 17:29:25 +0100
> Ferruh Yigit <ferruh.yigit@amd.com> 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 <stephen@networkplumber.org>
>>>   
>>
>> 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.
> 

ack
Although it can be updated as following, I don't think it differs
`#define ARRAY_SIZE(_array) RTE_DIM(_array)`

> Since base/ directories often come from other upstream repos, I ignored those.
> 

ack

> Something about the Intel drivers was causing warnings and the script would
> not automatically change those.
> 

ICE_NB_MBUF_XSTATS, I40E_NB_MBUF_XSTATS & ipn3ke_representor.c ones
seems can be updated, manually maybe?


      reply	other threads:[~2024-04-17  8:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 15:19 [PATCH 0/5] use RTE_DIM where possible Stephen Hemminger
2024-04-16 15:19 ` [PATCH 1/5] cocci: add script to use RTE_DIM Stephen Hemminger
2024-04-16 15:19 ` [PATCH 2/5] app: " Stephen Hemminger
2024-04-16 15:30   ` Tyler Retzlaff
2024-04-17  6:13   ` [EXTERNAL] " Akhil Goyal
2024-04-16 15:19 ` [PATCH 3/5] lib: " Stephen Hemminger
2024-04-16 15:32   ` Tyler Retzlaff
2024-04-16 15:19 ` [PATCH 4/5] examples _use RTE_DIM Stephen Hemminger
2024-04-16 15:32   ` Tyler Retzlaff
2024-04-16 15:19 ` [PATCH 5/5] drivers/net: use RTE_DIM Stephen Hemminger
2024-04-16 16:29   ` Ferruh Yigit
2024-04-16 17:32     ` Stephen Hemminger
2024-04-17  8:00       ` Ferruh Yigit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75154cd0-29c1-402c-a51a-d7e72b4c4fda@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ed.czeck@atomicrules.com \
    --cc=hkalra@marvell.com \
    --cc=jianwang@trustnetic.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.miller@atomicrules.com \
    --cc=rosen.xu@intel.com \
    --cc=shepard.siegel@atomicrules.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).