]> git.proxmox.com Git - mirror_ovs.git/commitdiff
netdev-dpdk: Assign value '0' to unsupported netdev features
authorBinbin Xu <xu.binbin1@zte.com.cn>
Thu, 13 Oct 2016 15:18:20 +0000 (23:18 +0800)
committerBen Pfaff <blp@ovn.org>
Mon, 28 Nov 2016 22:54:23 +0000 (14:54 -0800)
When OVS&DPDK is used, DPDK doesn't support features 'advertised',
'supported' and 'peer'. If a physical port added to bridge, features
descirbed above can't be assigned, and the values are random.

Signed-off-by: Binbin Xu <xu.binbin1@zte.com.cn>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/netdev-dpdk.c

index 7564ad7cbb3cc1d2582ef42f51a0903c2e5fe920..b51f32911b2de548bb8830b7ef9e6db6344f1cf6 100644 (file)
@@ -1952,9 +1952,9 @@ out:
 static int
 netdev_dpdk_get_features(const struct netdev *netdev,
                          enum netdev_features *current,
-                         enum netdev_features *advertised OVS_UNUSED,
-                         enum netdev_features *supported OVS_UNUSED,
-                         enum netdev_features *peer OVS_UNUSED)
+                         enum netdev_features *advertised,
+                         enum netdev_features *supported,
+                         enum netdev_features *peer)
 {
     struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
     struct rte_eth_link link;
@@ -1992,6 +1992,8 @@ netdev_dpdk_get_features(const struct netdev *netdev,
         *current |= NETDEV_F_AUTONEG;
     }
 
+    *advertised = *supported = *peer = 0;
+
     return 0;
 }