* [RFC PATCH net-next 4/4] cls_cgroup: restore classid from skb->sk_classid
@ 2014-01-03 3:11 ` Libo Chen
0 siblings, 0 replies; 3+ messages in thread
From: Libo Chen @ 2014-01-03 3:11 UTC (permalink / raw)
To: jhs-jkUAjuhPggJWk0Htik3J/w, David Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Serge Hallyn, LKML, cgroups-u79uwXL29TY76Z2rM5mHXA
if skb->sk is NULL, we can try to restore from skb->bk_classid,
because we may have saved it.
Signed-off-by: Libo Chen <clbchenlibo.chen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
net/sched/cls_cgroup.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index d228a5d..6ab0e69 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -141,9 +141,10 @@ static int cls_cgroup_classify(struct sk_buff *skb, const struct tcf_proto *tp,
*/
if (in_serving_softirq()) {
/* If there is an sk_classid we'll use that. */
- if (!skb->sk)
- return -1;
- classid = skb->sk->sk_classid;
+ if (skb->sk)
+ classid = skb->sk->sk_classid;
+ else
+ classid = skb->backup_classid;
}
if (!classid)
--
1.8.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [RFC PATCH net-next 4/4] cls_cgroup: restore classid from skb->sk_classid
@ 2014-01-03 3:11 ` Libo Chen
0 siblings, 0 replies; 3+ messages in thread
From: Libo Chen @ 2014-01-03 3:11 UTC (permalink / raw)
To: jhs, David Miller
Cc: netdev, LKML, cgroups, containers, Li Zefan, Serge Hallyn
if skb->sk is NULL, we can try to restore from skb->bk_classid,
because we may have saved it.
Signed-off-by: Libo Chen <clbchenlibo.chen@huawei.com>
---
net/sched/cls_cgroup.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index d228a5d..6ab0e69 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -141,9 +141,10 @@ static int cls_cgroup_classify(struct sk_buff *skb, const struct tcf_proto *tp,
*/
if (in_serving_softirq()) {
/* If there is an sk_classid we'll use that. */
- if (!skb->sk)
- return -1;
- classid = skb->sk->sk_classid;
+ if (skb->sk)
+ classid = skb->sk->sk_classid;
+ else
+ classid = skb->backup_classid;
}
if (!classid)
--
1.8.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [RFC PATCH net-next 4/4] cls_cgroup: restore classid from skb->sk_classid
@ 2014-01-03 3:11 ` Libo Chen
0 siblings, 0 replies; 3+ messages in thread
From: Libo Chen @ 2014-01-03 3:11 UTC (permalink / raw)
To: jhs-jkUAjuhPggJWk0Htik3J/w, David Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Serge Hallyn, LKML, cgroups-u79uwXL29TY76Z2rM5mHXA
if skb->sk is NULL, we can try to restore from skb->bk_classid,
because we may have saved it.
Signed-off-by: Libo Chen <clbchenlibo.chen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
net/sched/cls_cgroup.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index d228a5d..6ab0e69 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -141,9 +141,10 @@ static int cls_cgroup_classify(struct sk_buff *skb, const struct tcf_proto *tp,
*/
if (in_serving_softirq()) {
/* If there is an sk_classid we'll use that. */
- if (!skb->sk)
- return -1;
- classid = skb->sk->sk_classid;
+ if (skb->sk)
+ classid = skb->sk->sk_classid;
+ else
+ classid = skb->backup_classid;
}
if (!classid)
--
1.8.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-03 3:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-03 3:11 [RFC PATCH net-next 4/4] cls_cgroup: restore classid from skb->sk_classid Libo Chen
2014-01-03 3:11 ` Libo Chen
2014-01-03 3:11 ` Libo Chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.