aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/spec
diff options
context:
space:
mode:
Diffstat (limited to 'include/odp/api/spec')
-rw-r--r--include/odp/api/spec/classification.h2
-rw-r--r--include/odp/api/spec/comp.h2
-rw-r--r--include/odp/api/spec/crypto.h2
-rw-r--r--include/odp/api/spec/feature.h76
-rw-r--r--include/odp/api/spec/init.h1
-rw-r--r--include/odp/api/spec/ipsec.h49
-rw-r--r--include/odp/api/spec/packet.h14
-rw-r--r--include/odp/api/spec/packet_types.h8
-rw-r--r--include/odp/api/spec/schedule_types.h2
-rw-r--r--include/odp/api/spec/std_types.h62
-rw-r--r--include/odp/api/spec/support.h57
11 files changed, 129 insertions, 146 deletions
diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h
index f3cfea78b..ec15c8962 100644
--- a/include/odp/api/spec/classification.h
+++ b/include/odp/api/spec/classification.h
@@ -20,7 +20,7 @@ extern "C" {
#endif
#include <odp/api/packet_io.h>
-#include <odp/api/support.h>
+#include <odp/api/std_types.h>
#include <odp/api/threshold.h>
/** @defgroup odp_classification ODP CLASSIFICATION
* Packet input classification.
diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
index a09bd7254..7f64cca5d 100644
--- a/include/odp/api/spec/comp.h
+++ b/include/odp/api/spec/comp.h
@@ -14,7 +14,7 @@
#define ODP_API_SPEC_COMP_H_
#include <odp/visibility_begin.h>
-#include <odp/api/support.h>
+#include <odp/api/std_types.h>
#include <odp/api/packet.h>
#ifdef __cplusplus
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index c5c3f0936..bfda0bcee 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -15,7 +15,7 @@
#include <odp/visibility_begin.h>
#include <odp/api/deprecated.h>
-#include <odp/api/support.h>
+#include <odp/api/std_types.h>
#ifdef __cplusplus
extern "C" {
diff --git a/include/odp/api/spec/feature.h b/include/odp/api/spec/feature.h
deleted file mode 100644
index ccb5cf535..000000000
--- a/include/odp/api/spec/feature.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (c) 2017-2018, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/**
- * @file
- *
- * ODP features.
- * Define various ODP feature sets that can be referenced by other
- * components.
- */
-
-#ifndef ODP_API_SPEC_FEATURE_H_
-#define ODP_API_SPEC_FEATURE_H_
-#include <odp/visibility_begin.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <odp/api/std_types.h>
-
-/** @defgroup odp_features ODP_FEATURE
- * List of ODP features.
- * @{
- */
-
-/** Definition of ODP features */
-typedef union odp_feature_t {
- /** All features */
- uint32_t all_feat;
-
- /** Individual feature bits */
- struct {
- /** Classifier APIs, e.g., odp_cls_xxx(), odp_cos_xxx() */
- uint32_t cls:1;
-
- /** Compression APIs, e.g., odp_comp_xxx() */
- uint32_t compress:1;
-
- /** Crypto APIs, e.g., odp_crypto_xxx() */
- uint32_t crypto:1;
-
- /** IPsec APIs, e.g., odp_ipsec_xxx() */
- uint32_t ipsec:1;
-
- /** Scheduler APIs, e.g., odp_schedule_xxx() */
- uint32_t schedule:1;
-
- /** Stash APIs, e.g., odp_stash_xxx() */
- uint32_t stash:1;
-
- /** Time APIs, e.g., odp_time_xxx() */
- uint32_t time:1;
-
- /** Timer APIs, e.g., odp_timer_xxx(), odp_timeout_xxx() */
- uint32_t timer:1;
-
- /** Traffic Manager APIs, e.g., odp_tm_xxx() */
- uint32_t tm:1;
- } feat;
-
-} odp_feature_t;
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <odp/visibility_end.h>
-#endif
diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h
index d52ac50b6..67e616fce 100644
--- a/include/odp/api/spec/init.h
+++ b/include/odp/api/spec/init.h
@@ -19,7 +19,6 @@ extern "C" {
#include <odp/api/std_types.h>
#include <odp/api/hints.h>
-#include <odp/api/feature.h>
#include <odp/api/spec/thread_types.h>
#include <odp/api/cpumask.h>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 3441d83c9..6e28e7fb4 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -20,7 +20,7 @@ extern "C" {
#endif
#include <odp/api/crypto.h>
-#include <odp/api/support.h>
+#include <odp/api/std_types.h>
#include <odp/api/packet_io.h>
#include <odp/api/protocols.h>
#include <odp/api/classification.h>
@@ -338,6 +338,28 @@ typedef struct odp_ipsec_capability_t {
*/
uint32_t max_cls_cos;
+ /**
+ * Scheduled queue support
+ *
+ * 0: Scheduled queues are not supported either as IPsec SA destination
+ * queues or as IPsec default queue
+ * 1: Scheduled queues are supported as both IPsec SA destination queues
+ * and IPsec default queue
+ * @see odp_ipsec_sa_param_t
+ */
+ odp_bool_t queue_type_sched;
+
+ /**
+ * Plain queue support
+ *
+ * 0: Plain queues are not supported either as IPsec SA destination
+ * queues or as IPsec default queue
+ * 1: Plain queues are supported as both IPsec SA destination queues and
+ * IPsec default queue
+ * @see odp_ipsec_sa_param_t
+ */
+ odp_bool_t queue_type_plain;
+
/** Maximum number of different destination queues. The same queue may
* be used for many SAs. */
uint32_t max_queues;
@@ -1532,6 +1554,17 @@ typedef struct odp_ipsec_packet_result_t {
uint32_t len;
} outer_hdr;
+ /** Total IP length of the original ESP or AH packet before IPsec
+ * decapsulation. This is valid only for inbound inline and async
+ * processed packets. Zero value means that the length information
+ * is not available.
+ *
+ * If the result packet was reassembled from multiple IPsec
+ * protected packets, this is the sum of the lengths of all the
+ * involved IPsec packets.
+ */
+ uint32_t orig_ip_len;
+
} odp_ipsec_packet_result_t;
/**
@@ -1591,9 +1624,10 @@ typedef struct odp_ipsec_status_t {
* packets consumed and outputs a new packet handle for each outputted packet.
* Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t),
* which should be checked for transformation errors, etc. Outputted packets
- * with error status have not been transformed but the original packet is
- * returned. The operation does not modify packets that it does not consume.
- * It cannot consume all input packets if 'num_out' is smaller than 'num_in'.
+ * with error status have undefined content, except that in case of sa_lookup
+ * error the original input packet data is returned. The operation does not
+ * modify packets that it does not consume. It cannot consume all input
+ * packets if 'num_out' is smaller than 'num_in'.
*
* Packet context pointer and user area content are copied from input to output
* packets. Output packets are allocated from the same pool(s) as input packets.
@@ -1675,9 +1709,10 @@ int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in,
* packets consumed and outputs a new packet handle for each outputted packet.
* Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t),
* which should be checked for transformation errors, etc. Outputted packets
- * with error status have not been transformed but the original packet is
- * returned. The operation does not modify packets that it does not consume.
- * It cannot consume all input packets if 'num_out' is smaller than 'num_in'.
+ * with error status have undefined content, except that in case of MTU error
+ * the original input packet data is returned. The operation does not modify
+ * packets that it does not consume. It cannot consume all input packets if
+ * 'num_out' is smaller than 'num_in'.
*
* Packet context pointer and user area content are copied from input to output
* packets. Output packets are allocated from the same pool(s) as input packets.
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index 2285a857d..e8f3cbc4a 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -180,6 +180,20 @@ void odp_packet_to_event_multi(const odp_packet_t pkt[], odp_event_t ev[],
int num);
/**
+ * Get information about successful reassembly offload that has happened
+ *
+ * This function may be called only if the reassembly status of a packet
+ * is ODP_PACKET_REASS_COMPLETE.
+ *
+ * @param pkt Completely reassembled packet.
+ * @param[out] info Pointer to the info structure to be filled
+ *
+ * @retval 0 on success
+ * @retval <0 on failure
+ */
+int odp_packet_reass_info(odp_packet_t pkt, odp_packet_reass_info_t *info);
+
+/**
* Get partial reassembly state from a packet
*
* In case of incomplete reassembly, a packet carries information on
diff --git a/include/odp/api/spec/packet_types.h b/include/odp/api/spec/packet_types.h
index 5549f03aa..52b0e22b6 100644
--- a/include/odp/api/spec/packet_types.h
+++ b/include/odp/api/spec/packet_types.h
@@ -286,6 +286,14 @@ typedef enum odp_packet_reass_status_t {
} odp_packet_reass_status_t;
/**
+ * Information about a completed reassembly
+ */
+typedef struct odp_packet_reass_info_t {
+ /** Number of fragments reassembled */
+ uint16_t num_frags;
+} odp_packet_reass_info_t;
+
+/**
* Result from odp_packet_reass_partial_state()
*/
typedef struct odp_packet_reass_partial_state_t {
diff --git a/include/odp/api/spec/schedule_types.h b/include/odp/api/spec/schedule_types.h
index 90146585f..8421b4107 100644
--- a/include/odp/api/spec/schedule_types.h
+++ b/include/odp/api/spec/schedule_types.h
@@ -14,7 +14,7 @@
#define ODP_API_SPEC_SCHEDULE_TYPES_H_
#include <odp/visibility_begin.h>
-#include <odp/api/support.h>
+#include <odp/api/std_types.h>
#ifdef __cplusplus
extern "C" {
diff --git a/include/odp/api/spec/std_types.h b/include/odp/api/spec/std_types.h
index 5dc350a24..41f436065 100644
--- a/include/odp/api/spec/std_types.h
+++ b/include/odp/api/spec/std_types.h
@@ -9,7 +9,7 @@
/**
* @file
*
- * Standard C language types and definitions for ODP.
+ * Common types and definitions for ODP API files.
*
*/
@@ -96,6 +96,66 @@ typedef struct odp_fract_u64_t {
} odp_fract_u64_t;
/**
+ * ODP support
+ *
+ * Support levels are specified in the relative order, where ODP_SUPPORT_NO is
+ * the lowest level. E.g. if the examined support level is greater than
+ * ODP_SUPPORT_NO, the feature is supported in some form.
+ */
+typedef enum odp_support_t {
+ /**
+ * Feature is not supported
+ */
+ ODP_SUPPORT_NO = 0,
+ /**
+ * Feature is supported
+ */
+ ODP_SUPPORT_YES,
+ /**
+ * Feature is supported and preferred
+ */
+ ODP_SUPPORT_PREFERRED
+
+} odp_support_t;
+
+/** Definition of ODP features */
+typedef union odp_feature_t {
+ /** All features */
+ uint32_t all_feat;
+
+ /** Individual feature bits */
+ struct {
+ /** Classifier APIs, e.g., odp_cls_xxx(), odp_cos_xxx() */
+ uint32_t cls:1;
+
+ /** Compression APIs, e.g., odp_comp_xxx() */
+ uint32_t compress:1;
+
+ /** Crypto APIs, e.g., odp_crypto_xxx() */
+ uint32_t crypto:1;
+
+ /** IPsec APIs, e.g., odp_ipsec_xxx() */
+ uint32_t ipsec:1;
+
+ /** Scheduler APIs, e.g., odp_schedule_xxx() */
+ uint32_t schedule:1;
+
+ /** Stash APIs, e.g., odp_stash_xxx() */
+ uint32_t stash:1;
+
+ /** Time APIs, e.g., odp_time_xxx() */
+ uint32_t time:1;
+
+ /** Timer APIs, e.g., odp_timer_xxx(), odp_timeout_xxx() */
+ uint32_t timer:1;
+
+ /** Traffic Manager APIs, e.g., odp_tm_xxx() */
+ uint32_t tm:1;
+ } feat;
+
+} odp_feature_t;
+
+/**
* @}
*/
diff --git a/include/odp/api/spec/support.h b/include/odp/api/spec/support.h
deleted file mode 100644
index 10611219d..000000000
--- a/include/odp/api/spec/support.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (c) 2017-2018, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/**
- * @file
- *
- * ODP support API
- */
-
-#ifndef ODP_API_SPEC_SUPPORT_H_
-#define ODP_API_SPEC_SUPPORT_H_
-#include <odp/visibility_begin.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @defgroup odp_support ODP SUPPORT
- * Feature support levels.
- * @{
- */
-
-/**
- * ODP support support
- *
- * Support levels are specified in the relative order, where ODP_SUPPORT_NO is
- * the lowest level. E.g. if the examined support level is greater than
- * ODP_SUPPORT_NO, the feature is supported in some form.
- */
-typedef enum odp_support_t {
- /**
- * Feature is not supported
- */
- ODP_SUPPORT_NO = 0,
- /**
- * Feature is supported
- */
- ODP_SUPPORT_YES,
- /**
- * Feature is supported and preferred
- */
- ODP_SUPPORT_PREFERRED
-} odp_support_t;
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <odp/visibility_end.h>
-#endif