DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>
To: "pbhagavatula@marvell.com" <pbhagavatula@marvell.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	Igor Russkikh <igor.russkikh@aquantia.com>,
	"Pavel Belous" <pavel.belous@aquantia.com>,
	Ravi Kumar <ravi1.kumar@amd.com>, Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	Marcin Wojtas <mw@semihalf.com>,
	Michal Krawczyk <mk@semihalf.com>,
	Guy Tzalik <gtzalik@amazon.com>,
	Evgeny Schemeilin <evgenys@amazon.com>,
	Igor Chauskin <igorch@amazon.com>,
	"John Daley (johndale)" <johndale@cisco.com>,
	"Wei Hu (Xavier)" <xavier.huwei@huawei.com>,
	"Min Hu (Connor)" <humin29@huawei.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Alejandro Lucero <alejandro.lucero@netronome.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Maciej Czekaj <mczekaj@marvell.com>,
	Rosen Xu <rosen.xu@intel.com>,
	Tianfei zhang <tianfei.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/3] drivers: use RTE_DIM instead of ARRAY_SIZE
Date: Fri, 11 Oct 2019 09:00:56 +0000	[thread overview]
Message-ID: <DM6PR11MB274559101E8BCB866A462A8BBF970@DM6PR11MB2745.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20191011040709.8344-2-pbhagavatula@marvell.com>

> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Friday, October 11, 2019 1:07 PM
[...]
> Subject: [dpdk-dev] [PATCH 2/3] drivers: use RTE_DIM instead of
> ARRAY_SIZE
> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Use RTE_DIM instead of re-defining ARRAY_SIZE.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
[...]
>  drivers/net/enic/base/vnic_dev.c              |  4 +--
>  drivers/net/enic/base/vnic_devcmd.h           |  2 --
[...]
> diff --git a/drivers/net/enic/base/vnic_dev.c
> b/drivers/net/enic/base/vnic_dev.c
> index 8e190687d..3b9a336ff 100644
> --- a/drivers/net/enic/base/vnic_dev.c
> +++ b/drivers/net/enic/base/vnic_dev.c
> @@ -417,11 +417,11 @@ int vnic_dev_cmd(struct vnic_dev *vdev, enum
> vnic_devcmd_cmd cmd,
>  	switch (vdev->proxy) {
>  	case PROXY_BY_INDEX:
>  		err =  vnic_dev_cmd_proxy(vdev, CMD_PROXY_BY_INDEX,
> cmd,
> -				args, ARRAY_SIZE(args), wait);
> +				args, RTE_DIM(args), wait);
>  		break;
>  	case PROXY_BY_BDF:
>  		err =  vnic_dev_cmd_proxy(vdev, CMD_PROXY_BY_BDF,
> cmd,
> -				args, ARRAY_SIZE(args), wait);
> +				args, RTE_DIM(args), wait);
>  		break;
>  	case PROXY_NONE:
>  	default:
> diff --git a/drivers/net/enic/base/vnic_devcmd.h
> b/drivers/net/enic/base/vnic_devcmd.h
> index fffe307e0..5a4f48106 100644
> --- a/drivers/net/enic/base/vnic_devcmd.h
> +++ b/drivers/net/enic/base/vnic_devcmd.h
> @@ -63,8 +63,6 @@
>  #define _CMD_VTYPE(cmd)          (((cmd) >> _CMD_VTYPESHIFT) &
> _CMD_VTYPEMASK)
>  #define _CMD_N(cmd)              (((cmd) >> _CMD_NSHIFT) & _CMD_NMASK)
> 
> -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
> -
>  enum vnic_devcmd_cmd {
>  	CMD_NONE                = _CMDC(_CMD_DIR_NONE,
> _CMD_VTYPE_NONE, 0),
> 
[...]

For enic.

Acked-by: Hyong Youb Kim <hyonkim@cisco.com>

Thanks.
-Hyong


  parent reply	other threads:[~2019-10-11  9:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11  4:07 [dpdk-dev] [PATCH 1/3] app/test: " pbhagavatula
2019-10-11  4:07 ` [dpdk-dev] [PATCH 2/3] drivers: " pbhagavatula
2019-10-11  4:37   ` Hemant Agrawal
2019-10-11  9:32     ` Ananyev, Konstantin
2019-10-11 13:48       ` Ferruh Yigit
2019-10-11  6:14   ` Andrew Rybchenko
2019-10-11  9:03     ` Igor Russkikh
2019-10-11  9:00   ` Hyong Youb Kim (hyonkim) [this message]
2019-10-11  4:07 ` [dpdk-dev] [PATCH 3/3] bitrate: " pbhagavatula
2019-10-11 14:20 ` [dpdk-dev] [PATCH 1/3] app/test: " Eads, Gage
2019-10-17 12:09 ` [dpdk-dev] [PATCH v2 1/2] " pbhagavatula
2019-10-17 12:10   ` [dpdk-dev] [PATCH v2 2/2] bitrate: " pbhagavatula
2019-10-27 13:36     ` David Marchand
2019-10-27 13:35   ` [dpdk-dev] [PATCH v2 1/2] app/test: " David Marchand
2019-10-14  6:58 [dpdk-dev] [PATCH 2/3] drivers: " Pavan Nikhilesh Bhagavatula

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=DM6PR11MB274559101E8BCB866A462A8BBF970@DM6PR11MB2745.namprd11.prod.outlook.com \
    --to=hyonkim@cisco.com \
    --cc=akhil.goyal@nxp.com \
    --cc=alejandro.lucero@netronome.com \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=gtzalik@amazon.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=humin29@huawei.com \
    --cc=igor.russkikh@aquantia.com \
    --cc=igorch@amazon.com \
    --cc=jerinj@marvell.com \
    --cc=jingjing.wu@intel.com \
    --cc=johndale@cisco.com \
    --cc=mczekaj@marvell.com \
    --cc=mk@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=pavel.belous@aquantia.com \
    --cc=pbhagavatula@marvell.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=ravi1.kumar@amd.com \
    --cc=rmody@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=shshaikh@marvell.com \
    --cc=tianfei.zhang@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xavier.huwei@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /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).