flow.c (6b798d70d07a38e9ba0a32316f76495f9dcfc343) | flow.c (12eb18f7115884b0c1513dda31b0051121116b3a) |
---|---|
1/* 2 * Copyright (c) 2007-2014 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 --- 52 unchanged lines hidden (view full) --- 61 cur_ts.tv_nsec / NSEC_PER_MSEC; 62 63 return cur_ms - idle_ms; 64} 65 66#define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF)) 67 68void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, | 1/* 2 * Copyright (c) 2007-2014 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 --- 52 unchanged lines hidden (view full) --- 61 cur_ts.tv_nsec / NSEC_PER_MSEC; 62 63 return cur_ms - idle_ms; 64} 65 66#define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF)) 67 68void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, |
69 struct sk_buff *skb) | 69 const struct sk_buff *skb) |
70{ 71 struct flow_stats *stats; 72 int node = numa_node_id(); 73 74 stats = rcu_dereference(flow->stats[node]); 75 76 /* Check if already have node-specific stats. */ 77 if (likely(stats)) { --- 596 unchanged lines hidden (view full) --- 674 return 0; 675} 676 677int ovs_flow_key_update(struct sk_buff *skb, struct sw_flow_key *key) 678{ 679 return key_extract(skb, key); 680} 681 | 70{ 71 struct flow_stats *stats; 72 int node = numa_node_id(); 73 74 stats = rcu_dereference(flow->stats[node]); 75 76 /* Check if already have node-specific stats. */ 77 if (likely(stats)) { --- 596 unchanged lines hidden (view full) --- 674 return 0; 675} 676 677int ovs_flow_key_update(struct sk_buff *skb, struct sw_flow_key *key) 678{ 679 return key_extract(skb, key); 680} 681 |
682int ovs_flow_key_extract(struct ovs_tunnel_info *tun_info, | 682int ovs_flow_key_extract(const struct ovs_tunnel_info *tun_info, |
683 struct sk_buff *skb, struct sw_flow_key *key) 684{ 685 /* Extract metadata from packet. */ 686 if (tun_info) { 687 memcpy(&key->tun_key, &tun_info->tunnel, sizeof(key->tun_key)); 688 689 if (tun_info->options) { 690 BUILD_BUG_ON((1 << (sizeof(tun_info->options_len) * --- 35 unchanged lines hidden --- | 683 struct sk_buff *skb, struct sw_flow_key *key) 684{ 685 /* Extract metadata from packet. */ 686 if (tun_info) { 687 memcpy(&key->tun_key, &tun_info->tunnel, sizeof(key->tun_key)); 688 689 if (tun_info->options) { 690 BUILD_BUG_ON((1 << (sizeof(tun_info->options_len) * --- 35 unchanged lines hidden --- |