@@ -41,10 +41,10 @@
#include <of.h>
#include <netcfg.h>
-int dpaa_logtype_bus;
-int dpaa_logtype_mempool;
-int dpaa_logtype_pmd;
-int dpaa_logtype_eventdev;
+int dpaa_logtype_bus __rte_read_mostly;
+int dpaa_logtype_mempool __rte_read_mostly;
+int dpaa_logtype_pmd __rte_read_mostly;
+int dpaa_logtype_eventdev __rte_read_mostly;
struct rte_dpaa_bus rte_dpaa_bus;
struct netcfg_info *dpaa_netcfg;
@@ -20,7 +20,7 @@
#include <fslmc_vfio.h>
#include "fslmc_logs.h"
-int dpaa2_logtype_bus;
+int dpaa2_logtype_bus __rte_read_mostly;
#define VFIO_IOMMU_GROUP_PATH "/sys/kernel/iommu_groups"
@@ -23,7 +23,7 @@
#include "rte_bus_vdev.h"
#include "vdev_logs.h"
-int vdev_logtype_bus;
+int vdev_logtype_bus __rte_read_mostly;
/* Forward declare to access virtual bus name */
static struct rte_bus rte_vdev_bus;
@@ -59,7 +59,7 @@ struct mbox_ram_hdr {
};
};
-int octeontx_logtype_mbox;
+int octeontx_logtype_mbox __rte_read_mostly;
RTE_INIT(otx_init_log);
static void
@@ -56,7 +56,7 @@ enum rta_sec_era rta_sec_era = RTA_SEC_ERA_8;
static uint8_t cryptodev_driver_id;
-int dpaa2_logtype_sec;
+int dpaa2_logtype_sec __rte_read_mostly;
static inline int
build_proto_fd(dpaa2_sec_session *sess,
@@ -48,7 +48,7 @@
*/
/* Dynamic logging identified for mempool */
-int dpaa2_logtype_event;
+int dpaa2_logtype_event __rte_read_mostly;
static uint16_t
dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[],
@@ -20,7 +20,7 @@
#include "ssovf_evdev.h"
#include "timvf_evdev.h"
-int otx_logtype_ssovf;
+int otx_logtype_ssovf __rte_read_mostly;
static uint8_t timvf_enable_stats;
RTE_INIT(otx_ssovf_init_log);
@@ -5,7 +5,7 @@
#include "timvf_evdev.h"
-int otx_logtype_timvf;
+int otx_logtype_timvf __rte_read_mostly;
RTE_INIT(otx_timvf_init_log);
static void
@@ -30,7 +30,7 @@
#define OPDL_OPA_MASK (0xFF)
#define OPDL_OPA_OFFSET (0x38)
-int opdl_logtype_driver;
+int opdl_logtype_driver __rte_read_mostly;
/* Types of dependency between stages */
enum dep_type {
@@ -949,7 +949,7 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
SCHED_QUANTA_ARG "=<int>" CREDIT_QUANTA_ARG "=<int>");
/* declared extern in header, for access from other .c files */
-int eventdev_sw_log_level;
+int eventdev_sw_log_level __rte_read_mostly;
RTE_INIT(evdev_sw_init_log);
static void
@@ -33,7 +33,7 @@ struct dpaa2_bp_info rte_dpaa2_bpid_info[MAX_BPID];
static struct dpaa2_bp_list *h_bp_list;
/* Dynamic logging identified for mempool */
-int dpaa2_logtype_mempool;
+int dpaa2_logtype_mempool __rte_read_mostly;
static int
rte_hw_mbuf_create_pool(struct rte_mempool *mp)
@@ -105,8 +105,8 @@ struct octeontx_fpadev {
static struct octeontx_fpadev fpadev;
-int octeontx_logtype_fpavf;
-int octeontx_logtype_fpavf_mbox;
+int octeontx_logtype_fpavf __rte_read_mostly;
+int octeontx_logtype_fpavf_mbox __rte_read_mostly;
RTE_INIT(otx_pool_init_log);
static void
@@ -72,8 +72,8 @@ static int avf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev,
static int avf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev,
uint16_t queue_id);
-int avf_logtype_init;
-int avf_logtype_driver;
+int avf_logtype_init __rte_read_mostly;
+int avf_logtype_driver __rte_read_mostly;
static const struct rte_pci_id pci_id_avf_map[] = {
{ RTE_PCI_DEVICE(AVF_INTEL_VENDOR_ID, AVF_DEV_ID_ADAPTIVE_VF) },
@@ -32,7 +32,7 @@
#include "avp_logs.h"
-int avp_logtype_driver;
+int avp_logtype_driver __rte_read_mostly;
static int avp_dev_create(struct rte_pci_device *pci_dev,
struct rte_eth_dev *eth_dev);
@@ -32,8 +32,8 @@ static void axgbe_dev_info_get(struct rte_eth_dev *dev,
#define AMD_PCI_AXGBE_DEVICE_V2A 0x1458
#define AMD_PCI_AXGBE_DEVICE_V2B 0x1459
-int axgbe_logtype_init;
-int axgbe_logtype_driver;
+int axgbe_logtype_init __rte_read_mostly;
+int axgbe_logtype_driver __rte_read_mostly;
static const struct rte_pci_id pci_id_axgbe_map[] = {
{RTE_PCI_DEVICE(AMD_PCI_VENDOR_ID, AMD_PCI_AXGBE_DEVICE_V2A)},
@@ -14,8 +14,8 @@
#include <rte_dev.h>
#include <rte_ethdev_pci.h>
-int bnx2x_logtype_init;
-int bnx2x_logtype_driver;
+int bnx2x_logtype_init __rte_read_mostly;
+int bnx2x_logtype_driver __rte_read_mostly;
/*
* The set of PCI devices this driver supports
@@ -30,7 +30,7 @@
#define DRV_MODULE_NAME "bnxt"
static const char bnxt_version[] =
"Broadcom Cumulus driver " DRV_MODULE_NAME "\n";
-int bnxt_logtype_driver;
+int bnxt_logtype_driver __rte_read_mostly;
#define PCI_VENDOR_ID_BROADCOM 0x14E4
@@ -57,7 +57,7 @@ static int dpaa2_dev_set_link_up(struct rte_eth_dev *dev);
static int dpaa2_dev_set_link_down(struct rte_eth_dev *dev);
static int dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
-int dpaa2_logtype_pmd;
+int dpaa2_logtype_pmd __rte_read_mostly;
static int
dpaa2_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
@@ -106,8 +106,8 @@ static int eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
static enum e1000_fc_mode em_fc_setting = e1000_fc_full;
-int e1000_logtype_init;
-int e1000_logtype_driver;
+int e1000_logtype_init __rte_read_mostly;
+int e1000_logtype_driver __rte_read_mostly;
/*
* The set of PCI devices this driver supports
@@ -186,8 +186,8 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
#define ENA_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ ENA_TX_OFFLOAD_MASK)
-int ena_logtype_init;
-int ena_logtype_driver;
+int ena_logtype_init __rte_read_mostly;
+int ena_logtype_driver __rte_read_mostly;
static const struct rte_pci_id pci_id_ena_map[] = {
{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) },
@@ -20,8 +20,8 @@
#include "vnic_enet.h"
#include "enic.h"
-int enicpmd_logtype_init;
-int enicpmd_logtype_flow;
+int enicpmd_logtype_init __rte_read_mostly;
+int enicpmd_logtype_flow __rte_read_mostly;
#define PMD_INIT_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, enicpmd_logtype_init, \
@@ -40,8 +40,8 @@
#define GLORT_FD_MASK GLORT_PF_MASK
#define GLORT_FD_INDEX GLORT_FD_Q_BASE
-int fm10k_logtype_init;
-int fm10k_logtype_driver;
+int fm10k_logtype_init __rte_read_mostly;
+int fm10k_logtype_driver __rte_read_mostly;
static void fm10k_close_mbx_service(struct fm10k_hw *hw);
static void fm10k_dev_promiscuous_enable(struct rte_eth_dev *dev);
@@ -392,8 +392,8 @@ static void i40e_tunnel_filter_restore(struct i40e_pf *pf);
static void i40e_filter_restore(struct i40e_pf *pf);
static void i40e_notify_all_vfs_link_status(struct rte_eth_dev *dev);
-int i40e_logtype_init;
-int i40e_logtype_driver;
+int i40e_logtype_init __rte_read_mostly;
+int i40e_logtype_driver __rte_read_mostly;
static const struct rte_pci_id pci_id_i40e_map[] = {
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
@@ -400,8 +400,8 @@ static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
(r) = (h)->bitmap[idx] >> bit & 1;\
} while (0)
-int ixgbe_logtype_init;
-int ixgbe_logtype_driver;
+int ixgbe_logtype_init __rte_read_mostly;
+int ixgbe_logtype_driver __rte_read_mostly;
/*
* The set of PCI devices this driver supports
@@ -14,8 +14,8 @@
#include "lio_ethdev.h"
#include "lio_rxtx.h"
-int lio_logtype_init;
-int lio_logtype_driver;
+int lio_logtype_init __rte_read_mostly;
+int lio_logtype_driver __rte_read_mostly;
/* Default RSS key in use */
static uint8_t lio_rss_key[40] = {
@@ -82,7 +82,7 @@
#endif
/** Driver-specific log messages type. */
-int mlx5_logtype;
+int mlx5_logtype __rte_read_mostly;
/**
* Retrieve integer value from environment variable.
@@ -3307,8 +3307,8 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
return ret;
}
-int nfp_logtype_init;
-int nfp_logtype_driver;
+int nfp_logtype_init __rte_read_mostly;
+int nfp_logtype_driver __rte_read_mostly;
static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
{
@@ -42,9 +42,9 @@ enum octeontx_link_speed {
OCTEONTX_LINK_SPEED_RESERVE2
};
-int otx_net_logtype_mbox;
-int otx_net_logtype_init;
-int otx_net_logtype_driver;
+int otx_net_logtype_mbox __rte_read_mostly;
+int otx_net_logtype_init __rte_read_mostly;
+int otx_net_logtype_driver __rte_read_mostly;
RTE_INIT(otx_net_init_log);
static void
@@ -12,8 +12,8 @@
#include <rte_kvargs.h>
/* Globals */
-int qede_logtype_init;
-int qede_logtype_driver;
+int qede_logtype_init __rte_read_mostly;
+int qede_logtype_driver __rte_read_mostly;
static const struct qed_eth_ops *qed_ops;
static int64_t timer_period = 1;
@@ -27,7 +27,7 @@
#include "sfc_dp.h"
#include "sfc_dp_rx.h"
-uint32_t sfc_logtype_driver;
+uint32_t sfc_logtype_driver __rte_read_mostly;
static struct sfc_dp_list sfc_dp_head =
TAILQ_HEAD_INITIALIZER(sfc_dp_head);
@@ -102,8 +102,8 @@ struct szedata2_tx_queue {
volatile uint64_t err_pkts;
};
-int szedata2_logtype_init;
-int szedata2_logtype_driver;
+int szedata2_logtype_init __rte_read_mostly;
+int szedata2_logtype_driver __rte_read_mostly;
static struct ether_addr eth_addr = {
.addr_bytes = { 0x00, 0x11, 0x17, 0x00, 0x00, 0x00 }
@@ -42,9 +42,9 @@
#include "nicvf_svf.h"
#include "nicvf_logs.h"
-int nicvf_logtype_mbox;
-int nicvf_logtype_init;
-int nicvf_logtype_driver;
+int nicvf_logtype_mbox __rte_read_mostly;
+int nicvf_logtype_init __rte_read_mostly;
+int nicvf_logtype_driver __rte_read_mostly;
static void nicvf_dev_stop(struct rte_eth_dev *dev);
static void nicvf_dev_stop_cleanup(struct rte_eth_dev *dev, bool cleanup);
@@ -79,8 +79,8 @@ static int virtio_dev_queue_stats_mapping_set(
uint8_t stat_idx,
uint8_t is_rx);
-int virtio_logtype_init;
-int virtio_logtype_driver;
+int virtio_logtype_init __rte_read_mostly;
+int virtio_logtype_driver __rte_read_mostly;
static void virtio_notify_peers(struct rte_eth_dev *dev);
static void virtio_ack_link_announce(struct rte_eth_dev *dev);
@@ -76,8 +76,8 @@ static int vmxnet3_mac_addr_set(struct rte_eth_dev *dev,
struct ether_addr *mac_addr);
static void vmxnet3_interrupt_handler(void *param);
-int vmxnet3_logtype_init;
-int vmxnet3_logtype_driver;
+int vmxnet3_logtype_init __rte_read_mostly;
+int vmxnet3_logtype_driver __rte_read_mostly;
/*
* The set of PCI devices this driver supports
@@ -29,7 +29,7 @@
#include "skeleton_rawdev.h"
/* Dynamic log type identifier */
-int skeleton_pmd_logtype;
+int skeleton_pmd_logtype __rte_read_mostly;
/* Count of instances */
uint16_t skeldev_init_once;
@@ -14,7 +14,7 @@
#include "rte_member_ht.h"
#include "rte_member_vbf.h"
-int librte_member_logtype;
+int librte_member_logtype __rte_read_mostly;
TAILQ_HEAD(rte_member_list, rte_tailq_entry);
static struct rte_tailq_elem rte_member_tailq = {
@@ -33,7 +33,7 @@
#include "rte_rawdev_pmd.h"
/* dynamic log identifier */
-int librawdev_logtype;
+int librawdev_logtype __rte_read_mostly;
struct rte_rawdev rte_rawdevices[RTE_RAWDEV_MAX_DEVS];