X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev.c;h=a8bbedd71cd692b6afb705012d15ba9a59dee600;hb=d017eeb9f9ebcb46c24a67fd301b3e36cd26a04e;hp=727c538a5a9519a5c4616337834e096a61cbbc82;hpb=10a89ef04df5669c5cdd02f786150a7ab8454e01;p=sliver-openvswitch.git diff --git a/lib/netdev.c b/lib/netdev.c index 727c538a5..a8bbedd71 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -89,6 +89,8 @@ netdev_initialize(void) netdev_register_provider(&netdev_tap_class); netdev_register_provider(&netdev_bsd_class); #endif + netdev_register_provider(&netdev_tunnel_class); + netdev_register_provider(&netdev_pltap_class); } } @@ -1246,7 +1248,8 @@ netdev_delete_queue(struct netdev *netdev, unsigned int queue_id) /* Obtains statistics about 'queue_id' on 'netdev'. On success, returns 0 and * fills 'stats' with the queue's statistics; individual members of 'stats' may * be set to all-1-bits if the statistic is unavailable. On failure, returns a - * positive errno value and fills 'stats' with all-1-bits. */ + * positive errno value and fills 'stats' with values indicating unsupported + * statistics. */ int netdev_get_queue_stats(const struct netdev *netdev, unsigned int queue_id, struct netdev_queue_stats *stats) @@ -1258,7 +1261,10 @@ netdev_get_queue_stats(const struct netdev *netdev, unsigned int queue_id, ? class->get_queue_stats(netdev, queue_id, stats) : EOPNOTSUPP); if (retval) { - memset(stats, 0xff, sizeof *stats); + stats->tx_bytes = UINT64_MAX; + stats->tx_packets = UINT64_MAX; + stats->tx_errors = UINT64_MAX; + stats->created = LLONG_MIN; } return retval; }