Skip to content

Commit

Permalink
datapath: compat: keep skb mark across tunnel devices.
Browse files Browse the repository at this point in the history
Older kernel skb_scrub_packet() has bug which resets skb mark for
all packet. It is fixed during 3.18 release where it is reset
only for packets crossing namespace. So OVS is forced to use
compat skb_scrub_packet() on older kernel.
This is related to upstream bug fix commit ca7c7b9059e3
("skbuff: Do not scrub skb mark within the same name space").

VMware-BZ: #1710701
Signed-off-by: Pravin B Shelar <[email protected]>
Acked-by: Joe Stringer <[email protected]>
  • Loading branch information
pshelar committed Aug 12, 2016
1 parent 26f858a commit 479feea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,6 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [inner_protocol_type])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_inner_transport_offset])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [kfree_skb_list])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_scrub_packet.*xnet],
[OVS_DEFINE([HAVE_SKB_SCRUB_PACKET_XNET])])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [rxhash])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [u16.*rxhash],
[OVS_DEFINE([HAVE_U16_RXHASH])])
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 @@ -310,7 +310,7 @@ static inline unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int le

#endif

#ifndef HAVE_SKB_SCRUB_PACKET_XNET
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
#define skb_scrub_packet rpl_skb_scrub_packet
void rpl_skb_scrub_packet(struct sk_buff *skb, bool xnet);
#endif
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/skbuff-openvswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void rpl_kfree_skb_list(struct sk_buff *segs)
EXPORT_SYMBOL(rpl_kfree_skb_list);
#endif

#ifndef HAVE_SKB_SCRUB_PACKET_XNET
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)

#define nf_reset_trace rpl_nf_reset_trace
static void nf_reset_trace(struct sk_buff *skb)
Expand Down

0 comments on commit 479feea

Please sign in to comment.