There is no need to support old kernel so now we can use newer api to access per cpu data.
Signed-off-by: Pravin B Shelar <pshe...@ovn.org> --- datapath/actions.c | 4 ++-- datapath/linux/compat/include/linux/percpu.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/datapath/actions.c b/datapath/actions.c index 3cd2922..ed9115c 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -620,7 +620,7 @@ static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key, static int ovs_vport_output(OVS_VPORT_OUTPUT_PARAMS) { - struct ovs_frag_data *data = get_pcpu_ptr(ovs_frag_data_storage); + struct ovs_frag_data *data = this_cpu_ptr(&ovs_frag_data_storage); struct vport *vport = data->vport; if (skb_cow_head(skb, data->l2_len) < 0) { @@ -663,7 +663,7 @@ static void prepare_frag(struct vport *vport, struct sk_buff *skb) unsigned int hlen = skb_network_offset(skb); struct ovs_frag_data *data; - data = get_pcpu_ptr(ovs_frag_data_storage); + data = this_cpu_ptr(&ovs_frag_data_storage); data->dst = (unsigned long) skb_dst(skb); data->vport = vport; data->cb = *OVS_GSO_CB(skb); diff --git a/datapath/linux/compat/include/linux/percpu.h b/datapath/linux/compat/include/linux/percpu.h index 871c877..7c346aa 100644 --- a/datapath/linux/compat/include/linux/percpu.h +++ b/datapath/linux/compat/include/linux/percpu.h @@ -25,12 +25,6 @@ #define this_cpu_dec(ptr) percpu_sub(ptr, 1) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) -#define get_pcpu_ptr(name) ((void *)this_cpu_ptr(&__pcpu_unique_##name)) -#else -#define get_pcpu_ptr(name) (this_cpu_ptr(&name)) -#endif - #ifndef alloc_percpu_gfp #define NEED_ALLOC_PERCPU_GFP -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev