vport.c (09ce069dff607f86dcdeb541d20734a8f42478c5) | vport.c (7d5437c709ded4f152cb8b305d17972d6707f20c) |
---|---|
1/* 2 * Copyright (c) 2007-2012 Nicira, Inc. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of version 2 of the GNU General Public 6 * License as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but --- 311 unchanged lines hidden (view full) --- 320 * ovs_vport_receive - pass up received packet to the datapath for processing 321 * 322 * @vport: vport that received the packet 323 * @skb: skb that was received 324 * 325 * Must be called with rcu_read_lock. The packet cannot be shared and 326 * skb->data should point to the Ethernet header. 327 */ | 1/* 2 * Copyright (c) 2007-2012 Nicira, Inc. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of version 2 of the GNU General Public 6 * License as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but --- 311 unchanged lines hidden (view full) --- 320 * ovs_vport_receive - pass up received packet to the datapath for processing 321 * 322 * @vport: vport that received the packet 323 * @skb: skb that was received 324 * 325 * Must be called with rcu_read_lock. The packet cannot be shared and 326 * skb->data should point to the Ethernet header. 327 */ |
328void ovs_vport_receive(struct vport *vport, struct sk_buff *skb) | 328void ovs_vport_receive(struct vport *vport, struct sk_buff *skb, 329 struct ovs_key_ipv4_tunnel *tun_key) |
329{ 330 struct pcpu_tstats *stats; 331 332 stats = this_cpu_ptr(vport->percpu_stats); 333 u64_stats_update_begin(&stats->syncp); 334 stats->rx_packets++; 335 stats->rx_bytes += skb->len; 336 u64_stats_update_end(&stats->syncp); 337 | 330{ 331 struct pcpu_tstats *stats; 332 333 stats = this_cpu_ptr(vport->percpu_stats); 334 u64_stats_update_begin(&stats->syncp); 335 stats->rx_packets++; 336 stats->rx_bytes += skb->len; 337 u64_stats_update_end(&stats->syncp); 338 |
339 OVS_CB(skb)->tun_key = tun_key; |
|
338 ovs_dp_process_received_packet(vport, skb); 339} 340 341/** 342 * ovs_vport_send - send a packet on a device 343 * 344 * @vport: vport on which to send the packet 345 * @skb: skb to send --- 59 unchanged lines hidden --- | 340 ovs_dp_process_received_packet(vport, skb); 341} 342 343/** 344 * ovs_vport_send - send a packet on a device 345 * 346 * @vport: vport on which to send the packet 347 * @skb: skb to send --- 59 unchanged lines hidden --- |