From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org
Cc: 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: Tue, 16 Apr 2024 17:29:25 +0100 [thread overview]
Message-ID: <5db982a1-b126-41a9-9641-c46e97d2e1bc@amd.com> (raw)
In-Reply-To: <20240416152124.69590-6-stephen@networkplumber.org>
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]))
-
drivers/net/hinic/base/hinic_pmd_nicio.c:449: /
sizeof(hinic_hw_rx_buf_size[0]);
-
drivers/net/ice/ice_ethdev.c:330:#define ICE_NB_MBUF_XSTATS
(sizeof(ice_mbuf_strings) / sizeof(ice_mbuf_strings[0]))
-
drivers/net/i40e/i40e_ethdev.c:554:#define I40E_NB_MBUF_XSTATS
(sizeof(i40e_mbuf_strings) / sizeof(i40e_mbuf_strings[0]))
-
drivers/net/i40e/base/i40e_adminq.h:126: if (!((u32)aq_rc <
(sizeof(aq_to_posix) / sizeof((aq_to_posix)[0]))))
-
drivers/net/ipn3ke/ipn3ke_representor.c:506: /
sizeof(ipn3ke_rpst_hw_port_strings[0]))
drivers/net/ipn3ke/ipn3ke_representor.c:517: /
sizeof(ipn3ke_rpst_rxq_prio_strings[0]))
drivers/net/ipn3ke/ipn3ke_representor.c:530: /
sizeof(ipn3ke_rpst_txq_prio_strings[0]))
-
drivers/net/ixgbe/base/ixgbe_x550.c:443: for (i = 0; i <
sizeof(ixgbe_fw_map) / sizeof(ixgbe_fw_map[0]); ++i) {
drivers/net/ixgbe/base/ixgbe_x550.c:700: for (i = 0; i <
sizeof(ixgbe_fw_map) / sizeof(ixgbe_fw_map[0]); ++i) {
-
drivers/net/ixgbe/base/ixgbe_x550.c:3338: bufsz = sizeof(buf) /
sizeof(buf[0]);
-
drivers/net/mlx5/hws/mlx5dr_internal.h:52:#define ARRAY_SIZE(x)
(sizeof(x) / sizeof((x)[0]))
next prev parent reply other threads:[~2024-04-16 16:29 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 [this message]
2024-04-16 17:32 ` Stephen Hemminger
2024-04-17 8:00 ` Ferruh Yigit
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=5db982a1-b126-41a9-9641-c46e97d2e1bc@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 NNTP newsgroup(s).