Skip to content

Commit

Permalink
datapath: Check for backported skb_frag_page().
Browse files Browse the repository at this point in the history
Recently released CentOS 6.3 (and probably also RHEL 6.3, I assume)
backported skb_frag_page() and others to their 2.6.32-based kernel,
which caused build failure of Open vSwitch kernel modules.

Signed-off-by: Tadaaki Nagao <[email protected]>
Signed-off-by: Jesse Gross <[email protected]>
  • Loading branch information
Tadaaki Nagao authored and jessegross committed Jul 12, 2012
1 parent 2b07c8b commit 6c4ea27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_warn_if_lro],
[OVS_DEFINE([HAVE_SKB_WARN_LRO])])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [consume_skb])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_frag_page])
OVS_GREP_IFELSE([$KSRC/include/linux/string.h], [kmemdup], [],
[OVS_GREP_IFELSE([$KSRC/include/linux/slab.h], [kmemdup])])
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb)
#define consume_skb kfree_skb
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
#ifndef HAVE_SKB_FRAG_PAGE
static inline struct page *skb_frag_page(const skb_frag_t *frag)
{
return frag->page;
Expand Down

0 comments on commit 6c4ea27

Please sign in to comment.