openvswitch: Make tunnel set action attach a metadata dst
Utilize the new metadata dst to attach encapsulation instructions to the skb. The existing egress_tun_info via the OVS_CB() is left in place until all tunnel vports have been converted to the new method. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0dfbdf4102
commit
34ae932a40
@@ -733,7 +733,15 @@ static int execute_set_action(struct sk_buff *skb,
|
||||
{
|
||||
/* Only tunnel set execution is supported without a mask. */
|
||||
if (nla_type(a) == OVS_KEY_ATTR_TUNNEL_INFO) {
|
||||
OVS_CB(skb)->egress_tun_info = nla_data(a);
|
||||
struct ovs_tunnel_info *tun = nla_data(a);
|
||||
|
||||
skb_dst_drop(skb);
|
||||
dst_hold((struct dst_entry *)tun->tun_dst);
|
||||
skb_dst_set(skb, (struct dst_entry *)tun->tun_dst);
|
||||
|
||||
/* FIXME: Remove when all vports have been converted */
|
||||
OVS_CB(skb)->egress_tun_info = &tun->tun_dst->u.tun_info;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user