LGTM. Acked-by: Andy Zhou <az...@nicira.com>
On Wed, Sep 10, 2014 at 10:36 AM, Pravin B Shelar <pshe...@nicira.com> wrote: > definition of __ip_select_ident() changed in newer kernel and > it is backported to stable kernel, Therefore adding configure > check to detect the new function. > > Signed-off-by: Pravin B Shelar <pshe...@nicira.com> > --- > acinclude.m4 | 2 ++ > datapath/linux/compat/ip_tunnels_core.c | 5 +++++ > 2 files changed, 7 insertions(+) > > diff --git a/acinclude.m4 b/acinclude.m4 > index 7e036e5..b0794d2 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -284,6 +284,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ > OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_set_encap_proto]) > > OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [ipv4_is_multicast]) > + OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [__ip_select_ident.*dst_entry], > + [OVS_DEFINE([HAVE_IP_SELECT_IDENT_USING_DST_ENTRY])]) > > OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_disable_lro]) > OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_get_stats]) > diff --git a/datapath/linux/compat/ip_tunnels_core.c > b/datapath/linux/compat/ip_tunnels_core.c > index d650be2..4a1c6d2 100644 > --- a/datapath/linux/compat/ip_tunnels_core.c > +++ b/datapath/linux/compat/ip_tunnels_core.c > @@ -70,7 +70,12 @@ int iptunnel_xmit(struct rtable *rt, > iph->daddr = dst; > iph->saddr = src; > iph->ttl = ttl; > + > +#ifdef HAVE_IP_SELECT_IDENT_USING_DST_ENTRY > __ip_select_ident(iph, &rt_dst(rt), (skb_shinfo(skb)->gso_segs ?: 1) > - 1); > +#else > + __ip_select_ident(iph, (skb_shinfo(skb)->gso_segs ?: 1) - 1); > +#endif > > err = ip_local_out(skb); > if (unlikely(net_xmit_eval(err))) > -- > 1.9.3 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev