A constructor is usually declared with RTE_INIT* macros.
As it is a static function, no need to declare before its definition.
The macro is used directly in the function definition.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
#define EVT_TEST_REGISTER(nm) \
static struct evt_test_entry _evt_test_entry_ ##nm; \
-RTE_INIT(evt_test_ ##nm); \
-static void evt_test_ ##nm(void) \
+RTE_INIT(evt_test_ ##nm) \
{ \
_evt_test_entry_ ##nm.test.name = RTE_STR(nm);\
memcpy(&_evt_test_entry_ ##nm.test.ops, &nm, \
BBDEV_NULL_SOCKET_ID_ARG"=<int>");
RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_null);
-RTE_INIT(null_bbdev_init_log);
-static void
-null_bbdev_init_log(void)
+RTE_INIT(null_bbdev_init_log)
{
bbdev_null_logtype = rte_log_register("pmd.bb.null");
if (bbdev_null_logtype >= 0)
TURBO_SW_SOCKET_ID_ARG"=<int>");
RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, turbo_sw);
-RTE_INIT(null_bbdev_init_log);
-static void
-null_bbdev_init_log(void)
+RTE_INIT(turbo_sw_bbdev_init_log)
{
bbdev_turbo_sw_logtype = rte_log_register("pmd.bb.turbo_sw");
if (bbdev_turbo_sw_logtype >= 0)
RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus);
-RTE_INIT(dpaa_init_log);
-static void
-dpaa_init_log(void)
+RTE_INIT(dpaa_init_log)
{
dpaa_logtype_bus = rte_log_register("bus.dpaa");
if (dpaa_logtype_bus >= 0)
/** Helper for DPAA device registration from driver (eth, crypto) instance */
#define RTE_PMD_REGISTER_DPAA(nm, dpaa_drv) \
-RTE_INIT(dpaainitfn_ ##nm); \
-static void dpaainitfn_ ##nm(void) \
+RTE_INIT(dpaainitfn_ ##nm) \
{\
(dpaa_drv).driver.name = RTE_STR(nm);\
rte_dpaa_driver_register(&dpaa_drv); \
RTE_REGISTER_BUS(FSLMC_BUS_NAME, rte_fslmc_bus.bus);
-RTE_INIT(fslmc_init_log);
-static void
-fslmc_init_log(void)
+RTE_INIT(fslmc_init_log)
{
/* Bus level logs */
dpaa2_logtype_bus = rte_log_register("bus.fslmc");
/** Helper for DPAA2 device registration from driver (eth, crypto) instance */
#define RTE_PMD_REGISTER_DPAA2(nm, dpaa2_drv) \
-RTE_INIT(dpaa2initfn_ ##nm); \
-static void dpaa2initfn_ ##nm(void) \
+RTE_INIT(dpaa2initfn_ ##nm) \
{\
(dpaa2_drv).driver.name = RTE_STR(nm);\
rte_fslmc_driver_register(&dpaa2_drv); \
/** Helper for DPAA2 object registration */
#define RTE_PMD_REGISTER_DPAA2_OBJECT(nm, dpaa2_obj) \
-RTE_INIT(dpaa2objinitfn_ ##nm); \
-static void dpaa2objinitfn_ ##nm(void) \
+RTE_INIT(dpaa2objinitfn_ ##nm) \
{\
(dpaa2_obj).name = RTE_STR(nm);\
rte_fslmc_object_register(&dpaa2_obj); \
void rte_ifpga_driver_unregister(struct rte_afu_driver *driver);
#define RTE_PMD_REGISTER_AFU(nm, afudrv)\
-RTE_INIT(afudrvinitfn_ ##afudrv);\
static const char *afudrvinit_ ## nm ## _alias;\
-static void afudrvinitfn_ ##afudrv(void)\
+RTE_INIT(afudrvinitfn_ ##afudrv)\
{\
(afudrv).driver.name = RTE_STR(nm);\
(afudrv).driver.alias = afudrvinit_ ## nm ## _alias;\
/** Helper for PCI device registration from driver (eth, crypto) instance */
#define RTE_PMD_REGISTER_PCI(nm, pci_drv) \
-RTE_INIT(pciinitfn_ ##nm); \
-static void pciinitfn_ ##nm(void) \
+RTE_INIT(pciinitfn_ ##nm) \
{\
(pci_drv).driver.name = RTE_STR(nm);\
rte_pci_register(&pci_drv); \
void rte_vdev_unregister(struct rte_vdev_driver *driver);
#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
-RTE_INIT(vdrvinitfn_ ##vdrv);\
static const char *vdrvinit_ ## nm ## _alias;\
-static void vdrvinitfn_ ##vdrv(void)\
+RTE_INIT(vdrvinitfn_ ##vdrv)\
{\
(vdrv).driver.name = RTE_STR(nm);\
(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
int octeontx_logtype_mbox;
-RTE_INIT(otx_init_log);
-static void
-otx_init_log(void)
+RTE_INIT(otx_init_log)
{
octeontx_logtype_mbox = rte_log_register("pmd.octeontx.mbox");
if (octeontx_logtype_mbox >= 0)
return 0;
}
-RTE_INIT(qat_pci_init_log);
-static void
-qat_pci_init_log(void)
+RTE_INIT(qat_pci_init_log)
{
/* Non-data-path logging for pci device and all services */
qat_gen_logtype = rte_log_register("pmd.qat_general");
RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
"socket_id=<int>");
-RTE_INIT(isal_init_log);
-
-static void
-isal_init_log(void)
+RTE_INIT(isal_init_log)
{
isal_logtype_driver = rte_log_register("comp_isal");
if (isal_logtype_driver >= 0)
cryptodev_driver_id);
-RTE_INIT(aesni_gcm_init_log);
-static void
-aesni_gcm_init_log(void)
+RTE_INIT(aesni_gcm_init_log)
{
aesni_gcm_logtype_driver = rte_log_register("pmd.crypto.aesni_gcm");
-
}
cryptodev_aesni_mb_pmd_drv.driver,
cryptodev_driver_id);
-RTE_INIT(aesni_mb_init_log);
-static void
-aesni_mb_init_log(void)
+RTE_INIT(aesni_mb_init_log)
{
aesni_mb_logtype_driver = rte_log_register("pmd.crypto.aesni_mb");
}
RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa2_sec_crypto_drv,
rte_dpaa2_sec_driver.driver, cryptodev_driver_id);
-RTE_INIT(dpaa2_sec_init_log);
-static void
-dpaa2_sec_init_log(void)
+RTE_INIT(dpaa2_sec_init_log)
{
/* Bus level logs */
dpaa2_logtype_sec = rte_log_register("pmd.crypto.dpaa2");
RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa_sec_crypto_drv, rte_dpaa_sec_driver.driver,
cryptodev_driver_id);
-RTE_INIT(dpaa_sec_init_log);
-static void
-dpaa_sec_init_log(void)
+RTE_INIT(dpaa_sec_init_log)
{
dpaa_logtype_sec = rte_log_register("pmd.crypto.dpaa");
if (dpaa_logtype_sec >= 0)
RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
-RTE_INIT(kasumi_init_log);
-static void
-kasumi_init_log(void)
+RTE_INIT(kasumi_init_log)
{
kasumi_logtype_driver = rte_log_register("pmd.crypto.kasumi");
}
RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
cryptodev_driver_id);
-RTE_INIT(null_init_log);
-static void
-null_init_log(void)
+RTE_INIT(null_init_log)
{
null_logtype_driver = rte_log_register("pmd.crypto.null");
}
RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
-RTE_INIT(openssl_init_log);
-static void
-openssl_init_log(void)
+RTE_INIT(openssl_init_log)
{
openssl_logtype_driver = rte_log_register("pmd.crypto.openssl");
}
return (*sched_ctx->ops.option_get)(dev, option_type, option);
}
-RTE_INIT(scheduler_init_log);
-
-static void
-scheduler_init_log(void)
+RTE_INIT(scheduler_init_log)
{
scheduler_logtype_driver = rte_log_register("pmd.crypto.scheduler");
}
RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
-RTE_INIT(snow3g_init_log);
-static void
-snow3g_init_log(void)
+RTE_INIT(snow3g_init_log)
{
snow3g_logtype_driver = rte_log_register("pmd.crypto.snow3g");
}
rte_virtio_crypto_driver.driver,
cryptodev_virtio_driver_id);
-RTE_INIT(virtio_crypto_init_log);
-static void
-virtio_crypto_init_log(void)
+RTE_INIT(virtio_crypto_init_log)
{
virtio_crypto_logtype_init = rte_log_register("pmd.crypto.virtio.init");
if (virtio_crypto_logtype_init >= 0)
RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
cryptodev_driver_id);
-RTE_INIT(zuc_init_log);
-static void
-zuc_init_log(void)
+RTE_INIT(zuc_init_log)
{
zuc_logtype_driver = rte_log_register("pmd.crypto.zuc");
}
RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-RTE_INIT(dpaa2_eventdev_init_log);
-static void
-dpaa2_eventdev_init_log(void)
+RTE_INIT(dpaa2_eventdev_init_log)
{
dpaa2_logtype_event = rte_log_register("pmd.event.dpaa2");
if (dpaa2_logtype_event >= 0)
int otx_logtype_ssovf;
static uint8_t timvf_enable_stats;
-RTE_INIT(otx_ssovf_init_log);
-static void
-otx_ssovf_init_log(void)
+RTE_INIT(otx_ssovf_init_log)
{
otx_logtype_ssovf = rte_log_register("pmd.event.octeontx");
if (otx_logtype_ssovf >= 0)
int otx_logtype_timvf;
-RTE_INIT(otx_timvf_init_log);
-static void
-otx_timvf_init_log(void)
+RTE_INIT(otx_timvf_init_log)
{
otx_logtype_timvf = rte_log_register("pmd.event.octeontx.timer");
if (otx_logtype_timvf >= 0)
.remove = opdl_remove
};
-RTE_INIT(opdl_init_log);
-
-static void
-opdl_init_log(void)
+RTE_INIT(opdl_init_log)
{
opdl_logtype_driver = rte_log_register("pmd.event.opdl.driver");
if (opdl_logtype_driver >= 0)
/* declared extern in header, for access from other .c files */
int eventdev_sw_log_level;
-RTE_INIT(evdev_sw_init_log);
-static void
-evdev_sw_init_log(void)
+RTE_INIT(evdev_sw_init_log)
{
eventdev_sw_log_level = rte_log_register("pmd.event.sw");
if (eventdev_sw_log_level >= 0)
MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
-RTE_INIT(dpaa2_mempool_init_log);
-static void
-dpaa2_mempool_init_log(void)
+RTE_INIT(dpaa2_mempool_init_log)
{
dpaa2_logtype_mempool = rte_log_register("mempool.dpaa2");
if (dpaa2_logtype_mempool >= 0)
int octeontx_logtype_fpavf;
int octeontx_logtype_fpavf_mbox;
-RTE_INIT(otx_pool_init_log);
-static void
-otx_pool_init_log(void)
+RTE_INIT(otx_pool_init_log)
{
octeontx_logtype_fpavf = rte_log_register("pmd.mempool.octeontx");
if (octeontx_logtype_fpavf >= 0)
"framecnt=<int> "
"qdisc_bypass=<0|1>");
-RTE_INIT(af_packet_init_log);
-static void
-af_packet_init_log(void)
+RTE_INIT(af_packet_init_log)
{
af_packet_logtype = rte_log_register("pmd.net.packet");
if (af_packet_logtype >= 0)
RTE_PMD_REGISTER_PCI(net_avf, rte_avf_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_avf, pci_id_avf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_avf, "* igb_uio | vfio-pci");
-RTE_INIT(avf_init_log);
-static void
-avf_init_log(void)
+RTE_INIT(avf_init_log)
{
avf_logtype_init = rte_log_register("pmd.net.avf.init");
if (avf_logtype_init >= 0)
RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
-RTE_INIT(avp_init_log);
-static void
-avp_init_log(void)
+RTE_INIT(avp_init_log)
{
avp_logtype_driver = rte_log_register("pmd.net.avp.driver");
if (avp_logtype_driver >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map);
RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_INIT(axgbe_init_log);
-static void
-axgbe_init_log(void)
+RTE_INIT(axgbe_init_log)
{
axgbe_logtype_init = rte_log_register("pmd.net.axgbe.init");
if (axgbe_logtype_init >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
-RTE_INIT(bnx2x_init_log);
-static void
-bnx2x_init_log(void)
+RTE_INIT(bnx2x_init_log)
{
bnx2x_logtype_init = rte_log_register("pmd.net.bnx2x.init");
if (bnx2x_logtype_init >= 0)
return is_device_supported(dev, &bnxt_rte_pmd);
}
-RTE_INIT(bnxt_init_log);
-static void
-bnxt_init_log(void)
+RTE_INIT(bnxt_init_log)
{
bnxt_logtype_driver = rte_log_register("pmd.bnxt.driver");
if (bnxt_logtype_driver >= 0)
int bond_logtype;
-RTE_INIT(bond_init_log);
-static void
-bond_init_log(void)
+RTE_INIT(bond_init_log)
{
bond_logtype = rte_log_register("pmd.net.bon");
if (bond_logtype >= 0)
RTE_PMD_REGISTER_DPAA2(net_dpaa2, rte_dpaa2_pmd);
-RTE_INIT(dpaa2_pmd_init_log);
-static void
-dpaa2_pmd_init_log(void)
+RTE_INIT(dpaa2_pmd_init_log)
{
dpaa2_logtype_pmd = rte_log_register("pmd.net.dpaa2");
if (dpaa2_logtype_pmd >= 0)
RTE_PMD_REGISTER_KMOD_DEP(net_e1000_em, "* igb_uio | uio_pci_generic | vfio-pci");
/* see e1000_logs.c */
-RTE_INIT(igb_init_log);
-static void
-igb_init_log(void)
+RTE_INIT(igb_init_log)
{
e1000_igb_init_log();
}
RTE_PMD_REGISTER_KMOD_DEP(net_e1000_igb_vf, "* igb_uio | vfio-pci");
/* see e1000_logs.c */
-RTE_INIT(e1000_init_log);
-static void
-e1000_init_log(void)
+RTE_INIT(e1000_init_log)
{
e1000_igb_init_log();
}
RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_INIT(ena_init_log);
-static void
-ena_init_log(void)
+RTE_INIT(ena_init_log)
{
ena_logtype_init = rte_log_register("pmd.net.ena.init");
if (ena_logtype_init >= 0)
#define ENIC_DEVARG_DISABLE_OVERLAY "disable-overlay"
#define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
-RTE_INIT(enicpmd_init_log);
-static void
-enicpmd_init_log(void)
+RTE_INIT(enicpmd_init_log)
{
enicpmd_logtype_init = rte_log_register("pmd.net.enic.init");
if (enicpmd_logtype_init >= 0)
RTE_PMD_REGISTER_VDEV(net_failsafe, failsafe_drv);
RTE_PMD_REGISTER_PARAM_STRING(net_failsafe, PMD_FAILSAFE_PARAM_STRING);
-RTE_INIT(failsafe_init_log);
-static void
-failsafe_init_log(void)
+RTE_INIT(failsafe_init_log)
{
failsafe_logtype = rte_log_register("pmd.net.failsafe");
if (failsafe_logtype >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_INIT(fm10k_init_log);
-static void
-fm10k_init_log(void)
+RTE_INIT(fm10k_init_log)
{
fm10k_logtype_init = rte_log_register("pmd.net.fm10k.init");
if (fm10k_logtype_init >= 0)
return 0;
}
-RTE_INIT(i40e_init_log);
-static void
-i40e_init_log(void)
+RTE_INIT(i40e_init_log)
{
i40e_logtype_init = rte_log_register("pmd.net.i40e.init");
if (i40e_logtype_init >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_ifcvf, pci_id_ifcvf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_ifcvf, "* vfio-pci");
-RTE_INIT(ifcvf_vdpa_init_log);
-static void
-ifcvf_vdpa_init_log(void)
+RTE_INIT(ifcvf_vdpa_init_log)
{
ifcvf_vdpa_logtype = rte_log_register("pmd.net.ifcvf_vdpa");
if (ifcvf_vdpa_logtype >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
-RTE_INIT(ixgbe_init_log);
-static void
-ixgbe_init_log(void)
+RTE_INIT(ixgbe_init_log)
{
ixgbe_logtype_init = rte_log_register("pmd.net.ixgbe.init");
if (ixgbe_logtype_init >= 0)
RTE_PMD_REGISTER_VDEV(net_kni, eth_kni_drv);
RTE_PMD_REGISTER_PARAM_STRING(net_kni, ETH_KNI_NO_REQUEST_THREAD_ARG "=<int>");
-RTE_INIT(eth_kni_init_log);
-static void
-eth_kni_init_log(void)
+RTE_INIT(eth_kni_init_log)
{
eth_kni_logtype = rte_log_register("pmd.net.kni");
if (eth_kni_logtype >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
-RTE_INIT(lio_init_log);
-static void
-lio_init_log(void)
+RTE_INIT(lio_init_log)
{
lio_logtype_init = rte_log_register("pmd.net.liquidio.init");
if (lio_logtype_init >= 0)
/**
* Driver initialization routine.
*/
-RTE_INIT(rte_mlx4_pmd_init);
-static void
-rte_mlx4_pmd_init(void)
+RTE_INIT(rte_mlx4_pmd_init)
{
/*
* MLX4_DEVICE_FATAL_CLEANUP tells ibv_destroy functions we
/**
* Driver initialization routine.
*/
-RTE_INIT(rte_mlx5_pmd_init);
-static void
-rte_mlx5_pmd_init(void)
+RTE_INIT(rte_mlx5_pmd_init)
{
/* Initialize driver log type. */
mlx5_logtype = rte_log_register("pmd.net.mlx5");
RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv);
RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2);
-RTE_INIT(mrvl_init_log);
-static void
-mrvl_init_log(void)
+RTE_INIT(mrvl_init_log)
{
mrvl_logtype = rte_log_register("pmd.net.mvpp2");
if (mrvl_logtype >= 0)
RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
-RTE_INIT(nfp_init_log);
-static void
-nfp_init_log(void)
+RTE_INIT(nfp_init_log)
{
nfp_logtype_init = rte_log_register("pmd.net.nfp.init");
if (nfp_logtype_init >= 0)
"size=<int> "
"copy=<int>");
-RTE_INIT(eth_null_init_log);
-static void
-eth_null_init_log(void)
+RTE_INIT(eth_null_init_log)
{
eth_null_logtype = rte_log_register("pmd.net.null");
if (eth_null_logtype >= 0)
int otx_net_logtype_init;
int otx_net_logtype_driver;
-RTE_INIT(otx_net_init_log);
-static void
-otx_net_init_log(void)
+RTE_INIT(otx_net_init_log)
{
otx_net_logtype_mbox = rte_log_register("pmd.net.octeontx.mbox");
if (otx_net_logtype_mbox >= 0)
ETH_PCAP_TX_IFACE_ARG "=<ifc> "
ETH_PCAP_IFACE_ARG "=<ifc>");
-RTE_INIT(eth_pcap_init_log);
-static void
-eth_pcap_init_log(void)
+RTE_INIT(eth_pcap_init_log)
{
eth_pcap_logtype = rte_log_register("pmd.net.pcap");
if (eth_pcap_logtype >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
-RTE_INIT(qede_init_log);
-static void
-qede_init_log(void)
+RTE_INIT(qede_init_log)
{
qede_logtype_init = rte_log_register("pmd.net.qede.init");
if (qede_logtype_init >= 0)
RTE_PMD_REGISTER_PARAM_STRING(net_ring,
ETH_RING_NUMA_NODE_ACTION_ARG "=name:node:action(ATTACH|CREATE)");
-RTE_INIT(eth_ring_init_log);
-static void
-eth_ring_init_log(void)
+RTE_INIT(eth_ring_init_log)
{
eth_ring_logtype = rte_log_register("pmd.net.ring");
if (eth_ring_logtype >= 0)
SFC_KVARG_RXD_WAIT_TIMEOUT_NS "=<long> "
SFC_KVARG_STATS_UPDATE_PERIOD_MS "=<long>");
-RTE_INIT(sfc_driver_register_logtype);
-static void
-sfc_driver_register_logtype(void)
+RTE_INIT(sfc_driver_register_logtype)
{
int ret;
PMD_PARAM_HARD_NAME "=<string> "
PMD_PARAM_HARD_TX_QUEUE_ID "=<int>");
-RTE_INIT(pmd_softnic_init_log);
-static void
-pmd_softnic_init_log(void)
+RTE_INIT(pmd_softnic_init_log)
{
pmd_softnic_logtype = rte_log_register("pmd.net.softnic");
if (pmd_softnic_logtype >= 0)
RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME,
"* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )");
-RTE_INIT(szedata2_init_log);
-static void
-szedata2_init_log(void)
+RTE_INIT(szedata2_init_log)
{
szedata2_logtype_init = rte_log_register("pmd.net.szedata2.init");
if (szedata2_logtype_init >= 0)
ETH_TAP_REMOTE_ARG "=<string>");
int tap_logtype;
-RTE_INIT(tap_init_log);
-static void
-tap_init_log(void)
+RTE_INIT(tap_init_log)
{
tap_logtype = rte_log_register("pmd.net.tap");
if (tap_logtype >= 0)
static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
bool cleanup);
-RTE_INIT(nicvf_init_log);
-static void
-nicvf_init_log(void)
+RTE_INIT(nicvf_init_log)
{
nicvf_logtype_mbox = rte_log_register("pmd.net.thunderx.mbox");
if (nicvf_logtype_mbox >= 0)
"iface=<ifc> "
"queues=<int>");
-RTE_INIT(vhost_init_log);
-static void
-vhost_init_log(void)
+RTE_INIT(vhost_init_log)
{
vhost_logtype = rte_log_register("pmd.net.vhost");
if (vhost_logtype >= 0)
.remove = eth_virtio_pci_remove,
};
-RTE_INIT(rte_virtio_pmd_init);
-static void
-rte_virtio_pmd_init(void)
+RTE_INIT(rte_virtio_pmd_init)
{
if (rte_eal_iopl_init() != 0) {
PMD_INIT_LOG(ERR, "IOPL call failed - cannot use virtio PMD");
RTE_PMD_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map);
RTE_PMD_REGISTER_KMOD_DEP(net_virtio, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_INIT(virtio_init_log);
-static void
-virtio_init_log(void)
+RTE_INIT(virtio_init_log)
{
virtio_logtype_init = rte_log_register("pmd.net.virtio.init");
if (virtio_logtype_init >= 0)
RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_INIT(vmxnet3_init_log);
-static void
-vmxnet3_init_log(void)
+RTE_INIT(vmxnet3_init_log)
{
vmxnet3_logtype_init = rte_log_register("pmd.net.vmxnet3.init");
if (vmxnet3_logtype_init >= 0)
RTE_PMD_REGISTER_VDEV(DPAA2_CMDIF_PMD_NAME, dpaa2_cmdif_drv);
-RTE_INIT(dpaa2_cmdif_init_log);
-
-static void
-dpaa2_cmdif_init_log(void)
+RTE_INIT(dpaa2_cmdif_init_log)
{
dpaa2_cmdif_logtype = rte_log_register("pmd.raw.dpaa2.cmdif");
if (dpaa2_cmdif_logtype >= 0)
RTE_PMD_REGISTER_DPAA2(dpaa2_qdma, rte_dpaa2_qdma_pmd);
-RTE_INIT(dpaa2_qdma_init_log);
-static void
-dpaa2_qdma_init_log(void)
+RTE_INIT(dpaa2_qdma_init_log)
{
dpaa2_qdma_logtype = rte_log_register("pmd.raw.dpaa2.qdma");
if (dpaa2_qdma_logtype >= 0)
RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_INIT(ifpga_rawdev_init_log);
-static void
-ifpga_rawdev_init_log(void)
+RTE_INIT(ifpga_rawdev_init_log)
{
ifpga_rawdev_logtype = rte_log_register("driver.raw.init");
if (ifpga_rawdev_logtype >= 0)
RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv);
-RTE_INIT(skeleton_pmd_init_log);
-
-static void
-skeleton_pmd_init_log(void)
+RTE_INIT(skeleton_pmd_init_log)
{
skeleton_pmd_logtype = rte_log_register("rawdev.skeleton");
if (skeleton_pmd_logtype >= 0)
return NULL;
}
-RTE_INIT(rte_bbdev_init_log);
-static void
-rte_bbdev_init_log(void)
+RTE_INIT(rte_bbdev_init_log)
{
bbdev_logtype = rte_log_register("lib.bbdev");
if (bbdev_logtype >= 0)
return rc;
}
-RTE_INIT(rte_bpf_init_log);
-
-static void
-rte_bpf_init_log(void)
+RTE_INIT(rte_bpf_init_log)
{
rte_bpf_logtype = rte_log_register("lib.bpf");
if (rte_bpf_logtype >= 0)
return dev->data->name;
}
-RTE_INIT(rte_compressdev_log);
-
-static void
-rte_compressdev_log(void)
+RTE_INIT(rte_compressdev_log)
{
compressdev_logtype = rte_log_register("lib.compressdev");
if (compressdev_logtype >= 0)
#define RTE_PMD_REGISTER_CRYPTO_DRIVER(crypto_drv, drv, driver_id)\
-RTE_INIT(init_ ##driver_id);\
-static void init_ ##driver_id(void)\
+RTE_INIT(init_ ##driver_id)\
{\
driver_id = rte_cryptodev_allocate_driver(&crypto_drv, &(drv));\
}
};
/* Logging should be first initializer (before drivers and bus) */
-RTE_INIT_PRIO(rte_log_init, LOG);
-static void
-rte_log_init(void)
+RTE_INIT_PRIO(rte_log_init, LOG)
{
uint32_t i;
* The constructor has higher priority than PMD constructors.
*/
#define RTE_REGISTER_BUS(nm, bus) \
-RTE_INIT_PRIO(businitfn_ ##nm, BUS); \
-static void businitfn_ ##nm(void) \
+RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
{\
(bus).name = RTE_STR(nm);\
rte_bus_register(&bus); \
int rte_eal_tailq_register(struct rte_tailq_elem *t);
#define EAL_REGISTER_TAILQ(t) \
-RTE_INIT(tailqinitfn_ ##t); \
-static void tailqinitfn_ ##t(void) \
+RTE_INIT(tailqinitfn_ ##t) \
{ \
if (rte_eal_tailq_register(&t) < 0) \
rte_panic("Cannot initialize tailq: %s\n", t.name); \
return result;
}
-RTE_INIT(ethdev_init_log);
-static void
-ethdev_init_log(void)
+RTE_INIT(ethdev_init_log)
{
rte_eth_dev_logtype = rte_log_register("lib.ethdev");
if (rte_eth_dev_logtype >= 0)
.cancel_burst = sw_event_timer_cancel_burst,
};
-RTE_INIT(event_timer_adapter_init_log);
-static void
-event_timer_adapter_init_log(void)
+RTE_INIT(event_timer_adapter_init_log)
{
evtim_logtype = rte_log_register("lib.eventdev.adapter.timer");
if (evtim_logtype >= 0)
return ret;
}
-RTE_INIT(librte_flow_classify_init_log);
-
-static void
-librte_flow_classify_init_log(void)
+RTE_INIT(librte_flow_classify_init_log)
{
librte_flow_classify_logtype =
rte_log_register("lib.flow_classify");
}
}
-RTE_INIT(librte_member_init_log);
-
-static void
-librte_member_init_log(void)
+RTE_INIT(librte_member_init_log)
{
librte_member_logtype = rte_log_register("lib.member");
if (librte_member_logtype >= 0)
return 0;
}
-RTE_INIT(librawdev_init_log);
-
-static void
-librawdev_init_log(void)
+RTE_INIT(librawdev_init_log)
{
librawdev_logtype = rte_log_register("lib.rawdev");
if (librawdev_logtype >= 0)