mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 18:07:40 +00:00
netdev-linux: Add new QoS type linux-noop.
Linux ``No operation'' qos type is used to inform the vswitch that the traffic control for the port is managed externally. Any configuration values set for this type will have no effect. This patch provides a solution suggested in this mail - http://openvswitch.org/pipermail/discuss/2015-May/017687.html Signed-off-by: Babu Shanmugam <bschanmu@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
parent
4f94601a9a
commit
6cf888b821
3
NEWS
3
NEWS
@ -23,6 +23,9 @@ Post-v2.5.0
|
|||||||
* New option "--color" to produce colorized output for some commands.
|
* New option "--color" to produce colorized output for some commands.
|
||||||
* New commands "dump-ipfix-bridge" and "dump-ipfix-flow" to dump bridge
|
* New commands "dump-ipfix-bridge" and "dump-ipfix-flow" to dump bridge
|
||||||
IPFIX statistics and flow based IPFIX statistics.
|
IPFIX statistics and flow based IPFIX statistics.
|
||||||
|
- Linux:
|
||||||
|
* New QoS type "linux-noop" that prevents Open vSwitch from trying to
|
||||||
|
manage QoS for a given port (useful when other software manages QoS).
|
||||||
- DPDK:
|
- DPDK:
|
||||||
* New option "n_rxq" for PMD interfaces.
|
* New option "n_rxq" for PMD interfaces.
|
||||||
Old 'other_config:n-dpdk-rxqs' is no longer supported.
|
Old 'other_config:n-dpdk-rxqs' is no longer supported.
|
||||||
|
@ -418,6 +418,7 @@ static const struct tc_ops tc_ops_codel;
|
|||||||
static const struct tc_ops tc_ops_fqcodel;
|
static const struct tc_ops tc_ops_fqcodel;
|
||||||
static const struct tc_ops tc_ops_sfq;
|
static const struct tc_ops tc_ops_sfq;
|
||||||
static const struct tc_ops tc_ops_default;
|
static const struct tc_ops tc_ops_default;
|
||||||
|
static const struct tc_ops tc_ops_noop;
|
||||||
static const struct tc_ops tc_ops_other;
|
static const struct tc_ops tc_ops_other;
|
||||||
|
|
||||||
static const struct tc_ops *const tcs[] = {
|
static const struct tc_ops *const tcs[] = {
|
||||||
@ -426,6 +427,7 @@ static const struct tc_ops *const tcs[] = {
|
|||||||
&tc_ops_codel, /* Controlled delay */
|
&tc_ops_codel, /* Controlled delay */
|
||||||
&tc_ops_fqcodel, /* Fair queue controlled delay */
|
&tc_ops_fqcodel, /* Fair queue controlled delay */
|
||||||
&tc_ops_sfq, /* Stochastic fair queueing */
|
&tc_ops_sfq, /* Stochastic fair queueing */
|
||||||
|
&tc_ops_noop, /* Non operating qos type. */
|
||||||
&tc_ops_default, /* Default qdisc (see tc-pfifo_fast(8)). */
|
&tc_ops_default, /* Default qdisc (see tc-pfifo_fast(8)). */
|
||||||
&tc_ops_other, /* Some other qdisc. */
|
&tc_ops_other, /* Some other qdisc. */
|
||||||
NULL
|
NULL
|
||||||
@ -2101,7 +2103,6 @@ netdev_linux_get_qos_types(const struct netdev *netdev OVS_UNUSED,
|
|||||||
struct sset *types)
|
struct sset *types)
|
||||||
{
|
{
|
||||||
const struct tc_ops *const *opsp;
|
const struct tc_ops *const *opsp;
|
||||||
|
|
||||||
for (opsp = tcs; *opsp != NULL; opsp++) {
|
for (opsp = tcs; *opsp != NULL; opsp++) {
|
||||||
const struct tc_ops *ops = *opsp;
|
const struct tc_ops *ops = *opsp;
|
||||||
if (ops->tc_install && ops->ovs_name[0] != '\0') {
|
if (ops->tc_install && ops->ovs_name[0] != '\0') {
|
||||||
@ -2206,6 +2207,10 @@ netdev_linux_set_qos(struct netdev *netdev_,
|
|||||||
return EOPNOTSUPP;
|
return EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (new_ops == &tc_ops_noop) {
|
||||||
|
return new_ops->tc_install(netdev_, details);
|
||||||
|
}
|
||||||
|
|
||||||
ovs_mutex_lock(&netdev->mutex);
|
ovs_mutex_lock(&netdev->mutex);
|
||||||
error = tc_query_qdisc(netdev_);
|
error = tc_query_qdisc(netdev_);
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -4489,6 +4494,48 @@ static const struct tc_ops tc_ops_hfsc = {
|
|||||||
hfsc_class_dump_stats /* class_dump_stats */
|
hfsc_class_dump_stats /* class_dump_stats */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* "linux-noop" traffic control class. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
noop_install__(struct netdev *netdev_)
|
||||||
|
{
|
||||||
|
struct netdev_linux *netdev = netdev_linux_cast(netdev_);
|
||||||
|
static const struct tc tc = TC_INITIALIZER(&tc, &tc_ops_default);
|
||||||
|
|
||||||
|
netdev->tc = CONST_CAST(struct tc *, &tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
noop_tc_install(struct netdev *netdev,
|
||||||
|
const struct smap *details OVS_UNUSED)
|
||||||
|
{
|
||||||
|
noop_install__(netdev);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
noop_tc_load(struct netdev *netdev, struct ofpbuf *nlmsg OVS_UNUSED)
|
||||||
|
{
|
||||||
|
noop_install__(netdev);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct tc_ops tc_ops_noop = {
|
||||||
|
NULL, /* linux_name */
|
||||||
|
"linux-noop", /* ovs_name */
|
||||||
|
0, /* n_queues */
|
||||||
|
noop_tc_install,
|
||||||
|
noop_tc_load,
|
||||||
|
NULL, /* tc_destroy */
|
||||||
|
NULL, /* qdisc_get */
|
||||||
|
NULL, /* qdisc_set */
|
||||||
|
NULL, /* class_get */
|
||||||
|
NULL, /* class_set */
|
||||||
|
NULL, /* class_delete */
|
||||||
|
NULL, /* class_get_stats */
|
||||||
|
NULL /* class_dump_stats */
|
||||||
|
};
|
||||||
|
|
||||||
/* "linux-default" traffic control class.
|
/* "linux-default" traffic control class.
|
||||||
*
|
*
|
||||||
* This class represents the default, unnamed Linux qdisc. It corresponds to
|
* This class represents the default, unnamed Linux qdisc. It corresponds to
|
||||||
|
@ -3350,16 +3350,14 @@
|
|||||||
(<code>http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm</code>)
|
(<code>http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm</code>)
|
||||||
for information on how this classifier works and how to configure it.
|
for information on how this classifier works and how to configure it.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
|
||||||
<dl>
|
|
||||||
<dt><code>linux-hfsc</code></dt>
|
<dt><code>linux-hfsc</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Linux "Hierarchical Fair Service Curve" classifier.
|
Linux "Hierarchical Fair Service Curve" classifier.
|
||||||
See <code>http://linux-ip.net/articles/hfsc.en/</code> for
|
See <code>http://linux-ip.net/articles/hfsc.en/</code> for
|
||||||
information on how this classifier works.
|
information on how this classifier works.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
|
||||||
<dl>
|
|
||||||
<dt><code>linux-sfq</code></dt>
|
<dt><code>linux-sfq</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Linux ``Stochastic Fairness Queueing'' classifier. See
|
Linux ``Stochastic Fairness Queueing'' classifier. See
|
||||||
@ -3367,8 +3365,7 @@
|
|||||||
<code>http://linux.die.net/man/8/tc-sfq</code>) for information on
|
<code>http://linux.die.net/man/8/tc-sfq</code>) for information on
|
||||||
how this classifier works.
|
how this classifier works.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
|
||||||
<dl>
|
|
||||||
<dt><code>linux-codel</code></dt>
|
<dt><code>linux-codel</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Linux ``Controlled Delay'' classifier. See <code>tc-codel</code>(8)
|
Linux ``Controlled Delay'' classifier. See <code>tc-codel</code>(8)
|
||||||
@ -3376,8 +3373,7 @@
|
|||||||
<code>http://man7.org/linux/man-pages/man8/tc-codel.8.html</code>)
|
<code>http://man7.org/linux/man-pages/man8/tc-codel.8.html</code>)
|
||||||
for information on how this classifier works.
|
for information on how this classifier works.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
|
||||||
<dl>
|
|
||||||
<dt><code>linux-fq_codel</code></dt>
|
<dt><code>linux-fq_codel</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Linux ``Fair Queuing with Controlled Delay'' classifier. See
|
Linux ``Fair Queuing with Controlled Delay'' classifier. See
|
||||||
@ -3385,11 +3381,19 @@
|
|||||||
<code>http://man7.org/linux/man-pages/man8/tc-fq_codel.8.html</code>)
|
<code>http://man7.org/linux/man-pages/man8/tc-fq_codel.8.html</code>)
|
||||||
for information on how this classifier works.
|
for information on how this classifier works.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
|
||||||
<dl>
|
<dt><code>linux-noop</code></dt>
|
||||||
|
<dd>
|
||||||
|
Linux ``No operation.'' By default, Open vSwitch manages quality of
|
||||||
|
service on all of its configured ports. This can be helpful, but
|
||||||
|
sometimes administrators prefer to use other software to manage QoS.
|
||||||
|
This <ref column="type"/> prevents Open vSwitch from changing the QoS
|
||||||
|
configuration for a port.
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt><code>egress-policer</code></dt>
|
<dt><code>egress-policer</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
An egress policer algorithm. This implementation uses the DPDK
|
A DPDK egress policer algorithm using the DPDK
|
||||||
rte_meter library. The rte_meter library provides an implementation
|
rte_meter library. The rte_meter library provides an implementation
|
||||||
which allows the metering and policing of traffic. The implementation
|
which allows the metering and policing of traffic. The implementation
|
||||||
in OVS essentially creates a single token bucket used to police
|
in OVS essentially creates a single token bucket used to police
|
||||||
|
Loading…
x
Reference in New Issue
Block a user