summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backport/backport-include/linux/skbuff.h9
-rw-r--r--patches/0059-skb_xmit_more/skb_no_xmit_more.cocci10
2 files changed, 12 insertions, 7 deletions
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index 034206b6..61133c42 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -200,6 +200,15 @@ static inline struct sk_buff *__pskb_copy_fclone(struct sk_buff *skb,
struct sk_buff *skb_clone_sk(struct sk_buff *skb);
#endif
+static inline bool skb_xmit_more(struct sk_buff *skb)
+{
+#if LINUX_VERSION_IS_LESS(3,18,0)
+ return false;
+#else
+ return skb->xmit_more;
+#endif
+}
+
#if LINUX_VERSION_IS_LESS(3,19,0)
/**
* __dev_alloc_pages - allocate page for network Rx
diff --git a/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci b/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci
index ab20c833..bf7f22e2 100644
--- a/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci
+++ b/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci
@@ -1,9 +1,5 @@
-@r1@
+@@
struct sk_buff *skb;
-expression E1;
@@
- if (E1
-+#if LINUX_VERSION_IS_GEQ(3,18,0)
- || !skb->xmit_more
-+#endif /* if LINUX_VERSION_IS_GEQ(3,18,0) */
- ) {...}
+-skb->xmit_more
++skb_xmit_more(skb)