diff mbox

[ovs-dev,2/3] netdev-dpdk: Remove empty init function

Message ID 1470307338-22638-2-git-send-email-ciara.loftus@intel.com
State Superseded
Delegated to: Daniele Di Proietto
Headers show

Commit Message

Ciara Loftus Aug. 4, 2016, 10:42 a.m. UTC
DPDK type ports no longer implement the netdev class 'init' function.
Set the function to NULL in NETDEV_DPDK_CLASS.

Suggested-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 lib/netdev-dpdk.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 25c1363..7692cc8 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2439,12 +2439,6 @@  dpdk_vhost_class_init(void)
     return 0;
 }
 
-static int
-dpdk_vhost_user_class_init(void)
-{
-    return 0;
-}
-
 static void
 dpdk_common_init(void)
 {
@@ -2878,7 +2872,7 @@  netdev_dpdk_vhost_user_reconfigure(struct netdev *netdev)
     return err;
 }
 
-#define NETDEV_DPDK_CLASS(NAME, INIT, CONSTRUCT, DESTRUCT,    \
+#define NETDEV_DPDK_CLASS(NAME, CONSTRUCT, DESTRUCT,          \
                           SET_CONFIG, SET_TX_MULTIQ, SEND,    \
                           GET_CARRIER, GET_STATS,             \
                           GET_FEATURES, GET_STATUS,           \
@@ -2886,7 +2880,7 @@  netdev_dpdk_vhost_user_reconfigure(struct netdev *netdev)
 {                                                             \
     NAME,                                                     \
     true,                       /* is_pmd */                  \
-    INIT,                       /* init */                    \
+    NULL,                       /* init */                    \
     NULL,                       /* netdev_dpdk_run */         \
     NULL,                       /* netdev_dpdk_wait */        \
                                                               \
@@ -3327,7 +3321,6 @@  dpdk_init(const struct smap *ovs_other_config)
 static const struct netdev_class dpdk_class =
     NETDEV_DPDK_CLASS(
         "dpdk",
-        NULL,
         netdev_dpdk_construct,
         netdev_dpdk_destruct,
         netdev_dpdk_set_config,
@@ -3343,7 +3336,6 @@  static const struct netdev_class dpdk_class =
 static const struct netdev_class dpdk_ring_class =
     NETDEV_DPDK_CLASS(
         "dpdkr",
-        NULL,
         netdev_dpdk_ring_construct,
         netdev_dpdk_destruct,
         netdev_dpdk_set_config,
@@ -3359,7 +3351,6 @@  static const struct netdev_class dpdk_ring_class =
 static const struct netdev_class OVS_UNUSED dpdk_vhost_user_class =
     NETDEV_DPDK_CLASS(
         "dpdkvhostuser",
-        dpdk_vhost_user_class_init,
         netdev_dpdk_vhost_user_construct,
         netdev_dpdk_vhost_destruct,
         NULL,