Skip to content

Commit

Permalink
datapath: compat: Fix build on RHEL 6.6
Browse files Browse the repository at this point in the history
RHEL 6.6 kernel percpu APIs are broken, so following patch is using OVS
backported version.

Reported-by: Wang Sheng-Hui <[email protected]>
Signed-off-by: Pravin B Shelar <[email protected]>
  • Loading branch information
Pravin B Shelar committed Nov 19, 2014
1 parent a2c3caf commit 3d174bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions datapath/linux/compat/include/linux/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
#define this_cpu_ptr(ptr) per_cpu_ptr(ptr, smp_processor_id())
#endif

#ifdef HAVE_RHEL_OVS_HOOK
#undef this_cpu_read
#undef this_cpu_inc
#undef this_cpu_dec
#endif

#if !defined this_cpu_read
#define this_cpu_read(ptr) percpu_read(ptr)
#endif
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 @@ -302,7 +302,7 @@ static inline void skb_clear_hash(struct sk_buff *skb)
#ifdef HAVE_RXHASH
skb->rxhash = 0;
#endif
#ifdef HAVE_L4_RXHASH
#if defined(HAVE_L4_RXHASH) && !defined(HAVE_RHEL_OVS_HOOK)
skb->l4_rxhash = 0;
#endif
}
Expand Down

0 comments on commit 3d174bf

Please sign in to comment.