aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2021-01-15 10:45:42 +0200
committerGitHub <noreply@github.com>2021-01-15 10:45:42 +0200
commit0ecc932423ba63ef10239f64f1b2cde16e155732 (patch)
treeabbee3e3f4ba6fdda18aa2d5eed9eadb0d4db51e /helper
parent041cfc475dcd48de182e8225aaec76ed55257fd7 (diff)
parent8bdd456481101189ba80e18b21b4e7a4295cec70 (diff)
Merge ODP linux-generic v1.25.2.0v1.25.2.0_DPDK_19.11
Merge ODP linux-generic v1.25.2.0 into ODP-DPDK.
Diffstat (limited to 'helper')
-rw-r--r--helper/Makefile.am2
-rw-r--r--helper/include/odp/helper/gtp.h38
-rw-r--r--helper/include/odp/helper/igmp.h39
-rw-r--r--helper/include/odp/helper/ip.h1
-rw-r--r--helper/include/odp/helper/odph_api.h2
5 files changed, 82 insertions, 0 deletions
diff --git a/helper/Makefile.am b/helper/Makefile.am
index fa59d82da..f99fc8d83 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -19,7 +19,9 @@ helperinclude_HEADERS = \
include/odp/helper/chksum.h\
include/odp/helper/odph_debug.h \
include/odp/helper/eth.h\
+ include/odp/helper/gtp.h\
include/odp/helper/icmp.h\
+ include/odp/helper/igmp.h\
include/odp/helper/ip.h\
include/odp/helper/ipsec.h\
include/odp/helper/odph_api.h\
diff --git a/helper/include/odp/helper/gtp.h b/helper/include/odp/helper/gtp.h
new file mode 100644
index 000000000..d542dc6b3
--- /dev/null
+++ b/helper/include/odp/helper/gtp.h
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2020 Marvell.
+ */
+/**
+ * @file
+ *
+ * ODP GTP header
+ */
+#ifndef _ODPH_GTP_H_
+#define _ODPH_GTP_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp_api.h>
+
+/**
+ * Simplified GTP protocol header.
+ * Contains 8-bit gtp_hdr_info, 8-bit msg_type,
+ * 16-bit plen, 32-bit teid.
+ * No optional fields and next extension header.
+ */
+typedef struct ODP_PACKED {
+ uint8_t gtp_hdr_info; /**< GTP header info */
+ uint8_t msg_type; /**< GTP message type */
+ odp_u16be_t plen; /**< Total payload length */
+ odp_u32be_t teid; /**< Tunnel endpoint ID */
+} odph_gtphdr_t;
+
+/** GTP header length */
+#define ODP_GTP_HLEN sizeof(odph_gtphdr_t)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ODP_GTP_H_ */
diff --git a/helper/include/odp/helper/igmp.h b/helper/include/odp/helper/igmp.h
new file mode 100644
index 000000000..5cff41aab
--- /dev/null
+++ b/helper/include/odp/helper/igmp.h
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2020 Marvell.
+ */
+
+/**
+ * @file
+ *
+ * ODP IGMP header
+ */
+#ifndef _ODPH_IGMP_H_
+#define _ODPH_IGMP_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp_api.h>
+
+/**
+ * Simplified IGMP protocol header.
+ * Contains 8-bit type, 8-bit code,
+ * 16-bit csum, 32-bit group.
+ * No optional fields and next extension header.
+ */
+typedef struct ODP_PACKED {
+ uint8_t type; /** Message Type */
+ uint8_t code; /** Max response code */
+ odp_u16be_t csum; /** Checksum */
+ odp_u32be_t group; /** Group address */
+} odph_igmphdr_t;
+
+/** IGMP header length */
+#define ODP_IGMP_HLEN sizeof(odph_igmphdr_t)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ODP_IGMP_H_ */
diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h
index b5bfed78c..3fac438f1 100644
--- a/helper/include/odp/helper/ip.h
+++ b/helper/include/odp/helper/ip.h
@@ -252,6 +252,7 @@ typedef struct ODP_PACKED {
* @{*/
#define ODPH_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */
#define ODPH_IPPROTO_ICMPV4 0x01 /**< Internet Control Message Protocol (1) */
+#define ODPH_IPPROTO_IGMP 0x02 /**< Internet Group Message Protocol (1) */
#define ODPH_IPPROTO_TCP 0x06 /**< Transmission Control Protocol (6) */
#define ODPH_IPPROTO_UDP 0x11 /**< User Datagram Protocol (17) */
#define ODPH_IPPROTO_ROUTE 0x2B /**< IPv6 Routing header (43) */
diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h
index 921914aa2..f3bcde208 100644
--- a/helper/include/odp/helper/odph_api.h
+++ b/helper/include/odp/helper/odph_api.h
@@ -22,8 +22,10 @@ extern "C" {
#include <odp/helper/chksum.h>
#include <odp/helper/odph_cuckootable.h>
#include <odp/helper/eth.h>
+#include <odp/helper/gtp.h>
#include <odp/helper/odph_hashtable.h>
#include <odp/helper/icmp.h>
+#include <odp/helper/igmp.h>
#include <odp/helper/ip.h>
#include <odp/helper/ipsec.h>
#include <odp/helper/odph_lineartable.h>