aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStanislaw Kardach <skardach@marvell.com>2020-08-03 10:41:01 +0200
committerMatias Elo <matias.elo@nokia.com>2020-09-03 12:34:25 +0300
commit5705dc1fc799763e99c2a3873905260cac276597 (patch)
tree7d27758bb9f05333270eee83333f029565b0010a /include
parentf702e657c79b5407651d8b8a1072a5f8b8d11287 (diff)
api: packet: define ODP_NUM_PACKET_COLORS value
The number of colors should be strictly defined in the spec since the number of spec colors is limited to 3. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/abi-default/packet.h2
-rw-r--r--include/odp/api/spec/packet.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/include/odp/api/abi-default/packet.h b/include/odp/api/abi-default/packet.h
index c8eecbacf..ab7d8ff5c 100644
--- a/include/odp/api/abi-default/packet.h
+++ b/include/odp/api/abi-default/packet.h
@@ -70,8 +70,6 @@ typedef enum {
ODP_PACKET_ALL_COLORS = 3,
} odp_packet_color_t;
-#define ODP_NUM_PACKET_COLORS 3
-
/** Parse result flags */
typedef struct odp_packet_parse_result_flag_t {
/** Flags union */
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index a13216c2f..958295610 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -71,6 +71,12 @@ extern "C" {
*/
/**
+ * Maximum number of packet colors which accommodates ODP_PACKET_GREEN, ODP_PACKET_YELLOW and
+ * ODP_PACKET_RED.
+ */
+#define ODP_NUM_PACKET_COLORS 3
+
+/**
* @typedef odp_proto_l2_type_t
* Layer 2 protocol type
*/