diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2011-11-22 05:10:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 15:22:23 -0500 |
commit | 5bc1421e34ecfe0bd4b26dc3232b7d5e25179144 (patch) | |
tree | 783ed95187915c06757a260b637308919b35d5a0 /include/net/sock.h | |
parent | 202ff1c26c768efeead20b388556eda265dc8352 (diff) | |
download | linux-3.10-5bc1421e34ecfe0bd4b26dc3232b7d5e25179144.tar.gz linux-3.10-5bc1421e34ecfe0bd4b26dc3232b7d5e25179144.tar.bz2 linux-3.10-5bc1421e34ecfe0bd4b26dc3232b7d5e25179144.zip |
net: add network priority cgroup infrastructure (v4)
This patch adds in the infrastructure code to create the network priority
cgroup. The cgroup, in addition to the standard processes file creates two
control files:
1) prioidx - This is a read-only file that exports the index of this cgroup.
This is a value that is both arbitrary and unique to a cgroup in this subsystem,
and is used to index the per-device priority map
2) priomap - This is a writeable file. On read it reports a table of 2-tuples
<name:priority> where name is the name of a network interface and priority is
indicates the priority assigned to frames egresessing on the named interface and
originating from a pid in this cgroup
This cgroup allows for skb priority to be set prior to a root qdisc getting
selected. This is benenficial for DCB enabled systems, in that it allows for any
application to use dcb configured priorities so without application modification
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
CC: Robert Love <robert.w.love@intel.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 1c28f394d8e..8ac338cb39c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -320,6 +320,9 @@ struct sock { unsigned short sk_ack_backlog; unsigned short sk_max_ack_backlog; __u32 sk_priority; +#ifdef CONFIG_CGROUPS + __u32 sk_cgrp_prioidx; +#endif struct pid *sk_peer_pid; const struct cred *sk_peer_cred; long sk_rcvtimeo; |