diff mbox series

[8/8] headers: add skb_tcp_all_headers

Message ID 20221013085351.14516-8-nbd@nbd.name (mailing list archive)
State New, archived
Headers show
Series [1/8] headers: backport napi add functions | expand

Commit Message

Felix Fietkau Oct. 13, 2022, 8:53 a.m. UTC
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 backport/backport-include/linux/tcp.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 backport/backport-include/linux/tcp.h
diff mbox series

Patch

diff --git a/backport/backport-include/linux/tcp.h b/backport/backport-include/linux/tcp.h
new file mode 100644
index 000000000000..2483cbebf66c
--- /dev/null
+++ b/backport/backport-include/linux/tcp.h
@@ -0,0 +1,14 @@ 
+#ifndef __BACKPORT_LINUX_TCP_H
+#define __BACKPORT_LINUX_TCP_H
+
+#include_next <linux/tcp.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_LESS(6,0,0)
+static inline int skb_tcp_all_headers(const struct sk_buff *skb)
+{
+	return skb_transport_offset(skb) + tcp_hdrlen(skb);
+}
+#endif
+
+#endif