Please ignore the previous message. It was sent by mistake! Sorry for inconvenience.
Best regards, Tomasz Cel > -----Original Message----- > From: Cel, TomaszX > Sent: Friday, November 2, 2018 11:59 AM > To: Cel, TomaszX <tomaszx....@intel.com>; Pattan, Reshma > <reshma.pat...@intel.com>; Hemant Agrawal > <hemant.agra...@nxp.com>; Shreyansh Jain <shreyansh.j...@nxp.com>; > Ashish Gupta <ashish.gu...@cavium.com>; Trahe, Fiona > <fiona.tr...@intel.com>; De Lara Guarch, Pablo > <pablo.de.lara.gua...@intel.com>; Akhil Goyal <akhil.go...@nxp.com>; > Doherty, Declan <declan.dohe...@intel.com>; Zhang, Roy Fan > <roy.fan.zh...@intel.com>; Jerin Jacob > <jerin.ja...@caviumnetworks.com>; Chas Williams <ch...@att.com>; Rahul > Lakkireddy <rahul.lakkire...@chelsio.com>; John Daley > <johnd...@cisco.com>; Hyong Youb Kim <hyon...@cisco.com>; Gaetan > Rivet <gaetan.ri...@6wind.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; > Wang, Xiao W <xiao.w.w...@intel.com>; Xing, Beilei > <beilei.x...@intel.com>; Lu, Wenzhuo <wenzhuo...@intel.com>; Ananyev, > Konstantin <konstantin.anan...@intel.com>; Rasesh Mody > <rasesh.m...@cavium.com>; Harish Patil <harish.pa...@cavium.com>; > Shahed Shaikh <shahed.sha...@cavium.com>; Andrew Rybchenko > <arybche...@solarflare.com>; Singh, Jasvinder > <jasvinder.si...@intel.com>; Dumitrescu, Cristian > <cristian.dumitre...@intel.com>; Wiles, Keith <keith.wi...@intel.com>; > Maxime Coquelin <maxime.coque...@redhat.com>; Bie, Tiwei > <tiwei....@intel.com>; Wang, Zhihong <zhihong.w...@intel.com>; Nipun > Gupta <nipun.gu...@nxp.com>; Xu, Rosen <rosen...@intel.com>; Zhang, > Tianfei <tianfei.zh...@intel.com>; Burakov, Anatoly > <anatoly.bura...@intel.com>; Thomas Monjalon <tho...@monjalon.net>; > Rao, Nikhil <nikhil....@intel.com>; Olivier Matz <olivier.m...@6wind.com> > Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yi...@intel.com> > Subject: fix static variables > > From: Ferruh Yigit <ferruh.yi...@intel.com> > > 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.yi...@intel.com> > Reviewed-by: Nikhil Rao <nikhil....@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/app/pdump/main.c b/app/pdump/main.c > index ac2287124..d96556ecf 100644 > --- a/app/pdump/main.c > +++ b/app/pdump/main.c > @@ -81,7 +81,7 @@ enum pdump_by { > DEVICE_ID = 2 > }; > > -const char *valid_pdump_arguments[] = { > +static const char * const valid_pdump_arguments[] = { > PDUMP_PORT_ARG, > PDUMP_PCI_ARG, > PDUMP_QUEUE_ARG, > @@ -136,9 +136,9 @@ struct parse_val { > uint64_t val; > }; > > -int num_tuples; > +static int num_tuples; > static struct rte_eth_conf port_conf_default; > -volatile uint8_t quit_signal; > +static volatile uint8_t quit_signal; > > /**< display usage */ > static void > diff --git a/drivers/bus/dpaa/base/fman/netcfg_layer.c > b/drivers/bus/dpaa/base/fman/netcfg_layer.c > index 031c6f1aa..6b5224203 100644 > --- a/drivers/bus/dpaa/base/fman/netcfg_layer.c > +++ b/drivers/bus/dpaa/base/fman/netcfg_layer.c > @@ -21,7 +21,7 @@ > /* This data structure contaings all configurations information > * related to usages of DPA devices. > */ > -struct netcfg_info *netcfg; > +static struct netcfg_info *netcfg; > /* fd to open a socket for making ioctl request to disable/enable shared > * interfaces. > */ > diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c > index 49cd04dbb..2042e9dd5 100644 > --- a/drivers/bus/dpaa/dpaa_bus.c > +++ b/drivers/bus/dpaa/dpaa_bus.c > @@ -46,7 +46,7 @@ int dpaa_logtype_mempool; > int dpaa_logtype_pmd; > int dpaa_logtype_eventdev; > > -struct rte_dpaa_bus rte_dpaa_bus; > +static struct rte_dpaa_bus rte_dpaa_bus; > struct netcfg_info *dpaa_netcfg; > > /* define a variable to hold the portal_key, once created.*/ > @@ -615,7 +615,7 @@ rte_dpaa_get_iommu_class(void) > return RTE_IOVA_PA; > } > > -struct rte_dpaa_bus rte_dpaa_bus = { > +static struct rte_dpaa_bus rte_dpaa_bus = { > .bus = { > .scan = rte_dpaa_bus_scan, > .probe = rte_dpaa_bus_probe, > diff --git a/drivers/bus/dpaa/include/fsl_fman_crc64.h > b/drivers/bus/dpaa/include/fsl_fman_crc64.h > index bf162f3ac..08ad63042 100644 > --- a/drivers/bus/dpaa/include/fsl_fman_crc64.h > +++ b/drivers/bus/dpaa/include/fsl_fman_crc64.h > @@ -42,9 +42,9 @@ struct fman_crc64_t { > uint64_t initial; > uint64_t table[1 << 8]; > }; > -extern struct fman_crc64_t FMAN_CRC64_ECMA_182; > +extern struct fman_crc64_t fman_crc64_ecma_182; > #define DECLARE_FMAN_CRC64_TABLE() \ > -struct fman_crc64_t FMAN_CRC64_ECMA_182 = { \ > +struct fman_crc64_t fman_crc64_ecma_182 = { \ > 0xFFFFFFFFFFFFFFFFULL, \ > { \ > 0x0000000000000000ULL, 0xb32e4cbe03a75f6fULL, \ > @@ -183,7 +183,7 @@ struct fman_crc64_t FMAN_CRC64_ECMA_182 = { \ > */ > static inline uint64_t fman_crc64_init(void) > { > - return FMAN_CRC64_ECMA_182.initial; > + return fman_crc64_ecma_182.initial; > } > > /* Updates the CRC with arbitrary data */ > @@ -192,7 +192,7 @@ static inline uint64_t fman_crc64_update(uint64_t crc, > { > uint8_t *p = data; > while (len--) > - crc = FMAN_CRC64_ECMA_182.table[(crc ^ *(p++)) & 0xff] ^ > + crc = fman_crc64_ecma_182.table[(crc ^ *(p++)) & 0xff] ^ > (crc >> 8); > return crc; > } > diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c > index ef3ad6d99..05de42fef 100644 > --- a/drivers/bus/vdev/vdev.c > +++ b/drivers/bus/vdev/vdev.c > @@ -41,7 +41,7 @@ static struct vdev_device_list vdev_device_list = > static rte_spinlock_recursive_t vdev_device_list_lock = > RTE_SPINLOCK_RECURSIVE_INITIALIZER; > > -struct vdev_driver_list vdev_driver_list = > +static struct vdev_driver_list vdev_driver_list = > TAILQ_HEAD_INITIALIZER(vdev_driver_list); > > struct vdev_custom_scan { > diff --git a/drivers/compress/octeontx/include/zip_regs.h > b/drivers/compress/octeontx/include/zip_regs.h > index 1e74db433..04c3d75e9 100644 > --- a/drivers/compress/octeontx/include/zip_regs.h > +++ b/drivers/compress/octeontx/include/zip_regs.h > @@ -12,12 +12,12 @@ > * ZIP compression coding Enumeration > * Enumerates ZIP_INST_S[CC]. > */ > -enum { > +enum zip_cc { > ZIP_CC_DEFAULT = 0, > ZIP_CC_DYN_HUFF, > ZIP_CC_FIXED_HUFF, > ZIP_CC_LZS > -} zip_cc; > +}; > > /** > * Register (NCB) zip_vq#_ena > diff --git a/drivers/compress/octeontx/otx_zip.h > b/drivers/compress/octeontx/otx_zip.h > index 99a38d005..3abefd1dc 100644 > --- a/drivers/compress/octeontx/otx_zip.h > +++ b/drivers/compress/octeontx/otx_zip.h > @@ -79,7 +79,7 @@ int octtx_zip_logtype_driver; > ZIP_PMD_LOG(ERR, fmt, ## args) > > /* resources required to process stream */ > -enum { > +enum NUM_BUFS_PER_STREAM { > RES_BUF = 0, > CMD_BUF, > HASH_CTX_BUF, > @@ -88,7 +88,7 @@ enum { > OUT_DATA_BUF, > HISTORY_DATA_BUF, > MAX_BUFS_PER_STREAM > -} NUM_BUFS_PER_STREAM; > +}; > > struct zip_stream; > struct zipvf_qp; > @@ -106,7 +106,7 @@ struct zip_stream { > comp_func_t func; > /* function to process comp operation */ > void *bufs[MAX_BUFS_PER_STREAM]; > -} _rte_cache_aligned; > +} __rte_cache_aligned; > > > /** > diff --git a/drivers/compress/octeontx/otx_zip_pmd.c > b/drivers/compress/octeontx/otx_zip_pmd.c > index 9d13f9331..67ff5066f 100644 > --- a/drivers/compress/octeontx/otx_zip_pmd.c > +++ b/drivers/compress/octeontx/otx_zip_pmd.c > @@ -533,7 +533,7 @@ zip_pmd_dequeue_burst_sync(void *queue_pair, > return nb_dequeued; > } > > -struct rte_compressdev_ops octtx_zip_pmd_ops = { > +static struct rte_compressdev_ops octtx_zip_pmd_ops = { > .dev_configure = zip_pmd_config, > .dev_start = zip_pmd_start, > .dev_stop = zip_pmd_stop, > diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > index 265a8e41a..eba236216 100644 > --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > @@ -2874,7 +2874,7 @@ dpaa2_sec_capabilities_get(void *device > __rte_unused) > return dpaa2_sec_security_cap; > } > > -struct rte_security_ops dpaa2_sec_security_ops = { > +static struct rte_security_ops dpaa2_sec_security_ops = { > .session_create = dpaa2_sec_security_session_create, > .session_update = NULL, > .session_stats_get = NULL, > diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c > b/drivers/crypto/dpaa_sec/dpaa_sec.c > index 7c0459f9f..d3b28e196 100644 > --- a/drivers/crypto/dpaa_sec/dpaa_sec.c > +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c > @@ -2264,7 +2264,7 @@ dpaa_sec_capabilities_get(void *device > __rte_unused) > return dpaa_sec_security_cap; > } > > -struct rte_security_ops dpaa_sec_security_ops = { > +static struct rte_security_ops dpaa_sec_security_ops = { > .session_create = dpaa_sec_security_session_create, > .session_update = NULL, > .session_stats_get = NULL, > diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c > b/drivers/crypto/null/null_crypto_pmd_ops.c > index bb2b6e144..2bdcd019e 100644 > --- a/drivers/crypto/null/null_crypto_pmd_ops.c > +++ b/drivers/crypto/null/null_crypto_pmd_ops.c > @@ -308,7 +308,7 @@ null_crypto_pmd_sym_session_clear(struct > rte_cryptodev *dev, > } > } > > -struct rte_cryptodev_ops pmd_ops = { > +static struct rte_cryptodev_ops pmd_ops = { > .dev_configure = null_crypto_pmd_config, > .dev_start = null_crypto_pmd_start, > .dev_stop = null_crypto_pmd_stop, > diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c > b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c > index 6e4919c49..a21428606 100644 > --- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c > +++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c > @@ -174,7 +174,7 @@ rte_cryptodev_scheduler_slave_attach(uint8_t > scheduler_id, uint8_t slave_id) > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -233,7 +233,7 @@ rte_cryptodev_scheduler_slave_detach(uint8_t > scheduler_id, uint8_t slave_id) > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -290,7 +290,7 @@ rte_cryptodev_scheduler_mode_set(uint8_t > scheduler_id, > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -308,28 +308,28 @@ rte_cryptodev_scheduler_mode_set(uint8_t > scheduler_id, > switch (mode) { > case CDEV_SCHED_MODE_ROUNDROBIN: > if > (rte_cryptodev_scheduler_load_user_scheduler(scheduler_id, > - roundrobin_scheduler) < 0) { > + crypto_scheduler_roundrobin) < 0) { > CR_SCHED_LOG(ERR, "Failed to load scheduler"); > return -1; > } > break; > case CDEV_SCHED_MODE_PKT_SIZE_DISTR: > if > (rte_cryptodev_scheduler_load_user_scheduler(scheduler_id, > - pkt_size_based_distr_scheduler) < 0) { > + crypto_scheduler_pkt_size_based_distr) < 0) > { > CR_SCHED_LOG(ERR, "Failed to load scheduler"); > return -1; > } > break; > case CDEV_SCHED_MODE_FAILOVER: > if > (rte_cryptodev_scheduler_load_user_scheduler(scheduler_id, > - failover_scheduler) < 0) { > + crypto_scheduler_failover) < 0) { > CR_SCHED_LOG(ERR, "Failed to load scheduler"); > return -1; > } > break; > case CDEV_SCHED_MODE_MULTICORE: > if > (rte_cryptodev_scheduler_load_user_scheduler(scheduler_id, > - multicore_scheduler) < 0) { > + crypto_scheduler_multicore) < 0) { > CR_SCHED_LOG(ERR, "Failed to load scheduler"); > return -1; > } > @@ -353,7 +353,7 @@ rte_cryptodev_scheduler_mode_get(uint8_t > scheduler_id) > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -375,7 +375,7 @@ rte_cryptodev_scheduler_ordering_set(uint8_t > scheduler_id, > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -403,7 +403,7 @@ rte_cryptodev_scheduler_ordering_get(uint8_t > scheduler_id) > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -425,7 +425,7 @@ > rte_cryptodev_scheduler_load_user_scheduler(uint8_t scheduler_id, > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -498,7 +498,7 @@ rte_cryptodev_scheduler_slaves_get(uint8_t > scheduler_id, uint8_t *slaves) > return -ENOTSUP; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > @@ -566,7 +566,7 @@ rte_cryptodev_scheduler_option_get(uint8_t > scheduler_id, > return -EINVAL; > } > > - if (dev->driver_id != cryptodev_driver_id) { > + if (dev->driver_id != cryptodev_scheduler_driver_id) { > CR_SCHED_LOG(ERR, "Operation not supported"); > return -ENOTSUP; > } > diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h > b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h > index 3faea4099..9a72a90ae 100644 > --- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h > +++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h > @@ -270,13 +270,13 @@ struct rte_cryptodev_scheduler { > }; > > /** Round-robin mode scheduler */ > -extern struct rte_cryptodev_scheduler *roundrobin_scheduler; > +extern struct rte_cryptodev_scheduler *crypto_scheduler_roundrobin; > /** Packet-size based distribution mode scheduler */ > -extern struct rte_cryptodev_scheduler *pkt_size_based_distr_scheduler; > +extern struct rte_cryptodev_scheduler > *crypto_scheduler_pkt_size_based_distr; > /** Fail-over mode scheduler */ > -extern struct rte_cryptodev_scheduler *failover_scheduler; > +extern struct rte_cryptodev_scheduler *crypto_scheduler_failover; > /** multi-core mode scheduler */ > -extern struct rte_cryptodev_scheduler *multicore_scheduler; > +extern struct rte_cryptodev_scheduler *crypto_scheduler_multicore; > > #ifdef __cplusplus > } > diff --git a/drivers/crypto/scheduler/scheduler_failover.c > b/drivers/crypto/scheduler/scheduler_failover.c > index ddfb5b815..3a023b8ad 100644 > --- a/drivers/crypto/scheduler/scheduler_failover.c > +++ b/drivers/crypto/scheduler/scheduler_failover.c > @@ -197,7 +197,7 @@ scheduler_create_private_ctx(__rte_unused struct > rte_cryptodev *dev) > return 0; > } > > -struct rte_cryptodev_scheduler_ops scheduler_fo_ops = { > +static struct rte_cryptodev_scheduler_ops scheduler_fo_ops = { > slave_attach, > slave_detach, > scheduler_start, > @@ -208,7 +208,7 @@ struct rte_cryptodev_scheduler_ops > scheduler_fo_ops = { > NULL /*option_get */ > }; > > -struct rte_cryptodev_scheduler fo_scheduler = { > +static struct rte_cryptodev_scheduler fo_scheduler = { > .name = "failover-scheduler", > .description = "scheduler which enqueues to the primary > slave, " > "and only then enqueues to the secondary > slave " > @@ -217,4 +217,4 @@ struct rte_cryptodev_scheduler fo_scheduler = { > .ops = &scheduler_fo_ops > }; > > -struct rte_cryptodev_scheduler *failover_scheduler = &fo_scheduler; > +struct rte_cryptodev_scheduler *crypto_scheduler_failover = > &fo_scheduler; > diff --git a/drivers/crypto/scheduler/scheduler_multicore.c > b/drivers/crypto/scheduler/scheduler_multicore.c > index d410e69d3..7808e9a34 100644 > --- a/drivers/crypto/scheduler/scheduler_multicore.c > +++ b/drivers/crypto/scheduler/scheduler_multicore.c > @@ -392,7 +392,7 @@ scheduler_create_private_ctx(struct rte_cryptodev > *dev) > return -1; > } > > -struct rte_cryptodev_scheduler_ops scheduler_mc_ops = { > +static struct rte_cryptodev_scheduler_ops scheduler_mc_ops = { > slave_attach, > slave_detach, > scheduler_start, > @@ -403,11 +403,11 @@ struct rte_cryptodev_scheduler_ops > scheduler_mc_ops = { > NULL /* option_get */ > }; > > -struct rte_cryptodev_scheduler mc_scheduler = { > +static struct rte_cryptodev_scheduler mc_scheduler = { > .name = "multicore-scheduler", > .description = "scheduler which will run burst across multiple > cpu cores", > .mode = CDEV_SCHED_MODE_MULTICORE, > .ops = &scheduler_mc_ops > }; > > -struct rte_cryptodev_scheduler *multicore_scheduler = &mc_scheduler; > +struct rte_cryptodev_scheduler *crypto_scheduler_multicore = > &mc_scheduler; > diff --git a/drivers/crypto/scheduler/scheduler_pkt_size_distr.c > b/drivers/crypto/scheduler/scheduler_pkt_size_distr.c > index 74129b667..45c8dceb4 100644 > --- a/drivers/crypto/scheduler/scheduler_pkt_size_distr.c > +++ b/drivers/crypto/scheduler/scheduler_pkt_size_distr.c > @@ -398,7 +398,7 @@ scheduler_option_get(struct rte_cryptodev *dev, > uint32_t option_type, > return 0; > } > > -struct rte_cryptodev_scheduler_ops scheduler_ps_ops = { > +static struct rte_cryptodev_scheduler_ops scheduler_ps_ops = { > slave_attach, > slave_detach, > scheduler_start, > @@ -409,7 +409,7 @@ struct rte_cryptodev_scheduler_ops > scheduler_ps_ops = { > scheduler_option_get > }; > > -struct rte_cryptodev_scheduler psd_scheduler = { > +static struct rte_cryptodev_scheduler psd_scheduler = { > .name = "packet-size-based-scheduler", > .description = "scheduler which will distribute crypto op " > "burst based on the packet size", > @@ -417,4 +417,4 @@ struct rte_cryptodev_scheduler psd_scheduler = { > .ops = &scheduler_ps_ops > }; > > -struct rte_cryptodev_scheduler *pkt_size_based_distr_scheduler = > &psd_scheduler; > +struct rte_cryptodev_scheduler *crypto_scheduler_pkt_size_based_distr = > &psd_scheduler; > diff --git a/drivers/crypto/scheduler/scheduler_pmd.c > b/drivers/crypto/scheduler/scheduler_pmd.c > index a9221a946..20198ccb0 100644 > --- a/drivers/crypto/scheduler/scheduler_pmd.c > +++ b/drivers/crypto/scheduler/scheduler_pmd.c > @@ -14,7 +14,7 @@ > #include "rte_cryptodev_scheduler.h" > #include "scheduler_pmd_private.h" > > -uint8_t cryptodev_driver_id; > +uint8_t cryptodev_scheduler_driver_id; > > struct scheduler_init_params { > struct rte_cryptodev_pmd_init_params def_p; > @@ -38,7 +38,7 @@ struct scheduler_init_params { > #define RTE_CRYPTODEV_VDEV_COREMASK ("coremask") > #define RTE_CRYPTODEV_VDEV_CORELIST ("corelist") > > -const char *scheduler_valid_params[] = { > +static const char * const scheduler_valid_params[] = { > RTE_CRYPTODEV_VDEV_NAME, > RTE_CRYPTODEV_VDEV_SLAVE, > RTE_CRYPTODEV_VDEV_MODE, > @@ -91,7 +91,7 @@ cryptodev_scheduler_create(const char *name, > return -EFAULT; > } > > - dev->driver_id = cryptodev_driver_id; > + dev->driver_id = cryptodev_scheduler_driver_id; > dev->dev_ops = rte_crypto_scheduler_pmd_ops; > > sched_ctx = dev->data->dev_private; > @@ -569,4 +569,4 @@ > RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PM > D, > "slave=<name>"); > RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv, > cryptodev_scheduler_pmd_drv.driver, > - cryptodev_driver_id); > + cryptodev_scheduler_driver_id); > diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c > b/drivers/crypto/scheduler/scheduler_pmd_ops.c > index 778071ca0..939105aa8 100644 > --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c > +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c > @@ -522,7 +522,7 @@ scheduler_pmd_sym_session_clear(struct > rte_cryptodev *dev, > } > } > > -struct rte_cryptodev_ops scheduler_pmd_ops = { > +static struct rte_cryptodev_ops scheduler_pmd_ops = { > .dev_configure = scheduler_pmd_config, > .dev_start = scheduler_pmd_start, > .dev_stop = scheduler_pmd_stop, > diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h > b/drivers/crypto/scheduler/scheduler_pmd_private.h > index d5e602a2f..3ed480c18 100644 > --- a/drivers/crypto/scheduler/scheduler_pmd_private.h > +++ b/drivers/crypto/scheduler/scheduler_pmd_private.h > @@ -63,7 +63,7 @@ struct scheduler_qp_ctx { > } __rte_cache_aligned; > > > -extern uint8_t cryptodev_driver_id; > +extern uint8_t cryptodev_scheduler_driver_id; > > static __rte_always_inline uint16_t > get_max_enqueue_order_count(struct rte_ring *order_ring, uint16_t > nb_ops) > diff --git a/drivers/crypto/scheduler/scheduler_roundrobin.c > b/drivers/crypto/scheduler/scheduler_roundrobin.c > index c7082a64e..9b891d978 100644 > --- a/drivers/crypto/scheduler/scheduler_roundrobin.c > +++ b/drivers/crypto/scheduler/scheduler_roundrobin.c > @@ -190,7 +190,7 @@ scheduler_create_private_ctx(__rte_unused struct > rte_cryptodev *dev) > return 0; > } > > -struct rte_cryptodev_scheduler_ops scheduler_rr_ops = { > +static struct rte_cryptodev_scheduler_ops scheduler_rr_ops = { > slave_attach, > slave_detach, > scheduler_start, > @@ -201,7 +201,7 @@ struct rte_cryptodev_scheduler_ops > scheduler_rr_ops = { > NULL /* option_get */ > }; > > -struct rte_cryptodev_scheduler scheduler = { > +static struct rte_cryptodev_scheduler scheduler = { > .name = "roundrobin-scheduler", > .description = "scheduler which will round robin burst across " > "slave crypto devices", > @@ -209,4 +209,4 @@ struct rte_cryptodev_scheduler scheduler = { > .ops = &scheduler_rr_ops > }; > > -struct rte_cryptodev_scheduler *roundrobin_scheduler = &scheduler; > +struct rte_cryptodev_scheduler *crypto_scheduler_roundrobin = > &scheduler; > diff --git a/drivers/event/octeontx/ssovf_evdev.c > b/drivers/event/octeontx/ssovf_evdev.c > index c5e891cdb..a273d4c96 100644 > --- a/drivers/event/octeontx/ssovf_evdev.c > +++ b/drivers/event/octeontx/ssovf_evdev.c > @@ -455,7 +455,6 @@ ssovf_eth_rx_adapter_queue_del(const struct > rte_eventdev *dev, > const struct octeontx_nic *nic = eth_dev->data->dev_private; > pki_del_qos_t pki_qos; > RTE_SET_USED(dev); > - RTE_SET_USED(rx_queue_id); > > ret = strncmp(eth_dev->data->name, "eth_octeontx", 12); > if (ret) > @@ -467,7 +466,7 @@ ssovf_eth_rx_adapter_queue_del(const struct > rte_eventdev *dev, > ret = octeontx_pki_port_delete_qos(nic->port_id, &pki_qos); > if (ret < 0) > ssovf_log_err("Failed to delete QOS port=%d, q=%d", > - nic->port_id, queue_conf->ev.queue_id); > + nic->port_id, rx_queue_id); > return ret; > } > > diff --git a/drivers/mempool/dpaa/dpaa_mempool.c > b/drivers/mempool/dpaa/dpaa_mempool.c > index 1c121223b..8052d3b66 100644 > --- a/drivers/mempool/dpaa/dpaa_mempool.c > +++ b/drivers/mempool/dpaa/dpaa_mempool.c > @@ -324,7 +324,7 @@ dpaa_populate(struct rte_mempool *mp, unsigned > int max_objs, > obj_cb, obj_cb_arg); > } > > -struct rte_mempool_ops dpaa_mpool_ops = { > +static struct rte_mempool_ops dpaa_mpool_ops = { > .name = DPAA_MEMPOOL_OPS_NAME, > .alloc = dpaa_mbuf_create_pool, > .free = dpaa_mbuf_free_pool, > diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > index 84ff12811..ffa0e32a4 100644 > --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c > @@ -423,7 +423,7 @@ dpaa2_populate(struct rte_mempool *mp, unsigned > int max_objs, > obj_cb, obj_cb_arg); > } > > -struct rte_mempool_ops dpaa2_mpool_ops = { > +static struct rte_mempool_ops dpaa2_mpool_ops = { > .name = DPAA2_MEMPOOL_OPS_NAME, > .alloc = rte_hw_mbuf_create_pool, > .free = rte_hw_mbuf_free_pool, > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c > b/drivers/net/bonding/rte_eth_bond_8023ad.c > index f8cea4b6d..dd847c6f6 100644 > --- a/drivers/net/bonding/rte_eth_bond_8023ad.c > +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c > @@ -130,7 +130,7 @@ static const struct ether_addr lacp_mac_addr = { > .addr_bytes = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x02 } > }; > > -struct port mode_8023ad_ports[RTE_MAX_ETHPORTS]; > +struct port bond_mode_8023ad_ports[RTE_MAX_ETHPORTS]; > > static void > timer_cancel(uint64_t *timer) > @@ -187,7 +187,7 @@ set_warning_flags(struct port *port, uint16_t flags) > static void > show_warnings(uint16_t slave_id) > { > - struct port *port = &mode_8023ad_ports[slave_id]; > + struct port *port = &bond_mode_8023ad_ports[slave_id]; > uint8_t warnings; > > do { > @@ -260,7 +260,7 @@ static void > rx_machine(struct bond_dev_private *internals, uint16_t slave_id, > struct lacpdu *lacp) > { > - struct port *agg, *port = &mode_8023ad_ports[slave_id]; > + struct port *agg, *port = &bond_mode_8023ad_ports[slave_id]; > uint64_t timeout; > > if (SM_FLAG(port, BEGIN)) { > @@ -319,7 +319,7 @@ rx_machine(struct bond_dev_private *internals, > uint16_t slave_id, > ACTOR_STATE_CLR(port, DEFAULTED); > > /* If LACP partner params match this port actor params */ > - agg = &mode_8023ad_ports[port->aggregator_port_id]; > + agg = &bond_mode_8023ad_ports[port- > >aggregator_port_id]; > bool match = port->actor.system_priority == > lacp->partner.port_params.system_priority && > is_same_ether_addr(&agg->actor.system, > @@ -380,7 +380,7 @@ rx_machine(struct bond_dev_private *internals, > uint16_t slave_id, > static void > periodic_machine(struct bond_dev_private *internals, uint16_t slave_id) > { > - struct port *port = &mode_8023ad_ports[slave_id]; > + struct port *port = &bond_mode_8023ad_ports[slave_id]; > /* Calculate if either site is LACP enabled */ > uint64_t timeout; > uint8_t active = ACTOR_STATE(port, LACP_ACTIVE) || > @@ -442,7 +442,7 @@ periodic_machine(struct bond_dev_private > *internals, uint16_t slave_id) > static void > mux_machine(struct bond_dev_private *internals, uint16_t slave_id) > { > - struct port *port = &mode_8023ad_ports[slave_id]; > + struct port *port = &bond_mode_8023ad_ports[slave_id]; > > /* Save current state for later use */ > const uint8_t state_mask = STATE_SYNCHRONIZATION | > STATE_DISTRIBUTING | > @@ -545,7 +545,7 @@ mux_machine(struct bond_dev_private *internals, > uint16_t slave_id) > static void > tx_machine(struct bond_dev_private *internals, uint16_t slave_id) > { > - struct port *agg, *port = &mode_8023ad_ports[slave_id]; > + struct port *agg, *port = &bond_mode_8023ad_ports[slave_id]; > > struct rte_mbuf *lacp_pkt = NULL; > struct lacpdu_header *hdr; > @@ -591,7 +591,7 @@ tx_machine(struct bond_dev_private *internals, > uint16_t slave_id) > lacpdu->actor.info_length = sizeof(struct > lacpdu_actor_partner_params); > memcpy(&hdr->lacpdu.actor.port_params, &port->actor, > sizeof(port->actor)); > - agg = &mode_8023ad_ports[port->aggregator_port_id]; > + agg = &bond_mode_8023ad_ports[port->aggregator_port_id]; > ether_addr_copy(&agg->actor.system, &hdr- > >lacpdu.actor.port_params.system); > lacpdu->actor.state = port->actor_state; > > @@ -677,11 +677,11 @@ selection_logic(struct bond_dev_private *internals, > uint8_t slave_id) > > slaves = internals->active_slaves; > slaves_count = internals->active_slave_count; > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > /* Search for aggregator suitable for this port */ > for (i = 0; i < slaves_count; ++i) { > - agg = &mode_8023ad_ports[slaves[i]]; > + agg = &bond_mode_8023ad_ports[slaves[i]]; > /* Skip ports that are not aggreagators */ > if (agg->aggregator_port_id != slaves[i]) > continue; > @@ -824,7 +824,7 @@ bond_mode_8023ad_periodic_cb(void *arg) > } else > key = 0; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > key = rte_cpu_to_be_16(key); > if (key != port->actor.key) { > @@ -844,7 +844,7 @@ bond_mode_8023ad_periodic_cb(void *arg) > > for (i = 0; i < internals->active_slave_count; i++) { > slave_id = internals->active_slaves[i]; > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > if ((port->actor.key & > > rte_cpu_to_be_16(BOND_LINK_FULL_DUPLEX_KEY)) == 0) { > @@ -907,7 +907,7 @@ bond_mode_8023ad_activate_slave(struct > rte_eth_dev *bond_dev, > { > struct bond_dev_private *internals = bond_dev->data- > >dev_private; > > - struct port *port = &mode_8023ad_ports[slave_id]; > + struct port *port = &bond_mode_8023ad_ports[slave_id]; > struct port_params initial = { > .system = { { 0 } }, > .system_priority = rte_cpu_to_be_16(0xFFFF), > @@ -1008,7 +1008,7 @@ bond_mode_8023ad_deactivate_slave(struct > rte_eth_dev *bond_dev __rte_unused, > struct port *port = NULL; > uint8_t old_partner_state; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > ACTOR_STATE_CLR(port, AGGREGATION); > port->selected = UNSELECTED; > @@ -1045,7 +1045,7 @@ bond_mode_8023ad_mac_address_update(struct > rte_eth_dev *bond_dev) > > for (i = 0; i < internals->active_slave_count; i++) { > slave_id = internals->active_slaves[i]; > - slave = &mode_8023ad_ports[slave_id]; > + slave = &bond_mode_8023ad_ports[slave_id]; > rte_eth_macaddr_get(slave_id, &slave_addr); > > if (is_same_ether_addr(&slave_addr, &slave- > >actor.system)) > @@ -1058,7 +1058,7 @@ bond_mode_8023ad_mac_address_update(struct > rte_eth_dev *bond_dev) > continue; > > for (j = 0; j < internals->active_slave_count; j++) { > - agg_slave = &mode_8023ad_ports[internals- > >active_slaves[j]]; > + agg_slave = &bond_mode_8023ad_ports[internals- > >active_slaves[j]]; > if (agg_slave->aggregator_port_id == slave_id) > SM_FLAG_SET(agg_slave, NTT); > } > @@ -1191,7 +1191,7 @@ bond_mode_8023ad_handle_slow_pkt(struct > bond_dev_private *internals, > uint16_t slave_id, struct rte_mbuf *pkt) > { > struct mode8023ad_private *mode4 = &internals->mode4; > - struct port *port = &mode_8023ad_ports[slave_id]; > + struct port *port = &bond_mode_8023ad_ports[slave_id]; > struct marker_header *m_hdr; > uint64_t marker_timer, old_marker_timer; > int retval; > @@ -1395,7 +1395,7 @@ rte_eth_bond_8023ad_slave_info(uint16_t > port_id, uint16_t slave_id, > internals->active_slave_count) > return -EINVAL; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > info->selected = port->selected; > > info->actor_state = port->actor_state; > @@ -1447,7 +1447,7 @@ rte_eth_bond_8023ad_ext_collect(uint16_t > port_id, uint16_t slave_id, > if (res != 0) > return res; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > if (enabled) > ACTOR_STATE_SET(port, COLLECTING); > @@ -1468,7 +1468,7 @@ rte_eth_bond_8023ad_ext_distrib(uint16_t > port_id, uint16_t slave_id, > if (res != 0) > return res; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > if (enabled) > ACTOR_STATE_SET(port, DISTRIBUTING); > @@ -1488,7 +1488,7 @@ rte_eth_bond_8023ad_ext_distrib_get(uint16_t > port_id, uint16_t slave_id) > if (err != 0) > return err; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > return ACTOR_STATE(port, DISTRIBUTING); > } > > @@ -1502,7 +1502,7 @@ rte_eth_bond_8023ad_ext_collect_get(uint16_t > port_id, uint16_t slave_id) > if (err != 0) > return err; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > return ACTOR_STATE(port, COLLECTING); > } > > @@ -1517,7 +1517,7 @@ rte_eth_bond_8023ad_ext_slowtx(uint16_t > port_id, uint16_t slave_id, > if (res != 0) > return res; > > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > if (rte_pktmbuf_pkt_len(lacp_pkt) < sizeof(struct lacpdu_header)) > return -EINVAL; > @@ -1546,7 +1546,7 @@ bond_mode_8023ad_ext_periodic_cb(void *arg) > > for (i = 0; i < internals->active_slave_count; i++) { > slave_id = internals->active_slaves[i]; > - port = &mode_8023ad_ports[slave_id]; > + port = &bond_mode_8023ad_ports[slave_id]; > > if (rte_ring_dequeue(port->rx_ring, &pkt) == 0) { > struct rte_mbuf *lacp_pkt = pkt; > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h > b/drivers/net/bonding/rte_eth_bond_8023ad_private.h > index 0f490a515..c51426b85 100644 > --- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h > +++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h > @@ -174,7 +174,7 @@ struct mode8023ad_private { > * The pool of *port* structures. The size of the pool > * is configured at compile-time in the <rte_eth_bond_8023ad.c> file. > */ > -extern struct port mode_8023ad_ports[]; > +extern struct port bond_mode_8023ad_ports[]; > > /* Forward declaration */ > struct bond_dev_private; > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index 1d6245aa5..a7b592eed 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -334,7 +334,7 @@ bond_ethdev_tx_burst_8023ad_fast_queue(void > *queue, struct rte_mbuf **bufs, > > dist_slave_count = 0; > for (i = 0; i < slave_count; i++) { > - struct port *port = &mode_8023ad_ports[slave_port_ids[i]]; > + struct port *port = > &bond_mode_8023ad_ports[slave_port_ids[i]]; > > if (ACTOR_STATE(port, DISTRIBUTING)) > dist_slave_port_ids[dist_slave_count++] = > @@ -420,7 +420,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct > rte_mbuf **bufs, > } > for (i = 0; i < slave_count && num_rx_total < nb_pkts; i++) { > j = num_rx_total; > - collecting = > ACTOR_STATE(&mode_8023ad_ports[slaves[idx]], > + collecting = > ACTOR_STATE(&bond_mode_8023ad_ports[slaves[idx]], > COLLECTING); > > /* Read packets from this slave */ > @@ -1310,7 +1310,7 @@ bond_ethdev_tx_burst_8023ad(void *queue, > struct rte_mbuf **bufs, > > dist_slave_count = 0; > for (i = 0; i < slave_count; i++) { > - struct port *port = &mode_8023ad_ports[slave_port_ids[i]]; > + struct port *port = > &bond_mode_8023ad_ports[slave_port_ids[i]]; > > if (ACTOR_STATE(port, DISTRIBUTING)) > dist_slave_port_ids[dist_slave_count++] = > @@ -1365,7 +1365,7 @@ bond_ethdev_tx_burst_8023ad(void *queue, > struct rte_mbuf **bufs, > > /* Check for LACP control packets and send if available */ > for (i = 0; i < slave_count; i++) { > - struct port *port = &mode_8023ad_ports[slave_port_ids[i]]; > + struct port *port = > &bond_mode_8023ad_ports[slave_port_ids[i]]; > struct rte_mbuf *ctrl_pkt = NULL; > > if (likely(rte_ring_empty(port->tx_ring))) > @@ -1716,7 +1716,7 @@ slave_configure_slow_queue(struct rte_eth_dev > *bonded_eth_dev, > int errval = 0; > struct bond_dev_private *internals = (struct bond_dev_private *) > bonded_eth_dev->data->dev_private; > - struct port *port = &mode_8023ad_ports[slave_eth_dev->data- > >port_id]; > + struct port *port = &bond_mode_8023ad_ports[slave_eth_dev- > >data->port_id]; > > if (port->slow_pool == NULL) { > char mem_name[256]; > @@ -2155,7 +2155,7 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) > > /* Discard all messages to/from mode 4 state machines */ > for (i = 0; i < internals->active_slave_count; i++) { > - port = &mode_8023ad_ports[internals- > >active_slaves[i]]; > + port = &bond_mode_8023ad_ports[internals- > >active_slaves[i]]; > > RTE_ASSERT(port->rx_ring != NULL); > while (rte_ring_dequeue(port->rx_ring, &pkt) != - > ENOENT) > diff --git a/drivers/net/cxgbe/cxgbe_flow.c > b/drivers/net/cxgbe/cxgbe_flow.c > index bee3bd640..da6d29c75 100644 > --- a/drivers/net/cxgbe/cxgbe_flow.c > +++ b/drivers/net/cxgbe/cxgbe_flow.c > @@ -481,7 +481,7 @@ cxgbe_rtef_parse_actions(struct rte_flow *flow, > return 0; > } > > -struct chrte_fparse parseitem[] = { > +static struct chrte_fparse parseitem[] = { > [RTE_FLOW_ITEM_TYPE_ETH] = { > .fptr = ch_rte_parsetype_eth, > .dmask = &(const struct rte_flow_item_eth){ > diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c > index 65333c47a..0d0fe1e26 100644 > --- a/drivers/net/enic/enic_ethdev.c > +++ b/drivers/net/enic/enic_ethdev.c > @@ -996,7 +996,6 @@ static int enic_check_devargs(struct rte_eth_dev > *dev) > return 0; > } > > -struct enic *enicpmd_list_head = NULL; > /* Initialize the driver > * It returns 0 on success. > */ > diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c > index c3999f026..b18a2524e 100644 > --- a/drivers/net/failsafe/failsafe.c > +++ b/drivers/net/failsafe/failsafe.c > @@ -71,7 +71,7 @@ failsafe_hotplug_alarm_install(struct rte_eth_dev > *dev) > return -EINVAL; > if (PRIV(dev)->pending_alarm) > return 0; > - ret = rte_eal_alarm_set(hotplug_poll * 1000, > + ret = rte_eal_alarm_set(failsafe_hotplug_poll * 1000, > fs_hotplug_alarm, > dev); > if (ret) { > @@ -225,7 +225,7 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) > goto unregister_new_callback; > } > mac = &dev->data->mac_addrs[0]; > - if (mac_from_arg) { > + if (failsafe_mac_from_arg) { > /* > * If MAC address was provided as a parameter, > * apply to all probed slaves. > diff --git a/drivers/net/failsafe/failsafe_args.c > b/drivers/net/failsafe/failsafe_args.c > index 626883ce2..c4b220c48 100644 > --- a/drivers/net/failsafe/failsafe_args.c > +++ b/drivers/net/failsafe/failsafe_args.c > @@ -22,10 +22,10 @@ > typedef int (parse_cb)(struct rte_eth_dev *dev, const char *params, > uint8_t head); > > -uint64_t hotplug_poll = FAILSAFE_HOTPLUG_DEFAULT_TIMEOUT_MS; > -int mac_from_arg = 0; > +uint64_t failsafe_hotplug_poll = > FAILSAFE_HOTPLUG_DEFAULT_TIMEOUT_MS; > +int failsafe_mac_from_arg; > > -const char *pmd_failsafe_init_parameters[] = { > +static const char * const pmd_failsafe_init_parameters[] = { > PMD_FAILSAFE_HOTPLUG_POLL_KVARG, > PMD_FAILSAFE_MAC_KVARG, > NULL, > @@ -420,7 +420,7 @@ failsafe_args_parse(struct rte_eth_dev *dev, const > char *params) > if (arg_count == 1) { > ret = rte_kvargs_process(kvlist, > > PMD_FAILSAFE_HOTPLUG_POLL_KVARG, > - &fs_get_u64_arg, &hotplug_poll); > + &fs_get_u64_arg, > &failsafe_hotplug_poll); > if (ret < 0) > goto free_kvlist; > } > @@ -435,7 +435,7 @@ failsafe_args_parse(struct rte_eth_dev *dev, const > char *params) > if (ret < 0) > goto free_kvlist; > > - mac_from_arg = 1; > + failsafe_mac_from_arg = 1; > } > } > PRIV(dev)->state = DEV_PARSED; > diff --git a/drivers/net/failsafe/failsafe_private.h > b/drivers/net/failsafe/failsafe_private.h > index abbe73e87..c46cb2104 100644 > --- a/drivers/net/failsafe/failsafe_private.h > +++ b/drivers/net/failsafe/failsafe_private.h > @@ -236,8 +236,8 @@ int failsafe_eth_new_event_callback(uint16_t > port_id, > extern const char pmd_failsafe_driver_name[]; > extern const struct eth_dev_ops failsafe_ops; > extern const struct rte_flow_ops fs_flow_ops; > -extern uint64_t hotplug_poll; > -extern int mac_from_arg; > +extern uint64_t failsafe_hotplug_poll; > +extern int failsafe_mac_from_arg; > > /* HELPERS */ > > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > b/drivers/net/fm10k/fm10k_ethdev.c > index 46983e5df..52398fe48 100644 > --- a/drivers/net/fm10k/fm10k_ethdev.c > +++ b/drivers/net/fm10k/fm10k_ethdev.c > @@ -72,7 +72,7 @@ struct fm10k_xstats_name_off { > unsigned offset; > }; > > -struct fm10k_xstats_name_off fm10k_hw_stats_strings[] = { > +static struct fm10k_xstats_name_off fm10k_hw_stats_strings[] = { > {"completion_timeout_count", offsetof(struct fm10k_hw_stats, > timeout)}, > {"unsupported_requests_count", offsetof(struct fm10k_hw_stats, > ur)}, > {"completer_abort_count", offsetof(struct fm10k_hw_stats, ca)}, > @@ -87,7 +87,7 @@ struct fm10k_xstats_name_off > fm10k_hw_stats_strings[] = { > #define FM10K_NB_HW_XSTATS (sizeof(fm10k_hw_stats_strings) / \ > sizeof(fm10k_hw_stats_strings[0])) > > -struct fm10k_xstats_name_off fm10k_hw_stats_rx_q_strings[] = { > +static struct fm10k_xstats_name_off fm10k_hw_stats_rx_q_strings[] = { > {"packets", offsetof(struct fm10k_hw_stats_q, rx_packets)}, > {"bytes", offsetof(struct fm10k_hw_stats_q, rx_bytes)}, > {"dropped", offsetof(struct fm10k_hw_stats_q, rx_drops)}, > @@ -96,7 +96,7 @@ struct fm10k_xstats_name_off > fm10k_hw_stats_rx_q_strings[] = { > #define FM10K_NB_RX_Q_XSTATS (sizeof(fm10k_hw_stats_rx_q_strings) / > \ > sizeof(fm10k_hw_stats_rx_q_strings[0])) > > -struct fm10k_xstats_name_off fm10k_hw_stats_tx_q_strings[] = { > +static struct fm10k_xstats_name_off fm10k_hw_stats_tx_q_strings[] = { > {"packets", offsetof(struct fm10k_hw_stats_q, tx_packets)}, > {"bytes", offsetof(struct fm10k_hw_stats_q, tx_bytes)}, > }; > diff --git a/drivers/net/i40e/base/i40e_diag.c > b/drivers/net/i40e/base/i40e_diag.c > index f94c117ae..3ccbea482 100644 > --- a/drivers/net/i40e/base/i40e_diag.c > +++ b/drivers/net/i40e/base/i40e_diag.c > @@ -55,7 +55,7 @@ static enum i40e_status_code > i40e_diag_reg_pattern_test(struct i40e_hw *hw, > return I40E_SUCCESS; > } > > -struct i40e_diag_reg_test_info i40e_reg_list[] = { > +static struct i40e_diag_reg_test_info i40e_reg_list[] = { > /* offset mask elements stride */ > {I40E_QTX_CTL(0), 0x0000FFBF, 1, I40E_QTX_CTL(1) - > I40E_QTX_CTL(0)}, > {I40E_PFINT_ITR0(0), 0x00000FFF, 3, I40E_PFINT_ITR0(1) - > I40E_PFINT_ITR0(0)}, > diff --git a/drivers/net/i40e/base/i40e_diag.h > b/drivers/net/i40e/base/i40e_diag.h > index 1a781f83d..4434fc960 100644 > --- a/drivers/net/i40e/base/i40e_diag.h > +++ b/drivers/net/i40e/base/i40e_diag.h > @@ -21,8 +21,6 @@ struct i40e_diag_reg_test_info { > u32 stride; /* bytes between each element */ > }; > > -extern struct i40e_diag_reg_test_info i40e_reg_list[]; > - > enum i40e_status_code i40e_diag_set_loopback(struct i40e_hw *hw, > enum i40e_lb_mode mode); > enum i40e_status_code i40e_diag_fw_alive_test(struct i40e_hw *hw); > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c > index 7d787c173..3694df255 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -133,8 +133,8 @@ const struct rte_flow_ops i40e_flow_ops = { > .flush = i40e_flow_flush, > }; > > -union i40e_filter_t cons_filter; > -enum rte_filter_type cons_filter_type = RTE_ETH_FILTER_NONE; > +static union i40e_filter_t cons_filter; > +static enum rte_filter_type cons_filter_type = RTE_ETH_FILTER_NONE; > > /* Pattern matched ethertype filter */ > static enum rte_flow_item_type pattern_ethertype[] = { > diff --git a/drivers/net/i40e/i40e_vf_representor.c > b/drivers/net/i40e/i40e_vf_representor.c > index 0bfbb4f60..a47518d3c 100644 > --- a/drivers/net/i40e/i40e_vf_representor.c > +++ b/drivers/net/i40e/i40e_vf_representor.c > @@ -420,7 +420,7 @@ i40e_vf_representor_vlan_pvid_set(struct > rte_eth_dev *ethdev, uint16_t vlan_id, > representor->vf_id, vlan_id); > } > > -struct eth_dev_ops i40e_representor_dev_ops = { > +static struct eth_dev_ops i40e_representor_dev_ops = { > .dev_infos_get = i40e_vf_representor_dev_infos_get, > > .dev_start = i40e_vf_representor_dev_start, > diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c > index e1245f91b..57f60d29e 100644 > --- a/drivers/net/ifc/ifcvf_vdpa.c > +++ b/drivers/net/ifc/ifcvf_vdpa.c > @@ -723,7 +723,7 @@ ifcvf_get_protocol_features(int did __rte_unused, > uint64_t *features) > return 0; > } > > -struct rte_vdpa_dev_ops ifcvf_ops = { > +static struct rte_vdpa_dev_ops ifcvf_ops = { > .get_queue_num = ifcvf_get_queue_num, > .get_features = ifcvf_get_vdpa_features, > .get_protocol_features = ifcvf_get_protocol_features, > diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c > b/drivers/net/ixgbe/ixgbe_vf_representor.c > index b0fbbc49f..eec0bf66f 100644 > --- a/drivers/net/ixgbe/ixgbe_vf_representor.c > +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c > @@ -135,7 +135,7 @@ ixgbe_vf_representor_vlan_strip_queue_set(struct > rte_eth_dev *ethdev, > representor->vf_id, on); > } > > -struct eth_dev_ops ixgbe_vf_representor_dev_ops = { > +static struct eth_dev_ops ixgbe_vf_representor_dev_ops = { > .dev_infos_get = ixgbe_vf_representor_dev_infos_get, > > .dev_start = ixgbe_vf_representor_dev_start, > diff --git a/drivers/net/qede/base/bcm_osal.c > b/drivers/net/qede/base/bcm_osal.c > index d5d6f8e20..693328f11 100644 > --- a/drivers/net/qede/base/bcm_osal.c > +++ b/drivers/net/qede/base/bcm_osal.c > @@ -17,7 +17,7 @@ > /* Array of memzone pointers */ > static const struct rte_memzone > *ecore_mz_mapping[RTE_MAX_MEMZONE]; > /* Counter to track current memzone allocated */ > -uint16_t ecore_mz_count; > +static uint16_t ecore_mz_count; > > unsigned long qede_log2_align(unsigned long n) > { > diff --git a/drivers/net/qede/base/ecore_sriov.c > b/drivers/net/qede/base/ecore_sriov.c > index db929f015..7d73ef9fb 100644 > --- a/drivers/net/qede/base/ecore_sriov.c > +++ b/drivers/net/qede/base/ecore_sriov.c > @@ -31,7 +31,7 @@ static enum _ecore_status_t > ecore_sriov_eqe_event(struct ecore_hwfn *p_hwfn, > union event_ring_data > *data, > u8 fw_return_code); > > -const char *ecore_channel_tlvs_string[] = { > +const char *qede_ecore_channel_tlvs_string[] = { > "CHANNEL_TLV_NONE", /* ends tlv sequence */ > "CHANNEL_TLV_ACQUIRE", > "CHANNEL_TLV_VPORT_START", > @@ -1280,7 +1280,7 @@ static void ecore_iov_lock_vf_pf_channel(struct > ecore_hwfn *p_hwfn, > ECORE_MSG_IOV, > "VF[%d]: vf pf channel locked by %s\n", > vf->abs_vf_id, > - ecore_channel_tlvs_string[tlv]); > + qede_ecore_channel_tlvs_string[tlv]); > else > DP_VERBOSE(p_hwfn, > ECORE_MSG_IOV, > @@ -1298,7 +1298,7 @@ static void ecore_iov_unlock_vf_pf_channel(struct > ecore_hwfn *p_hwfn, > ECORE_MSG_IOV, > "VF[%d]: vf pf channel unlocked by %s\n", > vf->abs_vf_id, > - ecore_channel_tlvs_string[expected_tlv]); > + qede_ecore_channel_tlvs_string[expected_tlv]); > else > DP_VERBOSE(p_hwfn, > ECORE_MSG_IOV, > @@ -1338,7 +1338,7 @@ void ecore_dp_tlv_list(struct ecore_hwfn > *p_hwfn, void *tlvs_list) > if (ecore_iov_tlv_supported(tlv->type)) > DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, > "TLV number %d: type %s, length %d\n", > - i, ecore_channel_tlvs_string[tlv->type], > + i, qede_ecore_channel_tlvs_string[tlv- > >type], > tlv->length); > else > DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, > @@ -2919,7 +2919,7 @@ void *ecore_iov_search_list_tlvs(struct > ecore_hwfn *p_hwfn, > if (p_tlv->type == req_type) { > DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, > "Extended tlv type %s, length %d found\n", > - ecore_channel_tlvs_string[p_tlv->type], > + qede_ecore_channel_tlvs_string[p_tlv- > >type], > p_tlv->length); > return p_tlv; > } > diff --git a/drivers/net/qede/base/ecore_vf.c > b/drivers/net/qede/base/ecore_vf.c > index 409b301d3..3ba6a0cf2 100644 > --- a/drivers/net/qede/base/ecore_vf.c > +++ b/drivers/net/qede/base/ecore_vf.c > @@ -32,7 +32,7 @@ static void *ecore_vf_pf_prep(struct ecore_hwfn > *p_hwfn, u16 type, u16 length) > > DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, > "preparing to send %s tlv over vf pf channel\n", > - ecore_channel_tlvs_string[type]); > + qede_ecore_channel_tlvs_string[type]); > > /* Reset Request offset */ > p_iov->offset = (u8 *)(p_iov->vf2pf_request); > @@ -1184,7 +1184,7 @@ ecore_vf_handle_vp_update_is_needed(struct > ecore_hwfn *p_hwfn, > return !!p_data->sge_tpa_params; > default: > DP_INFO(p_hwfn, "Unexpected vport-update TLV[%d] > %s\n", > - tlv, ecore_channel_tlvs_string[tlv]); > + tlv, qede_ecore_channel_tlvs_string[tlv]); > return false; > } > } > @@ -1208,7 +1208,7 @@ ecore_vf_handle_vp_update_tlvs_resp(struct > ecore_hwfn *p_hwfn, > if (p_resp && p_resp->hdr.status) > DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, > "TLV[%d] type %s Configuration %s\n", > - tlv, ecore_channel_tlvs_string[tlv], > + tlv, qede_ecore_channel_tlvs_string[tlv], > (p_resp && p_resp->hdr.status) ? > "succeeded" > : "failed"); > } > diff --git a/drivers/net/qede/base/ecore_vfpf_if.h > b/drivers/net/qede/base/ecore_vfpf_if.h > index c30677abc..c7ecb01c2 100644 > --- a/drivers/net/qede/base/ecore_vfpf_if.h > +++ b/drivers/net/qede/base/ecore_vfpf_if.h > @@ -698,6 +698,6 @@ enum { > > /*!!!!! Make sure to update STRINGS structure accordingly !!!!!*/ > }; > -extern const char *ecore_channel_tlvs_string[]; > +extern const char *qede_ecore_channel_tlvs_string[]; > > #endif /* __ECORE_VF_PF_IF_H__ */ > diff --git a/drivers/net/qede/qede_ethdev.c > b/drivers/net/qede/qede_ethdev.c > index 18d244a93..332d47075 100644 > --- a/drivers/net/qede/qede_ethdev.c > +++ b/drivers/net/qede/qede_ethdev.c > @@ -297,7 +297,7 @@ static void qede_print_adapter_info(struct qede_dev > *qdev) > (info->mfw_rev >> 16) & 0xff, > (info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff); > DP_INFO(edev, " Management Firmware version : %s\n", ver_str); > - DP_INFO(edev, " Firmware file : %s\n", fw_file); > + DP_INFO(edev, " Firmware file : %s\n", qede_fw_file); > DP_INFO(edev, "*********************************\n"); > } > > @@ -1089,7 +1089,7 @@ static void qede_dev_stop(struct rte_eth_dev > *eth_dev) > DP_INFO(edev, "Device is stopped\n"); > } > > -const char *valid_args[] = { > +static const char * const valid_args[] = { > QEDE_NPAR_TX_SWITCHING, > QEDE_VF_TX_SWITCHING, > NULL, > diff --git a/drivers/net/qede/qede_ethdev.h > b/drivers/net/qede/qede_ethdev.h > index 622bd011a..c06274d94 100644 > --- a/drivers/net/qede/qede_ethdev.h > +++ b/drivers/net/qede/qede_ethdev.h > @@ -118,7 +118,7 @@ > > > > -extern char fw_file[]; > +extern char qede_fw_file[]; > > /* Number of PF connections - 32 RX + 32 TX */ > #define QEDE_PF_NUM_CONNS (64) > diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c > index 58c57acfe..5105f2467 100644 > --- a/drivers/net/sfc/sfc_rx.c > +++ b/drivers/net/sfc/sfc_rx.c > @@ -1127,7 +1127,7 @@ sfc_rx_qfini(struct sfc_adapter *sa, unsigned int > sw_index) > /* > * Mapping between RTE RSS hash functions and their EFX counterparts. > */ > -struct sfc_rss_hf_rte_to_efx sfc_rss_hf_map[] = { > +static struct sfc_rss_hf_rte_to_efx sfc_rss_hf_map[] = { > { ETH_RSS_NONFRAG_IPV4_TCP, > EFX_RX_HASH(IPV4_TCP, 4TUPLE) }, > { ETH_RSS_NONFRAG_IPV4_UDP, > diff --git a/drivers/net/softnic/rte_eth_softnic.c > b/drivers/net/softnic/rte_eth_softnic.c > index 41c3a9b3e..32063a478 100644 > --- a/drivers/net/softnic/rte_eth_softnic.c > +++ b/drivers/net/softnic/rte_eth_softnic.c > @@ -46,7 +46,7 @@ static const char welcome[] = > > static const char prompt[] = "softnic> "; > > -struct softnic_conn_params conn_params_default = { > +static struct softnic_conn_params conn_params_default = { > .welcome = welcome, > .prompt = prompt, > .addr = "0.0.0.0", > diff --git a/drivers/net/tap/tap_bpf_insns.h > b/drivers/net/tap/tap_bpf_insns.h > index 79e3e66b1..1a91bbad1 100644 > --- a/drivers/net/tap/tap_bpf_insns.h > +++ b/drivers/net/tap/tap_bpf_insns.h > @@ -5,7 +5,7 @@ > #include <tap_bpf.h> > > /* bpf_insn array matching cls_q section. See tap_bpf_program.c file */ > -struct bpf_insn cls_q_insns[] = { > +static struct bpf_insn cls_q_insns[] = { > {0x61, 2, 1, 52, 0x00000000}, > {0x18, 3, 0, 0, 0xdeadbeef}, > {0x00, 0, 0, 0, 0x00000000}, > @@ -24,7 +24,7 @@ struct bpf_insn cls_q_insns[] = { > }; > > /* bpf_insn array matching l3_l4 section. see tap_bpf_program.c file */ > -struct bpf_insn l3_l4_hash_insns[] = { > +static struct bpf_insn l3_l4_hash_insns[] = { > {0xbf, 7, 1, 0, 0x00000000}, > {0x61, 8, 7, 16, 0x00000000}, > {0x61, 6, 7, 76, 0x00000000}, > diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c > index 0e01af62a..526c51e1e 100644 > --- a/drivers/net/tap/tap_flow.c > +++ b/drivers/net/tap/tap_flow.c > @@ -1810,7 +1810,7 @@ tap_flow_implicit_flush(struct pmd_internals > *pmd, struct rte_flow_error *error) > #define KEY_IDX_OFFSET (3 * MAX_RSS_KEYS) > #define SEC_NAME_CLS_Q "cls_q" > > -const char *sec_name[SEC_MAX] = { > +static const char *sec_name[SEC_MAX] = { > [SEC_L3_L4] = "l3_l4", > }; > > diff --git a/drivers/net/virtio/virtio_user/vhost.h > b/drivers/net/virtio/virtio_user/vhost.h > index 668cc99f5..83a85cc6f 100644 > --- a/drivers/net/virtio/virtio_user/vhost.h > +++ b/drivers/net/virtio/virtio_user/vhost.h > @@ -88,7 +88,7 @@ struct virtio_user_backend_ops { > int enable); > }; > > -struct virtio_user_backend_ops ops_user; > -struct virtio_user_backend_ops ops_kernel; > +extern struct virtio_user_backend_ops virtio_ops_user; > +extern struct virtio_user_backend_ops virtio_ops_kernel; > > #endif > diff --git a/drivers/net/virtio/virtio_user/vhost_kernel.c > b/drivers/net/virtio/virtio_user/vhost_kernel.c > index b3bfcb76f..935b7f5fa 100644 > --- a/drivers/net/virtio/virtio_user/vhost_kernel.c > +++ b/drivers/net/virtio/virtio_user/vhost_kernel.c > @@ -361,7 +361,7 @@ vhost_kernel_enable_queue_pair(struct > virtio_user_dev *dev, > return 0; > } > > -struct virtio_user_backend_ops ops_kernel = { > +struct virtio_user_backend_ops virtio_ops_kernel = { > .setup = vhost_kernel_setup, > .send_request = vhost_kernel_ioctl, > .enable_qp = vhost_kernel_enable_queue_pair > diff --git a/drivers/net/virtio/virtio_user/vhost_user.c > b/drivers/net/virtio/virtio_user/vhost_user.c > index 8bd49610b..2c6eba0a6 100644 > --- a/drivers/net/virtio/virtio_user/vhost_user.c > +++ b/drivers/net/virtio/virtio_user/vhost_user.c > @@ -466,7 +466,7 @@ vhost_user_enable_queue_pair(struct > virtio_user_dev *dev, > return 0; > } > > -struct virtio_user_backend_ops ops_user = { > +struct virtio_user_backend_ops virtio_ops_user = { > .setup = vhost_user_setup, > .send_request = vhost_user_sock, > .enable_qp = vhost_user_enable_queue_pair > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c > b/drivers/net/virtio/virtio_user/virtio_user_dev.c > index 55a82e4b0..99a8209c4 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > @@ -338,12 +338,12 @@ virtio_user_dev_setup(struct virtio_user_dev > *dev) > PMD_DRV_LOG(ERR, "Server mode doesn't support > vhost-kernel!"); > return -1; > } > - dev->ops = &ops_user; > + dev->ops = &virtio_ops_user; > } else { > if (is_vhost_user_by_type(dev->path)) { > - dev->ops = &ops_user; > + dev->ops = &virtio_ops_user; > } else { > - dev->ops = &ops_kernel; > + dev->ops = &virtio_ops_kernel; > > dev->vhostfds = malloc(dev->max_queue_pairs * > sizeof(int)); > diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c > b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c > index 2787d3028..d2d84ab7e 100644 > --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c > +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c > @@ -34,10 +34,10 @@ static struct qdma_hw_queue_list qdma_queue_list > = TAILQ_HEAD_INITIALIZER(qdma_queue_list); > > /* QDMA Virtual Queues */ > -struct qdma_virt_queue *qdma_vqs; > +static struct qdma_virt_queue *qdma_vqs; > > /* QDMA per core data */ > -struct qdma_per_core_info qdma_core_info[RTE_MAX_LCORE]; > +static struct qdma_per_core_info qdma_core_info[RTE_MAX_LCORE]; > > static struct qdma_hw_queue * > alloc_hw_queue(uint32_t lcore_id) > diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c > b/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c > index f0939dc32..848e5183a 100644 > --- a/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c > +++ b/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c > @@ -104,14 +104,14 @@ static struct feature_info port_features[] = { > .resource_size = sizeof(struct feature_port_header), > .feature_index = PORT_FEATURE_ID_HEADER, > .revision_id = PORT_HEADER_REVISION, > - .ops = &port_hdr_ops, > + .ops = &ifpga_rawdev_port_hdr_ops, > }, > { > .name = PORT_FEATURE_ERR, > .resource_size = sizeof(struct feature_port_error), > .feature_index = PORT_FEATURE_ID_ERROR, > .revision_id = PORT_ERR_REVISION, > - .ops = &port_error_ops, > + .ops = &ifpga_rawdev_port_error_ops, > }, > { > .name = PORT_FEATURE_UMSG, > @@ -124,14 +124,14 @@ static struct feature_info port_features[] = { > .resource_size = sizeof(struct feature_port_uint), > .feature_index = PORT_FEATURE_ID_UINT, > .revision_id = PORT_UINT_REVISION, > - .ops = &port_uint_ops, > + .ops = &ifpga_rawdev_port_uint_ops, > }, > { > .name = PORT_FEATURE_STP, > .resource_size = PORT_FEATURE_STP_REGION_SIZE, > .feature_index = PORT_FEATURE_ID_STP, > .revision_id = PORT_STP_REVISION, > - .ops = &port_stp_ops, > + .ops = &ifpga_rawdev_port_stp_ops, > }, > { > .name = PORT_FEATURE_UAFU, > diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h > b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h > index 7a39a580c..4391f2fdf 100644 > --- a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h > +++ b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h > @@ -156,10 +156,10 @@ struct fpga_uafu_irq_set { > > int port_set_irq(struct ifpga_port_hw *port, u32 feature_id, void *irq_set); > > -extern struct feature_ops port_hdr_ops; > -extern struct feature_ops port_error_ops; > -extern struct feature_ops port_stp_ops; > -extern struct feature_ops port_uint_ops; > +extern struct feature_ops ifpga_rawdev_port_hdr_ops; > +extern struct feature_ops ifpga_rawdev_port_error_ops; > +extern struct feature_ops ifpga_rawdev_port_stp_ops; > +extern struct feature_ops ifpga_rawdev_port_uint_ops; > > /* help functions for feature ops */ > int fpga_msix_set_block(struct feature *feature, unsigned int start, > diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_port.c > b/drivers/raw/ifpga_rawdev/base/ifpga_port.c > index a962f5b45..8b5668d49 100644 > --- a/drivers/raw/ifpga_rawdev/base/ifpga_port.c > +++ b/drivers/raw/ifpga_rawdev/base/ifpga_port.c > @@ -326,7 +326,7 @@ static int port_hdr_set_prop(struct feature *feature, > struct feature_prop *prop) > return -ENOENT; > } > > -struct feature_ops port_hdr_ops = { > +struct feature_ops ifpga_rawdev_port_hdr_ops = { > .init = port_hdr_init, > .uinit = port_hdr_uinit, > .get_prop = port_hdr_get_prop, > @@ -354,7 +354,7 @@ static void port_stp_uinit(struct feature *feature) > dev_info(NULL, "port stp uinit.\n"); > } > > -struct feature_ops port_stp_ops = { > +struct feature_ops ifpga_rawdev_port_stp_ops = { > .init = port_stp_init, > .uinit = port_stp_uinit, > }; > @@ -382,7 +382,7 @@ static void port_uint_uinit(struct feature *feature) > dev_info(NULL, "PORT UINT UInit.\n"); > } > > -struct feature_ops port_uint_ops = { > +struct feature_ops ifpga_rawdev_port_uint_ops = { > .init = port_uint_init, > .uinit = port_uint_uinit, > }; > diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c > b/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c > index 23db562b8..9dd1cf590 100644 > --- a/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c > +++ b/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c > @@ -136,7 +136,7 @@ static int port_error_set_prop(struct feature > *feature, > return -ENOENT; > } > > -struct feature_ops port_error_ops = { > +struct feature_ops ifpga_rawdev_port_error_ops = { > .init = port_error_init, > .uinit = port_error_uinit, > .get_prop = port_error_get_prop, > diff --git a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c > b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c > index 6518a2d9a..d7630fc69 100644 > --- a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c > +++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c > @@ -32,7 +32,7 @@ > int skeleton_pmd_logtype; > > /* Count of instances */ > -uint16_t skeldev_init_once; > +static uint16_t skeldev_init_once; > > /**< Rawdev Skeleton dummy driver name */ > #define SKELETON_PMD_RAWDEV_NAME rawdev_skeleton > diff --git a/lib/librte_compressdev/rte_compressdev.c > b/lib/librte_compressdev/rte_compressdev.c > index 9091dd6ee..10101ebbe 100644 > --- a/lib/librte_compressdev/rte_compressdev.c > +++ b/lib/librte_compressdev/rte_compressdev.c > @@ -18,19 +18,15 @@ > #define RTE_COMPRESSDEV_DETACHED (0) > #define RTE_COMPRESSDEV_ATTACHED (1) > > -struct rte_compressdev rte_comp_devices[RTE_COMPRESS_MAX_DEVS]; > - > -struct rte_compressdev *rte_compressdevs = &rte_comp_devices[0]; > +static struct rte_compressdev > rte_comp_devices[RTE_COMPRESS_MAX_DEVS]; > > static struct rte_compressdev_global compressdev_globals = { > - .devs = &rte_comp_devices[0], > + .devs = rte_comp_devices, > .data = { NULL }, > .nb_devs = 0, > .max_devs = RTE_COMPRESS_MAX_DEVS > }; > > -struct rte_compressdev_global *rte_compressdev_globals = > &compressdev_globals; > - > const struct rte_compressdev_capabilities * __rte_experimental > rte_compressdev_capability_get(uint8_t dev_id, > enum rte_comp_algorithm algo) > @@ -78,7 +74,7 @@ rte_compressdev_get_feature_name(uint64_t flag) > static struct rte_compressdev * > rte_compressdev_get_dev(uint8_t dev_id) > { > - return &rte_compressdev_globals->devs[dev_id]; > + return &compressdev_globals.devs[dev_id]; > } > > struct rte_compressdev * __rte_experimental > @@ -90,8 +86,8 @@ rte_compressdev_pmd_get_named_dev(const char > *name) > if (name == NULL) > return NULL; > > - for (i = 0; i < rte_compressdev_globals->max_devs; i++) { > - dev = &rte_compressdev_globals->devs[i]; > + for (i = 0; i < compressdev_globals.max_devs; i++) { > + dev = &compressdev_globals.devs[i]; > > if ((dev->attached == RTE_COMPRESSDEV_ATTACHED) && > (strcmp(dev->data->name, name) == 0)) > @@ -106,7 +102,7 @@ rte_compressdev_is_valid_dev(uint8_t dev_id) > { > struct rte_compressdev *dev = NULL; > > - if (dev_id >= rte_compressdev_globals->nb_devs) > + if (dev_id >= compressdev_globals.nb_devs) > return 0; > > dev = rte_compressdev_get_dev(dev_id); > @@ -125,10 +121,10 @@ rte_compressdev_get_dev_id(const char *name) > if (name == NULL) > return -1; > > - for (i = 0; i < rte_compressdev_globals->nb_devs; i++) > - if ((strcmp(rte_compressdev_globals->devs[i].data->name, > name) > + for (i = 0; i < compressdev_globals.nb_devs; i++) > + if ((strcmp(compressdev_globals.devs[i].data->name, name) > == 0) && > - (rte_compressdev_globals->devs[i].attached > == > + (compressdev_globals.devs[i].attached == > > RTE_COMPRESSDEV_ATTACHED)) > return i; > > @@ -138,7 +134,7 @@ rte_compressdev_get_dev_id(const char *name) > uint8_t __rte_experimental > rte_compressdev_count(void) > { > - return rte_compressdev_globals->nb_devs; > + return compressdev_globals.nb_devs; > } > > uint8_t __rte_experimental > @@ -146,8 +142,8 @@ rte_compressdev_devices_get(const char > *driver_name, uint8_t *devices, > uint8_t nb_devices) > { > uint8_t i, count = 0; > - struct rte_compressdev *devs = rte_compressdev_globals->devs; > - uint8_t max_devs = rte_compressdev_globals->max_devs; > + struct rte_compressdev *devs = compressdev_globals.devs; > + uint8_t max_devs = compressdev_globals.max_devs; > > for (i = 0; i < max_devs && count < nb_devices; i++) { > > @@ -578,7 +574,7 @@ uint16_t __rte_experimental > rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, > struct rte_comp_op **ops, uint16_t nb_ops) > { > - struct rte_compressdev *dev = &rte_compressdevs[dev_id]; > + struct rte_compressdev *dev = &rte_comp_devices[dev_id]; > > nb_ops = (*dev->dequeue_burst) > (dev->data->queue_pairs[qp_id], ops, nb_ops); > @@ -590,7 +586,7 @@ uint16_t __rte_experimental > rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, > struct rte_comp_op **ops, uint16_t nb_ops) > { > - struct rte_compressdev *dev = &rte_compressdevs[dev_id]; > + struct rte_compressdev *dev = &rte_comp_devices[dev_id]; > > return (*dev->enqueue_burst)( > dev->data->queue_pairs[qp_id], ops, nb_ops); > diff --git a/lib/librte_compressdev/rte_compressdev_pmd.h > b/lib/librte_compressdev/rte_compressdev_pmd.h > index 38e9ea02b..043353c99 100644 > --- a/lib/librte_compressdev/rte_compressdev_pmd.h > +++ b/lib/librte_compressdev/rte_compressdev_pmd.h > @@ -51,11 +51,6 @@ struct rte_compressdev_global { > uint8_t max_devs; /**< Max number of devices */ > }; > > -/** Pointer to global array of comp devices */ > -extern struct rte_compressdev *rte_compressdevs; > -/** Pointer to global comp devices data structure */ > -extern struct rte_compressdev_global *rte_compressdev_globals; > - > /** > * Get the rte_compressdev structure device pointer for the named device. > * > diff --git a/lib/librte_cryptodev/rte_cryptodev.c > b/lib/librte_cryptodev/rte_cryptodev.c > index 63ae23f00..6c3c2a9cd 100644 > --- a/lib/librte_cryptodev/rte_cryptodev.c > +++ b/lib/librte_cryptodev/rte_cryptodev.c > @@ -43,19 +43,17 @@ > > static uint8_t nb_drivers; > > -struct rte_cryptodev rte_crypto_devices[RTE_CRYPTO_MAX_DEVS]; > +static struct rte_cryptodev rte_crypto_devices[RTE_CRYPTO_MAX_DEVS]; > > -struct rte_cryptodev *rte_cryptodevs = &rte_crypto_devices[0]; > +struct rte_cryptodev *rte_cryptodevs = rte_crypto_devices; > > static struct rte_cryptodev_global cryptodev_globals = { > - .devs = &rte_crypto_devices[0], > + .devs = rte_crypto_devices, > .data = { NULL }, > .nb_devs = 0, > .max_devs = RTE_CRYPTO_MAX_DEVS > }; > > -struct rte_cryptodev_global *rte_cryptodev_globals = &cryptodev_globals; > - > /* spinlock for crypto device callbacks */ > static rte_spinlock_t rte_cryptodev_cb_lock = RTE_SPINLOCK_INITIALIZER; > > @@ -486,7 +484,7 @@ rte_cryptodev_get_feature_name(uint64_t flag) > struct rte_cryptodev * > rte_cryptodev_pmd_get_dev(uint8_t dev_id) > { > - return &rte_cryptodev_globals->devs[dev_id]; > + return &cryptodev_globals.devs[dev_id]; > } > > struct rte_cryptodev * > @@ -498,8 +496,8 @@ rte_cryptodev_pmd_get_named_dev(const char > *name) > if (name == NULL) > return NULL; > > - for (i = 0; i < rte_cryptodev_globals->max_devs; i++) { > - dev = &rte_cryptodev_globals->devs[i]; > + for (i = 0; i < cryptodev_globals.max_devs; i++) { > + dev = &cryptodev_globals.devs[i]; > > if ((dev->attached == RTE_CRYPTODEV_ATTACHED) && > (strcmp(dev->data->name, name) == 0)) > @@ -514,7 +512,7 @@ rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id) > { > struct rte_cryptodev *dev = NULL; > > - if (dev_id >= rte_cryptodev_globals->nb_devs) > + if (dev_id >= cryptodev_globals.nb_devs) > return 0; > > dev = rte_cryptodev_pmd_get_dev(dev_id); > @@ -533,10 +531,10 @@ rte_cryptodev_get_dev_id(const char *name) > if (name == NULL) > return -1; > > - for (i = 0; i < rte_cryptodev_globals->nb_devs; i++) > - if ((strcmp(rte_cryptodev_globals->devs[i].data->name, > name) > + for (i = 0; i < cryptodev_globals.nb_devs; i++) > + if ((strcmp(cryptodev_globals.devs[i].data->name, name) > == 0) && > - (rte_cryptodev_globals->devs[i].attached == > + (cryptodev_globals.devs[i].attached == > > RTE_CRYPTODEV_ATTACHED)) > return i; > > @@ -546,7 +544,7 @@ rte_cryptodev_get_dev_id(const char *name) > uint8_t > rte_cryptodev_count(void) > { > - return rte_cryptodev_globals->nb_devs; > + return cryptodev_globals.nb_devs; > } > > uint8_t > @@ -554,9 +552,9 @@ rte_cryptodev_device_count_by_driver(uint8_t > driver_id) > { > uint8_t i, dev_count = 0; > > - for (i = 0; i < rte_cryptodev_globals->max_devs; i++) > - if (rte_cryptodev_globals->devs[i].driver_id == driver_id && > - rte_cryptodev_globals->devs[i].attached == > + for (i = 0; i < cryptodev_globals.max_devs; i++) > + if (cryptodev_globals.devs[i].driver_id == driver_id && > + cryptodev_globals.devs[i].attached == > RTE_CRYPTODEV_ATTACHED) > dev_count++; > > @@ -568,8 +566,8 @@ rte_cryptodev_devices_get(const char > *driver_name, uint8_t *devices, > uint8_t nb_devices) > { > uint8_t i, count = 0; > - struct rte_cryptodev *devs = rte_cryptodev_globals->devs; > - uint8_t max_devs = rte_cryptodev_globals->max_devs; > + struct rte_cryptodev *devs = cryptodev_globals.devs; > + uint8_t max_devs = cryptodev_globals.max_devs; > > for (i = 0; i < max_devs && count < nb_devices; i++) { > > diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h > b/lib/librte_cryptodev/rte_cryptodev_pmd.h > index 6ff49d64d..1b6cafd17 100644 > --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h > +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h > @@ -71,9 +71,6 @@ struct cryptodev_driver { > uint8_t id; > }; > > -/** pointer to global crypto devices data structure. */ > -extern struct rte_cryptodev_global *rte_cryptodev_globals; > - > /** > * Get the rte_cryptodev structure device pointer for the device. Assumes a > * valid device index. > diff --git a/lib/librte_eal/common/eal_common_bus.c > b/lib/librte_eal/common/eal_common_bus.c > index 0943851cc..c1334b9a2 100644 > --- a/lib/librte_eal/common/eal_common_bus.c > +++ b/lib/librte_eal/common/eal_common_bus.c > @@ -40,7 +40,7 @@ > > #include "eal_private.h" > > -struct rte_bus_list rte_bus_list = > +static struct rte_bus_list rte_bus_list = > TAILQ_HEAD_INITIALIZER(rte_bus_list); > > void > diff --git a/lib/librte_eal/common/eal_common_class.c > b/lib/librte_eal/common/eal_common_class.c > index 404a9065a..d922266d0 100644 > --- a/lib/librte_eal/common/eal_common_class.c > +++ b/lib/librte_eal/common/eal_common_class.c > @@ -9,7 +9,7 @@ > #include <rte_class.h> > #include <rte_debug.h> > > -struct rte_class_list rte_class_list = > +static struct rte_class_list rte_class_list = > TAILQ_HEAD_INITIALIZER(rte_class_list); > > __rte_experimental void > diff --git a/lib/librte_eal/common/eal_common_devargs.c > b/lib/librte_eal/common/eal_common_devargs.c > index 88afece10..020444de2 100644 > --- a/lib/librte_eal/common/eal_common_devargs.c > +++ b/lib/librte_eal/common/eal_common_devargs.c > @@ -25,7 +25,7 @@ > TAILQ_HEAD(rte_devargs_list, rte_devargs); > > /** Global list of user devices */ > -struct rte_devargs_list devargs_list = > +static struct rte_devargs_list devargs_list = > TAILQ_HEAD_INITIALIZER(devargs_list); > > int > diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c > b/lib/librte_eal/linuxapp/eal/eal_memalloc.c > index b2e2a9599..4dc98d2c7 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c > +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c > @@ -61,7 +61,7 @@ const int anonymous_hugepages_supported = > * and/or memfd with hugetlbfs, so we need to be able to adjust this flag at > * runtime, and fall back to anonymous memory. > */ > -int memfd_create_supported = > +static int memfd_create_supported = > #ifdef MFD_HUGETLB > #define MEMFD_SUPPORTED > 1; > diff --git a/lib/librte_ethdev/rte_class_eth.c > b/lib/librte_ethdev/rte_class_eth.c > index b6557db97..89a2d1a19 100644 > --- a/lib/librte_ethdev/rte_class_eth.c > +++ b/lib/librte_ethdev/rte_class_eth.c > @@ -72,7 +72,7 @@ eth_dev_iterate(const void *start, > return edev; > } > > -struct rte_class rte_class_eth = { > +static struct rte_class rte_class_eth = { > .dev_iterate = eth_dev_iterate, > }; > > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c > index ef99f7068..5d67a5eb2 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -4201,7 +4201,7 @@ enum rte_eth_switch_domain_state { > * RTE_MAX_ETHPORTS elements as there cannot be more active switch > domains than > * ethdev ports in a single process. > */ > -struct rte_eth_dev_switch { > +static struct rte_eth_dev_switch { > enum rte_eth_switch_domain_state state; > } rte_eth_switch_domains[RTE_MAX_ETHPORTS]; > > 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++) { > diff --git a/lib/librte_eventdev/rte_eventdev.c > b/lib/librte_eventdev/rte_eventdev.c > index 32c53199b..ebaf3087d 100644 > --- a/lib/librte_eventdev/rte_eventdev.c > +++ b/lib/librte_eventdev/rte_eventdev.c > @@ -35,22 +35,20 @@ > #include "rte_eventdev.h" > #include "rte_eventdev_pmd.h" > > -struct rte_eventdev rte_event_devices[RTE_EVENT_MAX_DEVS]; > +static struct rte_eventdev rte_event_devices[RTE_EVENT_MAX_DEVS]; > > -struct rte_eventdev *rte_eventdevs = &rte_event_devices[0]; > +struct rte_eventdev *rte_eventdevs = rte_event_devices; > > static struct rte_eventdev_global eventdev_globals = { > .nb_devs = 0 > }; > > -struct rte_eventdev_global *rte_eventdev_globals = &eventdev_globals; > - > /* Event dev north bound API implementation */ > > uint8_t > rte_event_dev_count(void) > { > - return rte_eventdev_globals->nb_devs; > + return eventdev_globals.nb_devs; > } > > int > @@ -62,7 +60,7 @@ rte_event_dev_get_dev_id(const char *name) > if (!name) > return -EINVAL; > > - for (i = 0; i < rte_eventdev_globals->nb_devs; i++) { > + for (i = 0; i < eventdev_globals.nb_devs; i++) { > cmp = (strncmp(rte_event_devices[i].data->name, name, > RTE_EVENTDEV_NAME_MAX_LEN) == 0) || > (rte_event_devices[i].dev ? (strncmp( > 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; > > /** > * Retrieve ethernet Rx adapter statistics. > diff --git a/lib/librte_net/net_crc_sse.h b/lib/librte_net/net_crc_sse.h > index da8152437..1c7b7a548 100644 > --- a/lib/librte_net/net_crc_sse.h > +++ b/lib/librte_net/net_crc_sse.h > @@ -21,8 +21,8 @@ struct crc_pclmulqdq_ctx { > __m128i rk7_rk8; > }; > > -struct crc_pclmulqdq_ctx crc32_eth_pclmulqdq __rte_aligned(16); > -struct crc_pclmulqdq_ctx crc16_ccitt_pclmulqdq __rte_aligned(16); > +static struct crc_pclmulqdq_ctx crc32_eth_pclmulqdq __rte_aligned(16); > +static struct crc_pclmulqdq_ctx crc16_ccitt_pclmulqdq __rte_aligned(16); > /** > * @brief Performs one folding round > * > diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c > index 62b6b97ef..9f1e3592d 100644 > --- a/lib/librte_rawdev/rte_rawdev.c > +++ b/lib/librte_rawdev/rte_rawdev.c > @@ -35,21 +35,19 @@ > /* dynamic log identifier */ > int librawdev_logtype; > > -struct rte_rawdev rte_rawdevices[RTE_RAWDEV_MAX_DEVS]; > +static struct rte_rawdev rte_rawdevices[RTE_RAWDEV_MAX_DEVS]; > > -struct rte_rawdev *rte_rawdevs = &rte_rawdevices[0]; > +struct rte_rawdev *rte_rawdevs = rte_rawdevices; > > static struct rte_rawdev_global rawdev_globals = { > .nb_devs = 0 > }; > > -struct rte_rawdev_global *rte_rawdev_globals = &rawdev_globals; > - > /* Raw device, northbound API implementation */ > uint8_t > rte_rawdev_count(void) > { > - return rte_rawdev_globals->nb_devs; > + return rawdev_globals.nb_devs; > } > > uint16_t > @@ -60,7 +58,7 @@ rte_rawdev_get_dev_id(const char *name) > if (!name) > return -EINVAL; > > - for (i = 0; i < rte_rawdev_globals->nb_devs; i++) > + for (i = 0; i < rawdev_globals.nb_devs; i++) > if ((strcmp(rte_rawdevices[i].name, name) > == 0) && > (rte_rawdevices[i].attached ==