diff mbox

[ovs-dev] netdev-dpdk: Assign value '0' to unsupported netdev features

Message ID 20161013151820.6577-1-xu.binbin1@zte.com.cn
State Accepted
Headers show

Commit Message

Xu Binbin Oct. 13, 2016, 3:18 p.m. UTC
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>
---
 lib/netdev-dpdk.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Ben Pfaff Nov. 28, 2016, 10:56 p.m. UTC | #1
On Thu, Oct 13, 2016 at 11:18:20PM +0800, Binbin Xu wrote:
> 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>

Thanks, applied to master and branch-2.6.
diff mbox

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index ab8c34f..848734c 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1948,9 +1948,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;
@@ -1988,6 +1988,8 @@  netdev_dpdk_get_features(const struct netdev *netdev,
         *current |= NETDEV_F_AUTONEG;
     }
 
+    *advertised = *supported = *peer = 0;
+
     return 0;
 }