[ovs-dev] [PATCH 1/3] netdev-dpdk: Can't set specified vhost port's admin state

Binbin Xu xu.binbin1 at zte.com.cn
Wed Nov 9 16:06:05 UTC 2016


When we set a vhost port's admin state via ovs-appctl, the
application doesn't work and returns the information
"Not a DPDK Interface".

Signed-off-by: Binbin Xu <xu.binbin1 at zte.com.cn>
---
 lib/netdev-dpdk.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 7c1523e..c536992 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -391,7 +391,8 @@ struct netdev_rxq_dpdk {
     int port_id;
 };
 
-static int netdev_dpdk_construct(struct netdev *);
+static int netdev_dpdk_class_init(void);
+static int netdev_dpdk_vhost_class_init(void);
 
 int netdev_dpdk_get_vid(const struct netdev_dpdk *dev);
 
@@ -401,7 +402,8 @@ netdev_dpdk_get_ingress_policer(const struct netdev_dpdk *dev);
 static bool
 is_dpdk_class(const struct netdev_class *class)
 {
-    return class->construct == netdev_dpdk_construct;
+    return class->init == netdev_dpdk_class_init
+        || class->init == netdev_dpdk_vhost_class_init;
 }
 
 /* DPDK NIC drivers allocate RX buffers at a particular granularity, typically
-- 
2.9.3




More information about the dev mailing list