DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Rao, Nikhil" <nikhil.rao@intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Reshma Pattan <reshma.pattan@intel.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Shreyansh Jain <shreyansh.jain@nxp.com>,
	Ashish Gupta <ashish.gupta@cavium.com>,
	Fiona Trahe <fiona.trahe@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	Declan Doherty <declan.doherty@intel.com>,
	Fan Zhang <roy.fan.zhang@intel.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	Chas Williams <chas3@att.com>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	John Daley <johndale@cisco.com>,
	Hyong Youb Kim <hyonkim@cisco.com>,
	Gaetan Rivet <gaetan.rivet@6wind.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Xiao Wang <xiao.w.wang@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Rasesh Mody <rasesh.mody@cavium.com>,
	Harish Patil <harish.patil@cavium.com>
Cc: dev@dpdk.org, "Rao, Nikhil" <nikhil.rao@intel.com>
Subject: Re: [dpdk-dev] [PATCH] fix static variables
Date: Fri, 5 Oct 2018 14:08:50 +0530	[thread overview]
Message-ID: <e68ea9fa-dbaa-8edd-0ce3-3570b35e403b@intel.com> (raw)
In-Reply-To: <20181004034047.26824-1-ferruh.yigit@intel.com>

On 10/4/2018 9:10 AM, Ferruh Yigit wrote:
> Make variables static as much as possible.
> 
> For the ones can't be done static, prefix the variable name with
> component name.
> 
> Also some cleanup and fix done related static usage while around.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>   app/pdump/main.c                              |  6 +--
>   drivers/bus/dpaa/base/fman/netcfg_layer.c     |  2 +-
>   drivers/bus/dpaa/dpaa_bus.c                   |  4 +-
>   drivers/bus/dpaa/include/fsl_fman_crc64.h     |  8 ++--
>   drivers/bus/vdev/vdev.c                       |  2 +-
>   drivers/compress/octeontx/include/zip_regs.h  |  4 +-
>   drivers/compress/octeontx/otx_zip.h           |  6 +--
>   drivers/compress/octeontx/otx_zip_pmd.c       |  2 +-
>   drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
>   drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
>   drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
>   .../scheduler/rte_cryptodev_scheduler.c       | 26 +++++-----
>   .../scheduler/rte_cryptodev_scheduler.h       |  8 ++--
>   drivers/crypto/scheduler/scheduler_failover.c |  6 +--
>   .../crypto/scheduler/scheduler_multicore.c    |  6 +--
>   .../scheduler/scheduler_pkt_size_distr.c      |  6 +--
>   drivers/crypto/scheduler/scheduler_pmd.c      |  8 ++--
>   drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
>   .../crypto/scheduler/scheduler_pmd_private.h  |  2 +-
>   .../crypto/scheduler/scheduler_roundrobin.c   |  6 +--
>   drivers/event/octeontx/ssovf_evdev.c          |  3 +-
>   drivers/mempool/dpaa/dpaa_mempool.c           |  2 +-
>   drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |  2 +-
>   drivers/net/bonding/rte_eth_bond_8023ad.c     | 48 +++++++++----------
>   .../net/bonding/rte_eth_bond_8023ad_private.h |  2 +-
>   drivers/net/bonding/rte_eth_bond_pmd.c        | 12 ++---
>   drivers/net/cxgbe/cxgbe_flow.c                |  2 +-
>   drivers/net/enic/enic_ethdev.c                |  1 -
>   drivers/net/failsafe/failsafe.c               |  4 +-
>   drivers/net/failsafe/failsafe_args.c          | 10 ++--
>   drivers/net/failsafe/failsafe_private.h       |  4 +-
>   drivers/net/fm10k/fm10k_ethdev.c              |  6 +--
>   drivers/net/i40e/base/i40e_diag.c             |  2 +-
>   drivers/net/i40e/base/i40e_diag.h             |  2 -
>   drivers/net/i40e/i40e_flow.c                  |  4 +-
>   drivers/net/i40e/i40e_vf_representor.c        |  2 +-
>   drivers/net/ifc/ifcvf_vdpa.c                  |  2 +-
>   drivers/net/ixgbe/ixgbe_vf_representor.c      |  2 +-
>   drivers/net/qede/base/bcm_osal.c              |  2 +-
>   drivers/net/qede/base/ecore_sriov.c           | 10 ++--
>   drivers/net/qede/base/ecore_vf.c              |  6 +--
>   drivers/net/qede/base/ecore_vfpf_if.h         |  2 +-
>   drivers/net/qede/qede_ethdev.c                |  4 +-
>   drivers/net/qede/qede_ethdev.h                |  2 +-
>   drivers/net/qede/qede_main.c                  | 13 ++---
>   drivers/net/sfc/sfc_rx.c                      |  2 +-
>   drivers/net/softnic/rte_eth_softnic.c         |  2 +-
>   drivers/net/tap/tap_bpf_insns.h               |  4 +-
>   drivers/net/tap/tap_flow.c                    |  2 +-
>   drivers/net/virtio/virtio_user/vhost.h        |  4 +-
>   drivers/net/virtio/virtio_user/vhost_kernel.c |  2 +-
>   drivers/net/virtio/virtio_user/vhost_user.c   |  2 +-
>   .../net/virtio/virtio_user/virtio_user_dev.c  |  6 +--
>   drivers/raw/dpaa2_qdma/dpaa2_qdma.c           |  4 +-
>   .../raw/ifpga_rawdev/base/ifpga_enumerate.c   |  8 ++--
>   .../raw/ifpga_rawdev/base/ifpga_feature_dev.h |  8 ++--
>   drivers/raw/ifpga_rawdev/base/ifpga_port.c    |  6 +--
>   .../raw/ifpga_rawdev/base/ifpga_port_error.c  |  2 +-
>   drivers/raw/skeleton_rawdev/skeleton_rawdev.c |  2 +-
>   lib/librte_compressdev/rte_compressdev.c      | 32 ++++++-------
>   lib/librte_compressdev/rte_compressdev_pmd.h  |  5 --
>   lib/librte_cryptodev/rte_cryptodev.c          | 34 +++++++------
>   lib/librte_cryptodev/rte_cryptodev_pmd.h      |  3 --
>   lib/librte_eal/common/eal_common_bus.c        |  2 +-
>   lib/librte_eal/common/eal_common_class.c      |  2 +-
>   lib/librte_eal/common/eal_common_devargs.c    |  2 +-
>   lib/librte_eal/linuxapp/eal/eal_memalloc.c    |  2 +-
>   lib/librte_ethdev/rte_class_eth.c             |  2 +-
>   lib/librte_ethdev/rte_ethdev.c                |  2 +-
>   .../rte_event_eth_rx_adapter.c                |  1 -
>   lib/librte_eventdev/rte_eventdev.c            | 10 ++--
>   lib/librte_eventdev/rte_eventdev_pmd.h        |  4 +-
>   lib/librte_net/net_crc_sse.h                  |  4 +-
>   lib/librte_rawdev/rte_rawdev.c                | 10 ++--
>   74 files changed, 203 insertions(+), 225 deletions(-)
>    
> diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> index 870ac8c3b..71d008cd1 100644
> --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> @@ -1125,7 +1125,6 @@ rxa_poll(struct rte_event_eth_rx_adapter *rx_adapter)
>   	wrr_pos = rx_adapter->wrr_pos;
>   	max_nb_rx = rx_adapter->max_nb_rx;
>   	buf = &rx_adapter->event_enqueue_buffer;
> -	stats = &rx_adapter->stats;
>   
>   	/* Iterate through a WRR sequence */
>   	for (num_queue = 0; num_queue < rx_adapter->wrr_len; num_queue++) {
</snip>
> diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
> index 792fb3a23..aa6e52c63 100644
> --- a/lib/librte_eventdev/rte_eventdev_pmd.h
> +++ b/lib/librte_eventdev/rte_eventdev_pmd.h
> @@ -467,7 +467,7 @@ typedef int (*eventdev_eth_rx_adapter_caps_get_t)
>   					const struct rte_eth_dev *eth_dev,
>   					uint32_t *caps);
>   
> -struct rte_event_eth_rx_adapter_queue_conf *queue_conf;
> +struct rte_event_eth_rx_adapter_queue_conf;
>   
>   /**
>    * Retrieve the event device's timer adapter capabilities, as well as the ops
> @@ -592,7 +592,7 @@ typedef int (*eventdev_eth_rx_adapter_stop_t)
>   					(const struct rte_eventdev *dev,
>   					const struct rte_eth_dev *eth_dev);
>   
> -struct rte_event_eth_rx_adapter_stats *stats;
> +struct rte_event_eth_rx_adapter_stats;
>   
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>

  reply	other threads:[~2018-10-05  8:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04  3:40 Ferruh Yigit
2018-10-05  8:38 ` Rao, Nikhil [this message]
2018-10-05 16:26 ` [dpdk-dev] [PATCH v2 1/4] add missing static keyword to globals Ferruh Yigit
2018-10-05 15:55   ` Andrew Rybchenko
2018-10-28 11:04     ` Thomas Monjalon
2018-10-05 16:26   ` [dpdk-dev] [PATCH v2 2/4] drivers: prefix global variables with module name Ferruh Yigit
2018-10-05 16:27     ` Maxime Coquelin
2018-10-08 12:18     ` Shreyansh Jain
2018-10-10  5:56     ` Zhang, Tianfei
2018-10-05 16:26   ` [dpdk-dev] [PATCH v2 3/4] fix global variable issues Ferruh Yigit
2018-10-07 12:21     ` Jerin Jacob
2018-10-05 16:26   ` [dpdk-dev] [PATCH v2 4/4] lib: reduce global variable usage Ferruh Yigit
2018-10-07 12:22     ` Jerin Jacob
2018-10-08  8:45     ` Shreyansh Jain
2018-10-08  9:11       ` Ferruh Yigit
2018-10-08  9:27         ` Shreyansh Jain
2018-10-07 12:18   ` [dpdk-dev] [PATCH v2 1/4] add missing static keyword to globals Jerin Jacob
2018-10-08  9:43   ` Shreyansh Jain
2018-10-28 23:57   ` [dpdk-dev] [PATCH v3 " Ferruh Yigit
2018-10-28 23:57     ` [dpdk-dev] [PATCH v3 2/4] drivers: prefix global variables with module name Ferruh Yigit
2018-10-28 23:57     ` [dpdk-dev] [PATCH v3 3/4] fix global variable issues Ferruh Yigit
2018-10-29  6:57       ` Hyong Youb Kim
2018-10-28 23:57     ` [dpdk-dev] [PATCH v3 4/4] lib: reduce global variable usage Ferruh Yigit
2018-10-29  1:35       ` Thomas Monjalon
2018-10-10  6:23 ` [dpdk-dev] [PATCH] fix static variables Zhang, Tianfei
2018-10-11  6:56 ` Xing, Beilei
2018-11-02 10:58 ` [dpdk-dev] " Tomasz Cel
2018-11-02 11:09 ` Cel, TomaszX

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=e68ea9fa-dbaa-8edd-0ce3-3570b35e403b@intel.com \
    --to=nikhil.rao@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=ashish.gupta@cavium.com \
    --cc=beilei.xing@intel.com \
    --cc=chas3@att.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=fiona.trahe@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=harish.patil@cavium.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hyonkim@cisco.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=johndale@cisco.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rasesh.mody@cavium.com \
    --cc=reshma.pattan@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@intel.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).