Subject: Re: [RFC PATCH 19/29] net: vrf: Add vrf context to skb

From: David Ahern <[email-masked]>
Date: Thu, 05 Feb 2015 18:21:58 -0700

On 2/5/15 6:45 AM, Nicolas Dichtel wrote:
> Le 05/02/2015 02:34, David Ahern a écrit :
>> On ingress skb's inherit vrf context from the net_device. For TX skb's
>> inherit the vrf context from the socket originating the packet. Update
>> SKB related net_ctx macros to set vrf.
> Is it really needed to have this skb->vrf?
> Is it not possible to get the vrf from sockets, interfaces, etc? Like
> it's done
> with netns?

One reason is for VRF_ANY context of sockets.
Another one is netlink messages getting funneled through a single kernel 
netlink socket; skb->vrf is used to retain vrf handling.

in time might be able to make it go away.