Skip to content

Commit

Permalink
datapath: compat: Use udp-checksum function for compat case.
Browse files Browse the repository at this point in the history
udp_set_csum() has bug fix that is not relevant for upstream
(commit c77d947).
So OVS need to use compat function. This function is also
used from UDP xmit path so we have to check USE_UPSTREAM_TUNNEL.
Following patch couple this function to USE_UPSTREAM_TUNNEL symbol
rather than kernel version.
This is not bug, This patch help in code readability.

Signed-off-by: Pravin B Shelar <[email protected]>
Acked-by: Jesse Gross <[email protected]>
  • Loading branch information
pshelar committed Aug 3, 2016
1 parent b4409ed commit 06478ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datapath/linux/compat/include/net/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static inline __sum16 udp_v4_check(int len, __be32 saddr,
}
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
#ifndef USE_UPSTREAM_TUNNEL
#define udp_set_csum rpl_udp_set_csum
void rpl_udp_set_csum(bool nocheck, struct sk_buff *skb,
__be32 saddr, __be32 daddr, int len);
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/udp.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <linux/version.h>

#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
#ifndef USE_UPSTREAM_TUNNEL

#include <net/udp.h>

Expand Down

0 comments on commit 06478ca

Please sign in to comment.