summaryrefslogtreecommitdiff
path: root/lib/librte_meter
diff options
context:
space:
mode:
authorReshma Pattan <reshma.pattan@intel.com>2018-12-20 12:16:08 +0000
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-12-20 19:00:10 +0100
commitc712b0132645eff71bbc11fb18659c5775c1d3d7 (patch)
tree993ffdcf4371ce6d2acc486dcd0a50dcf72c0353 /lib/librte_meter
parentfff6df7bf58e8907c710832738a26d8d67c8256c (diff)
downloaddpdk-c712b0132645eff71bbc11fb18659c5775c1d3d7.zip
dpdk-c712b0132645eff71bbc11fb18659c5775c1d3d7.tar.gz
dpdk-c712b0132645eff71bbc11fb18659c5775c1d3d7.tar.xz
meter: unify packet color definition
Added new rte_color definition in librte_meter to consolidate color definition which is currently replicated in various places such as rte_meter.h, rte_tm.h and rte_mtr.h Created aliases for rte_tm_color, rte_mtr_color and rte_meter_color to use new rte_color values. The definitions of rte_tm_color, rte_mtr_color and rte_meter_color will be deprecated in future. Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Diffstat (limited to 'lib/librte_meter')
-rw-r--r--lib/librte_meter/rte_meter.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/librte_meter/rte_meter.h b/lib/librte_meter/rte_meter.h
index 58a0515..c2ea473 100644
--- a/lib/librte_meter/rte_meter.h
+++ b/lib/librte_meter/rte_meter.h
@@ -26,14 +26,23 @@ extern "C" {
*
***/
-/** Packet Color Set */
-enum rte_meter_color {
- e_RTE_METER_GREEN = 0, /**< Green */
- e_RTE_METER_YELLOW, /**< Yellow */
- e_RTE_METER_RED, /**< Red */
- e_RTE_METER_COLORS /**< Number of available colors */
+/**
+ * Color
+ */
+enum rte_color {
+ RTE_COLOR_GREEN = 0, /**< Green */
+ RTE_COLOR_YELLOW, /**< Yellow */
+ RTE_COLOR_RED, /**< Red */
+ RTE_COLORS /**< Number of colors */
};
+/* New rte_color is defined and used to deprecate rte_meter_color soon. */
+#define rte_meter_color rte_color
+#define e_RTE_METER_GREEN RTE_COLOR_GREEN
+#define e_RTE_METER_YELLOW RTE_COLOR_YELLOW
+#define e_RTE_METER_RED RTE_COLOR_RED
+#define e_RTE_METER_COLORS RTE_COLORS
+
/** srTCM parameters per metered traffic flow. The CIR, CBS and EBS parameters only
count bytes of IP packets and do not include link specific headers. At least one of
the CBS or EBS parameters has to be greater than zero. */