aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/actions.c')
-rw-r--r--net/openvswitch/actions.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index f7e589159e4a..ceb618cf1292 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -564,6 +564,7 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port)
564static int output_userspace(struct datapath *dp, struct sk_buff *skb, 564static int output_userspace(struct datapath *dp, struct sk_buff *skb,
565 struct sw_flow_key *key, const struct nlattr *attr) 565 struct sw_flow_key *key, const struct nlattr *attr)
566{ 566{
567 struct ovs_tunnel_info info;
567 struct dp_upcall_info upcall; 568 struct dp_upcall_info upcall;
568 const struct nlattr *a; 569 const struct nlattr *a;
569 int rem; 570 int rem;
@@ -572,6 +573,7 @@ static int output_userspace(struct datapath *dp, struct sk_buff *skb,
572 upcall.key = key; 573 upcall.key = key;
573 upcall.userdata = NULL; 574 upcall.userdata = NULL;
574 upcall.portid = 0; 575 upcall.portid = 0;
576 upcall.egress_tun_info = NULL;
575 577
576 for (a = nla_data(attr), rem = nla_len(attr); rem > 0; 578 for (a = nla_data(attr), rem = nla_len(attr); rem > 0;
577 a = nla_next(a, &rem)) { 579 a = nla_next(a, &rem)) {
@@ -583,7 +585,24 @@ static int output_userspace(struct datapath *dp, struct sk_buff *skb,
583 case OVS_USERSPACE_ATTR_PID: 585 case OVS_USERSPACE_ATTR_PID:
584 upcall.portid = nla_get_u32(a); 586 upcall.portid = nla_get_u32(a);
585 break; 587 break;
588
589 case OVS_USERSPACE_ATTR_EGRESS_TUN_PORT: {
590 /* Get out tunnel info. */
591 struct vport *vport;
592
593 vport = ovs_vport_rcu(dp, nla_get_u32(a));
594 if (vport) {
595 int err;
596
597 err = ovs_vport_get_egress_tun_info(vport, skb,
598 &info);
599 if (!err)
600 upcall.egress_tun_info = &info;
601 }
602 break;
586 } 603 }
604
605 } /* End of switch. */
587 } 606 }
588 607
589 return ovs_dp_upcall(dp, skb, &upcall); 608 return ovs_dp_upcall(dp, skb, &upcall);