datapath/vport.c
int ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
		      const struct ip_tunnel_info *tun_info)
{
	struct sw_flow_key key;
	int error;

	OVS_CB(skb)->input_vport = vport;
	OVS_CB(skb)->mru = 0;
	if (unlikely(dev_net(skb->dev) != ovs_dp_get_net(vport->dp))) {
		u32 mark;

		mark = skb->mark;
		skb_scrub_packet(skb, true);
		skb->mark = mark;
		tun_info = NULL;
	}

	ovs_skb_init_inner_protocol(skb);
	skb_clear_ovs_gso_cb(skb);
	/* Extract flow from 'skb' into 'key'. */
	error = ovs_flow_key_extract(tun_info, skb, &key);
	if (unlikely(error)) {
		kfree_skb(skb);
		return error;
	}
	ovs_dp_process_packet(skb, &key);
	return 0;
}
/**
 *	ovs_vport_receive - pass up received packet to the datapath for processing
 *
 * @vport: vport that received the packet
 * @skb: skb that was received
 * @tun_key: tunnel (if any) that carried packet
 *
 * Must be called with rcu_read_lock.  The packet cannot be shared and
 * skb->data should point to the Ethernet header.
 */
pass up received packet to the datapath for processing
@vport: vport that received the packet
@skb: skb that was received
@tun_key: tunnel (if any) that carried packet

Must be called with rcu_read_lock.  The packet cannot be shared and
skb->data should point to the Ethernet header.
pass up received packet to the datapath for processing @vport : vport that received the packet @skb : skb that was received @tun_key : tunnel ( if any ) that carried packet Must be called with rcu_read_lock . The packet cannot be shared and skb - > data should point to the Ethernet header .
int ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
		      const struct ip_tunnel_info *tun_info)
{
	struct sw_flow_key key;
	int error;
	OVS_CB(skb)->input_vport = vport;
	OVS_CB(skb)->mru = 0;
	if (unlikely(dev_net(skb->dev) != ovs_dp_get_net(vport->dp))) {
		u32 mark;
		mark = skb->mark;
		skb_scrub_packet(skb, true);
		skb->mark = mark;
		tun_info = NULL;
	}
	ovs_skb_init_inner_protocol(skb);
	skb_clear_ovs_gso_cb(skb);
	error = ovs_flow_key_extract(tun_info, skb, &key);
	if (unlikely(error)) {
		kfree_skb(skb);
		return error;
	}
	ovs_dp_process_packet(skb, &key);
	return 0;
}
int ovs_vport_receive ( struct vport * vport , struct sk_buff * skb , const struct ip_tunnel_info * tun_info ) { struct sw_flow_key key ; int error ; OVS_CB ( skb ) -> input_vport = vport ; OVS_CB ( skb ) -> mru = 0 ; if ( unlikely ( dev_net ( skb -> dev ) != ovs_dp_get_net ( vport -> dp ) ) ) { u32 mark ; mark = skb -> mark ; skb_scrub_packet ( skb , true ) ; skb -> mark = mark ; tun_info = NULL ; } ovs_skb_init_inner_protocol ( skb ) ; skb_clear_ovs_gso_cb ( skb ) ; error = ovs_flow_key_extract ( tun_info , skb , & key ) ; if ( unlikely ( error ) ) { kfree_skb ( skb ) ; return error ; } ovs_dp_process_packet ( skb , & key ) ; return 0 ; }
ovs_vport_receive - pass up received packet to the datapath for processing
 @vport: vport that received the packet
 @skb: skb that was received
 @tun_key: tunnel (if any) that carried packet
ovs_vport_receive - pass up received packet to the datapath for processing @vport : vport that received the packet @skb : skb that was received @tun_key : tunnel ( if any ) that carried packet
/* Extract flow from 'skb' into 'key'. */