aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_gro/gro_tcp4.h
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-04-15 14:36:48 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-04-15 14:39:46 +0200
commite2bea7436061ca2e7e14bfcfdc5870f2555c3965 (patch)
tree46c62ce8f227674d6880430f9623edb4e77b9f9a /lib/librte_gro/gro_tcp4.h
parenta4f0fa29488e582ab8b5ef9db475b3d26ded690c (diff)
New upstream version 18.11.1
Change-Id: Ic52e74a9ed6f3ae06acea4a27357bd7153efc2a3 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'lib/librte_gro/gro_tcp4.h')
-rw-r--r--lib/librte_gro/gro_tcp4.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/librte_gro/gro_tcp4.h b/lib/librte_gro/gro_tcp4.h
index 6bb30cdb..d9792488 100644
--- a/lib/librte_gro/gro_tcp4.h
+++ b/lib/librte_gro/gro_tcp4.h
@@ -17,6 +17,11 @@
*/
#define MAX_IPV4_PKT_LENGTH UINT16_MAX
+/* The maximum TCP header length */
+#define MAX_TCP_HLEN 60
+#define INVALID_TCP_HDRLEN(len) \
+ (((len) < sizeof(struct tcp_hdr)) || ((len) > MAX_TCP_HLEN))
+
/* Header fields representing a TCP/IPv4 flow */
struct tcp4_flow_key {
struct ether_addr eth_saddr;