diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-07-20 10:41:16 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-07-20 10:41:16 -0700 |
| commit | 6a6e60bde300cad300c70eae5e2a1faba2046670 (patch) | |
| tree | 8111bf51ce209cc511fbfd03789a2993057a35a7 /vswitchd | |
| parent | 481db4883344161efab4bd5e7580e21411e62c9f (diff) | |
| download | openvswitch-6a6e60bde300cad300c70eae5e2a1faba2046670.tar.gz | |
bridge: Log a warning when QoS misconfiguration is likely.
Queue 0 is documented as the "default queue" used when a packet is not
directed to any specific queue. Many qdiscs drop packets not directed to a
queue if the default queue is not configured. This is therefore likely to
be a misconfiguration, so warn about it.
Bug #5583.
Diffstat (limited to 'vswitchd')
| -rw-r--r-- | vswitchd/bridge.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 449957a9f..fcd7a78d1 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2474,6 +2474,7 @@ iface_configure_qos(struct iface *iface, const struct ovsrec_qos *qos) } else { struct iface_delete_queues_cbdata cbdata; struct shash details; + bool queue_zero; size_t i; /* Configure top-level Qos for 'iface'. */ @@ -2489,16 +2490,28 @@ iface_configure_qos(struct iface *iface, const struct ovsrec_qos *qos) netdev_dump_queues(iface->netdev, iface_delete_queues, &cbdata); /* Configure queues for 'iface'. */ + queue_zero = false; for (i = 0; i < qos->n_queues; i++) { const struct ovsrec_queue *queue = qos->value_queues[i]; unsigned int queue_id = qos->key_queues[i]; + if (queue_id == 0) { + queue_zero = true; + } + shash_from_ovs_idl_map(queue->key_other_config, queue->value_other_config, queue->n_other_config, &details); netdev_set_queue(iface->netdev, queue_id, &details); shash_destroy(&details); } + if (!queue_zero) { + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1); + VLOG_WARN_RL(&rl, "interface %s: QoS configured without a default " + "queue (queue 0). Packets not directed to a " + "correctly configured queue may be dropped.", + iface->name); + } } netdev_set_policing(iface->netdev, |
