This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via b95e7d08043ba45d12635c5afaa3fbf3a07ecc90 (commit) via a8caa46fbe095a8308538539907e5af664fafea8 (commit) via a72a1e82ad31d5555c644508d5f35c590b3c4073 (commit) via 94cea0ca54d4a10f5e46c76d6047422274294aec (commit) from 2e93b540f69eae505b4505ada1912ac0d2bdea31 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit b95e7d08043ba45d12635c5afaa3fbf3a07ecc90 Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Mon Nov 6 23:25:40 2017 +0530
linux-generic: classification: implement random early detection and back pressure
linux-generic does not support random early detection and back pressure
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Nikhil Agarwal nikhil.agarwal@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index a5cba56a..025f1259 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -190,6 +190,10 @@ int odp_cls_capability(odp_cls_capability_t *capability) capability->supported_terms.bit.tcp_sport = 1; capability->supported_terms.bit.sip_addr = 1; capability->supported_terms.bit.dip_addr = 1; + capability->random_early_detection = ODP_SUPPORT_NO; + capability->back_pressure = ODP_SUPPORT_NO; + capability->threshold_red.all_bits = 0; + capability->threshold_bp.all_bits = 0; return 0; }
commit a8caa46fbe095a8308538539907e5af664fafea8 Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Mon Nov 6 23:24:28 2017 +0530
api: classification: add random early detection and back pressure
Adds random early detection and Back pressure feature to CoS
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Nikhil Agarwal nikhil.agarwal@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h index 0c4a95c5..16bf3e6e 100644 --- a/include/odp/api/spec/classification.h +++ b/include/odp/api/spec/classification.h @@ -20,6 +20,7 @@ extern "C" {
#include <odp/api/packet_io.h> #include <odp/api/support.h> +#include <odp/api/threshold.h> /** @defgroup odp_classification ODP CLASSIFICATION * Classification operations. * @{ @@ -107,6 +108,61 @@ typedef union odp_cls_pmr_terms_t { uint64_t all_bits; } odp_cls_pmr_terms_t;
+/** Random Early Detection (RED) + * Random Early Detection is enabled to initiate a drop probability for the + * incoming packet when the packets in the queue/pool cross the specified + * threshold values. RED is enabled when 'red_enable' boolean is true and + * the resource usage is equal to or greater than the minimum threshold value. + * Resource usage could be defined either as the percentage of pool being full + * or the number of packets/bytes occupied in the queue depening on the platform + * capabilities. + * When RED is enabled for a particular flow then further incoming packets are + * assigned a drop probability based on the size of the pool/queue. + * + * Drop probability is configured as follows + * * Drop probability is 100%, when resource usage >= threshold.max + * * Drop probability is 0%, when resource usage <= threshold.min + * * Drop probability is between 0...100 % when resource usage is between + * threshold.min and threshold.max + * + * RED is logically configured in the CoS and could be implemented in either + * pool or queue linked to the CoS depending on platform capabilities. + * Application should make sure not to link multiple CoS with different RED or + * BP configuration to the same queue or pool. + */ +typedef struct odp_red_param_t { + /** A boolean to enable RED + * When true, RED is enabled and configured with RED parameters. + * Otherwise, RED parameters are ignored. */ + odp_bool_t enable; + + /** Threshold parameters for RED + * RED is enabled when the resource usage is equal to or greater than + * the minimum threshold value and is disabled otherwise + */ + odp_threshold_t threshold; +} odp_red_param_t; + +/** Back pressure (BP) + * When back pressure is enabled for a particular flow, the HW can send + * back pressure information to the remote peer indicating a network congestion. + */ +typedef struct odp_bp_param_t { + /** A boolean to enable Back pressure + * When true, back pressure is enabled and configured with the BP + * parameters. Otherwise BP parameters are ignored. + */ + odp_bool_t enable; + + /** Threshold value for back pressure. + * BP is enabled when the resource usage is equal to or greater than the + * max backpressure threshold. Min threshold parameters are ignored for + * BP configuration. + * @see odp_red_param_t for 'resource usage' documentation. + */ + odp_threshold_t threshold; +} odp_bp_param_t; + /** * Classification capabilities * This capability structure defines system level classification capability @@ -135,6 +191,18 @@ typedef struct odp_cls_capability_t {
/** A Boolean to denote support of PMR range */ odp_bool_t pmr_range_supported; + + /** Support for Random Early Detection */ + odp_support_t random_early_detection; + + /** Supported threshold type for RED */ + odp_threshold_types_t threshold_red; + + /** Support for Back Pressure to the remote peer */ + odp_support_t back_pressure; + + /** Supported threshold type for BP */ + odp_threshold_types_t threshold_bp; } odp_cls_capability_t;
/** @@ -206,6 +274,12 @@ typedef struct odp_cls_cos_param {
/** Drop policy associated with CoS */ odp_cls_drop_t drop_policy; + + /** Random Early Detection configuration */ + odp_red_param_t red; + + /** Back Pressure configuration */ + odp_bp_param_t bp; } odp_cls_cos_param_t;
/**
commit a72a1e82ad31d5555c644508d5f35c590b3c4073 Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Mon Nov 6 23:22:14 2017 +0530
api: threshold: add odp_threshold_t parameter
odp_threshold_t is used to configure different threshold types
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Nikhil Agarwal nikhil.agarwal@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/Makefile.am b/include/Makefile.am index 4e2d748b..02f9c44a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -43,6 +43,7 @@ odpapispecinclude_HEADERS = \ odp/api/spec/sync.h \ odp/api/spec/system_info.h \ odp/api/spec/thread.h \ + odp/api/spec/threshold.h \ odp/api/spec/thrmask.h \ odp/api/spec/ticketlock.h \ odp/api/spec/time.h \ diff --git a/include/odp/api/spec/threshold.h b/include/odp/api/spec/threshold.h new file mode 100644 index 00000000..38c2430a --- /dev/null +++ b/include/odp/api/spec/threshold.h @@ -0,0 +1,105 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP threshold descriptor + */ + +#ifndef ODP_API_THRESHOLD_H_ +#define ODP_API_THRESHOLD_H_ +#include <odp/visibility_begin.h> +#include <odp/api/std_types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Supported threshold types + * + * Supported threshold types in a bit field structure. + */ +typedef union odp_threshold_types_t { + /** bitfields for different threshold types */ + struct { + /** Percentage of the total size of pool or queue */ + uint8_t percent:1; + + /** Total number of all transient packets */ + uint8_t packet:1; + + /** Total size of all transient packets in bytes */ + uint8_t bytes:1; + }; + + /** All bits of the bit field structure */ + uint8_t all_bits; +} odp_threshold_types_t; + +/** + * ODP Threshold types + * + * Different types of threshold measurements + */ +typedef enum odp_threshold_type_t { + /** Percentage of the total size of pool or queue */ + ODP_THRESHOLD_PERCENT, + + /** Total number of all transient packets */ + ODP_THRESHOLD_PACKET, + + /** Total size of all transient packets in bytes */ + ODP_THRESHOLD_BYTE +} odp_threshold_type_t; + +/** + * ODP Threshold + * + * Threshold configuration + */ +typedef struct odp_threshold_t { + /** Type of threshold */ + odp_threshold_type_t type; + + /** Different threshold types */ + union { + /** Percentage */ + struct { + /** Max percentage value */ + odp_percent_t max; + + /** Min percentage value */ + odp_percent_t min; + } percent; + + /** Packet count */ + struct { + /** Max packet count */ + uint64_t max; + + /** Min packet count */ + uint64_t min; + } packet; + + /** Sum of all data bytes of all packets */ + struct { + /** Max byte count */ + uint64_t max; + + /** Min byte count */ + uint64_t min; + } byte; + }; +} odp_threshold_t; + +#ifdef __cplusplus +} +#endif + +#include <odp/visibility_end.h> +#endif diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 990eb433..8f783463 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -65,6 +65,7 @@ odpapiinclude_HEADERS = \ include/odp/api/sync.h \ include/odp/api/system_info.h \ include/odp/api/thread.h \ + include/odp/api/threshold.h \ include/odp/api/thrmask.h \ include/odp/api/ticketlock.h \ include/odp/api/time.h \ diff --git a/platform/linux-generic/include/odp/api/threshold.h b/platform/linux-generic/include/odp/api/threshold.h new file mode 100644 index 00000000..f4f36285 --- /dev/null +++ b/platform/linux-generic/include/odp/api/threshold.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP threshold API - platform specific header + */ + +#ifndef ODP_PLAT_THRESHOLD_H_ +#define ODP_PLAT_THRESHOLD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @ingroup odp_threshold + * @{ + */ + +/** + * @} + */ + +#include <odp/api/spec/threshold.h> + +#ifdef __cplusplus +} +#endif + +#endif
commit 94cea0ca54d4a10f5e46c76d6047422274294aec Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Fri Nov 10 16:57:02 2017 +0530
api: std_types: add odp_percent_t data type
odp_percent_t is used to express values which are percentages
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Nikhil Agarwal nikhil.agarwal@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/std_types.h b/include/odp/api/spec/std_types.h index ec6a6df6..9b4f894d 100644 --- a/include/odp/api/spec/std_types.h +++ b/include/odp/api/spec/std_types.h @@ -15,6 +15,8 @@ #ifndef ODP_API_STD_TYPES_H_ #define ODP_API_STD_TYPES_H_ #include <odp/visibility_begin.h> +/* uint64_t, uint32_t, etc */ +#include <stdint.h>
#ifdef __cplusplus extern "C" { @@ -31,6 +33,14 @@ extern "C" { * between e.g. different compilers. */
+/** + * Percentage type + * Use odp_percent_t for specifying fields that are percentages. It is a fixed + * point integer whose units are expressed as one-hundredth of a percent. + * Hence 100% is represented as integer value 10000. + */ +typedef uint32_t odp_percent_t; + /** * @} */
-----------------------------------------------------------------------
Summary of changes: include/Makefile.am | 1 + include/odp/api/spec/classification.h | 74 +++++++++++++++ include/odp/api/spec/std_types.h | 10 ++ include/odp/api/spec/threshold.h | 105 +++++++++++++++++++++ platform/linux-generic/Makefile.am | 1 + .../include/odp/api/{chksum.h => threshold.h} | 10 +- platform/linux-generic/odp_classification.c | 4 + 7 files changed, 200 insertions(+), 5 deletions(-) create mode 100644 include/odp/api/spec/threshold.h copy platform/linux-generic/include/odp/api/{chksum.h => threshold.h} (58%)
hooks/post-receive