Skip to content

RFC net_cls for sys container

Libo Chen cgroups containers lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: introduce backup_classid to struct skbuffinclude/linux/skbuff.h+3 -05 replies
2/4cls_cgroup: introduce a helper: bk_cls_classid()include/net/cls_cgroup.h net/sched/cls_cgroup.c+11 -10 replies
3/4veth: backup classid befor switch net_nsdrivers/net/veth.c+7 -04 replies
4/4cls_cgroup: restore classid from skb->sk_classidnet/sched/cls_cgroup.c+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH net-next 0/4] net_cls for sys container

Hi guys,

Now, lxc created with veth can not be under control by cls_cgroup.

the former discussion:
http://lkml.indiana.edu/hypermail/linux/kernel/1312.1/00214.html

In short, because cls_cgroup relys classid attached to sock filter skb, but sock will be cleared inside dev_forward_skb() in veth_xmit().

so I add backup_classid in struct sk_buffer to save classid before dev_forward_skb(). In cls_cgroup_classify(), if skb->sk is NULL, we can try to restore classid form skb->bk_classid.

Libo Chen (4):
net: introduce bk_classid to struct sk_buff
cls_cgroup: introduce a helper: bk_cls_classid()
veth: backup classid befor switch net_ns
cls_cgroup: restore classid from skb->sk_classid

 drivers/net/veth.c       |  5 +++++
 include/linux/skbuff.h   |  3 +++
 include/net/cls_cgroup.h | 11 +++++++++++
 net/sched/cls_cgroup.c   |  8 ++++----
 4 files changed, 23 insertions(+), 4 deletions(-)