diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-03-04 12:01:54 +0100 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-03-04 12:01:54 +0100 |
commit | 348fa3f6871f56a37dcd16c99ca98118c6d79a38 (patch) | |
tree | 6fcae7785bae4ffb838fd6549f7d01ba6abf0763 /backport-include/net/tso.h |
Backports v4.19.24
Backports generated by toradex backports 515a1fa55cda2b1d952872e1786857481bd54fcc
against mainline kernel tag v4.19.24
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'backport-include/net/tso.h')
-rw-r--r-- | backport-include/net/tso.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/backport-include/net/tso.h b/backport-include/net/tso.h new file mode 100644 index 0000000..3a3f50b --- /dev/null +++ b/backport-include/net/tso.h @@ -0,0 +1,33 @@ +#ifndef BACKPORT_TSO_H +#define BACKPORT_TSO_H + +#include <net/ip.h> + +#if LINUX_VERSION_IS_LESS(4,4,0) + +#define tso_t LINUX_BACKPORT(tso_t) +struct tso_t { + int next_frag_idx; + void *data; + size_t size; + u16 ip_id; + bool ipv6; + u32 tcp_seq; +}; + +#define tso_count_descs LINUX_BACKPORT(tso_count_descs) +int tso_count_descs(struct sk_buff *skb); + +#define tso_build_hdr LINUX_BACKPORT(tso_build_hdr) +void tso_build_hdr(struct sk_buff *skb, char *hdr, struct tso_t *tso, + int size, bool is_last); +#define tso_build_data LINUX_BACKPORT(tso_build_data) +void tso_build_data(struct sk_buff *skb, struct tso_t *tso, int size); +#define tso_start LINUX_BACKPORT(tso_start) +void tso_start(struct sk_buff *skb, struct tso_t *tso); + +#else +#include_next <net/tso.h> +#endif + +#endif /* BACKPORT_TSO_H */ |