X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev.c;h=e4e7ab132eea510f1dce5a48ca16ada912c2ad7a;hb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;hp=185d3dfcec492ce23bf9e3f30f5aea976812b522;hpb=6c0386119d614d5e26ca08cc3d8e527806b87ef9;p=sliver-openvswitch.git diff --git a/lib/netdev.c b/lib/netdev.c index 185d3dfce..e4e7ab132 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -516,7 +516,7 @@ netdev_get_mtu(const struct netdev *netdev, int *mtup) if (error) { *mtup = 0; if (error != EOPNOTSUPP) { - VLOG_WARN_RL(&rl, "failed to retrieve MTU for network device %s: " + VLOG_DBG_RL(&rl, "failed to retrieve MTU for network device %s: " "%s", netdev_get_name(netdev), strerror(error)); } } @@ -537,7 +537,7 @@ netdev_set_mtu(const struct netdev *netdev, int mtu) error = class->set_mtu ? class->set_mtu(netdev, mtu) : EOPNOTSUPP; if (error && error != EOPNOTSUPP) { - VLOG_WARN_RL(&rl, "failed to set MTU for network device %s: %s", + VLOG_DBG_RL(&rl, "failed to set MTU for network device %s: %s", netdev_get_name(netdev), strerror(error)); } @@ -604,7 +604,8 @@ netdev_get_features(const struct netdev *netdev, get_features = netdev_get_dev(netdev)->netdev_class->get_features; error = get_features - ? get_features(netdev, current, advertised, supported, peer) + ? get_features(netdev, current, advertised, supported, + peer) : EOPNOTSUPP; if (error) { *current = *advertised = *supported = *peer = 0; @@ -764,12 +765,12 @@ netdev_get_next_hop(const struct netdev *netdev, * may be used to populate the status column of the Interface table as defined * in ovs-vswitchd.conf.db(5). */ int -netdev_get_status(const struct netdev *netdev, struct shash *sh) +netdev_get_drv_info(const struct netdev *netdev, struct shash *sh) { struct netdev_dev *dev = netdev_get_dev(netdev); - return (dev->netdev_class->get_status - ? dev->netdev_class->get_status(netdev, sh) + return (dev->netdev_class->get_drv_info + ? dev->netdev_class->get_drv_info(netdev, sh) : EOPNOTSUPP); } @@ -1234,7 +1235,11 @@ netdev_get_queue_stats(const struct netdev *netdev, unsigned int queue_id, * Calling this function may be more efficient than calling netdev_get_queue() * for every queue. * - * 'cb' must not modify or free the 'details' argument passed in. + * 'cb' must not modify or free the 'details' argument passed in. It may + * delete or modify the queue passed in as its 'queue_id' argument. It may + * modify but must not delete any other queue within 'netdev'. 'cb' should not + * add new queues because this may cause some queues to be visited twice or not + * at all. * * Returns 0 if successful, otherwise a positive errno value. On error, some * configured queues may not have been included in the iteration. */