Skip to content

Commit

Permalink
compat: Detect and use inet_frag_queue->last_in.
Browse files Browse the repository at this point in the history
Kernels 3.17 and older have this field, while newer kernels use the
'flags' field. Detect this in the build in case anyone backports this
change to an older kernel.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
  • Loading branch information
joestringer committed Feb 2, 2016
1 parent f9f4e9f commit 30ed3d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions acinclude.m4
Expand Up @@ -353,6 +353,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [ip_skb_dst_mtu])
OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h], [hashfn.*const],
[OVS_DEFINE([HAVE_INET_FRAGS_CONST])])
OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h], [last_in],
[OVS_DEFINE([HAVE_INET_FRAGS_LAST_IN])])
OVS_GREP_IFELSE([$KSRC/include/net/dst_metadata.h], [metadata_dst])
OVS_GREP_IFELSE([$KSRC/include/linux/net.h], [sock_create_kern.*net],
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/include/net/inet_frag.h
Expand Up @@ -14,7 +14,7 @@
#endif

#ifdef OVS_FRAGMENT_BACKPORT
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
#ifdef HAVE_INET_FRAGS_LAST_IN
#define q_flags(q) (q->last_in)
#define qp_flags(qp) (qp->q.last_in)
#else
Expand Down

0 comments on commit 30ed3d0

Please sign in to comment.