Re: [PATCH] Traffic control cgroups subsystem

From: Paul Menage
Date: Tue Jul 22 2008 - 08:56:29 EST


On Tue, Jul 22, 2008 at 8:48 AM, Patrick McHardy <kaber@xxxxxxxxx> wrote:
>
> Using skb->priority for classification would be fine, but it would
> probably interfere with the default initialization to sk->sk_priority.

Well internally we just overloaded sk->sk_priority to be the classid,
and let skb->priority be inherited from that.

>
>> Regarding skb->sk->sk_cgroup_classid, is it always the case that the
>> original sk is still available when we're making traffic control
>> decisions? I'd thought that there were cases (e.g. cloning skbs in the
>> TCP retransmit path) where the pointer to the original sk is lost.
>
> After cloning, TCP sets the owner of the skb to the socket, so
> that should work fine.
>

OK, so maybe we don't need a per-skb field after all.

Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/