Skip to content

Commit

Permalink
acinclude.m4: Fix skb_get_hash function detection
Browse files Browse the repository at this point in the history
Commit e2f3178 ("datapath: Add support for kernel 3.14.") added
support for 3.14 kernels and a new OVS_GREP_IFELSE check for the
"skg_get_hash" function in the process. "skb_get_hash" was introduced
in the Linux kernel commit 3958afa1b272 ("net: Change skb_get_rxhash to
skb_get_hash") which exists in >=3.14 but the OVS_GREP_IFELSE macro
also matches the "skb_get_hash_raw" function which exists in older
kernels. As a result of which, the check makes the build system
behave as if the "skb_get_hash" function is available in these older
kernels leading to build failures. We fix this by explicitly checking
for "skb_get_hash(" which matches the function definition.

Signed-off-by: Markos Chandras <mchandras@suse.de>
Signed-off-by: Jesse Gross <jesse@kernel.org>
  • Loading branch information
Markos Chandras authored and jessegross committed May 16, 2016
1 parent 99f5a62 commit cbe3d3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acinclude.m4
Expand Up @@ -464,7 +464,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_reset_mac_len])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_unclone])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_orphan_frags])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_get_hash])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_get_hash(],
[OVS_DEFINE([HAVE_SKB_GET_HASH])])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_clear_hash])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [int.skb_zerocopy(],
[OVS_DEFINE([HAVE_SKB_ZEROCOPY])])
Expand Down

0 comments on commit cbe3d3c

Please sign in to comment.