Skip to content

Commit

Permalink
netdev-dpdk: Assign value '0' to unsupported netdev features
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
pinasterxu authored and blp committed Nov 28, 2016
1 parent 77adbb6 commit ca3d4f5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1952,9 +1952,9 @@ netdev_dpdk_get_stats(const struct netdev *netdev, struct netdev_stats *stats)
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;
Expand Down Expand Up @@ -1992,6 +1992,8 @@ netdev_dpdk_get_features(const struct netdev *netdev,
*current |= NETDEV_F_AUTONEG;
}

*advertised = *supported = *peer = 0;

return 0;
}

Expand Down

0 comments on commit ca3d4f5

Please sign in to comment.