examples/fips_validation: fix buffer overflow
[dpdk.git] / lib / librte_flow_classify / rte_flow_classify.h
index b1016d3..82ea92b 100644 (file)
@@ -8,9 +8,11 @@
 /**
  * @file
  *
- * RTE Flow Classify Library
+ * RTE Flow Classify Library.
  *
- * @b EXPERIMENTAL: this API may change without prior notice
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
  *
  * This library provides flow record information with some measured properties.
  *
@@ -41,6 +43,8 @@
  *    with rte_flow_classifier_free()
  */
 
+#include <rte_compat.h>
+#include <rte_common.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
 #include <rte_flow.h>
@@ -53,9 +57,12 @@ extern "C" {
 
 extern int librte_flow_classify_logtype;
 
-#define RTE_FLOW_CLASSIFY_LOG(level, fmt, args...) \
-rte_log(RTE_LOG_ ## level, librte_flow_classify_logtype, "%s(): " fmt, \
-       __func__, ## args)
+#define RTE_FLOW_CLASSIFY_LOG(level, ...) \
+       rte_log(RTE_LOG_ ## level, \
+               librte_flow_classify_logtype, \
+               RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,), \
+                       __func__, \
+                       RTE_FMT_TAIL(__VA_ARGS__,)))
 
 #ifndef RTE_FLOW_CLASSIFY_TABLE_MAX
 #define RTE_FLOW_CLASSIFY_TABLE_MAX            32
@@ -150,6 +157,7 @@ struct rte_flow_classify_ipv4_5tuple_stats {
  * @return
  *   Handle to flow classifier instance on success or NULL otherwise
  */
+__rte_experimental
 struct rte_flow_classifier *
 rte_flow_classifier_create(struct rte_flow_classifier_params *params);
 
@@ -161,6 +169,7 @@ rte_flow_classifier_create(struct rte_flow_classifier_params *params);
  * @return
  *   0 on success, error code otherwise
  */
+__rte_experimental
 int
 rte_flow_classifier_free(struct rte_flow_classifier *cls);
 
@@ -174,6 +183,7 @@ rte_flow_classifier_free(struct rte_flow_classifier *cls);
  * @return
  *   0 on success, error code otherwise
  */
+__rte_experimental
 int
 rte_flow_classify_table_create(struct rte_flow_classifier *cls,
                struct rte_flow_classify_table_params *params);
@@ -195,6 +205,7 @@ rte_flow_classify_table_create(struct rte_flow_classifier *cls,
  * @return
  *   0 on success, error code otherwise
  */
+__rte_experimental
 int
 rte_flow_classify_validate(struct rte_flow_classifier *cls,
                const struct rte_flow_attr *attr,
@@ -203,7 +214,7 @@ rte_flow_classify_validate(struct rte_flow_classifier *cls,
                struct rte_flow_error *error);
 
 /**
- * Add a flow classify rule to the flow_classifer table.
+ * Add a flow classify rule to the flow_classifier table.
  *
  * @param[in] cls
  *   Flow classifier handle
@@ -221,6 +232,7 @@ rte_flow_classify_validate(struct rte_flow_classifier *cls,
  * @return
  *   A valid handle in case of success, NULL otherwise.
  */
+__rte_experimental
 struct rte_flow_classify_rule *
 rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls,
                const struct rte_flow_attr *attr,
@@ -230,7 +242,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls,
                struct rte_flow_error *error);
 
 /**
- * Delete a flow classify rule from the flow_classifer table.
+ * Delete a flow classify rule from the flow_classifier table.
  *
  * @param[in] cls
  *   Flow classifier handle
@@ -239,6 +251,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls,
  * @return
  *   0 on success, error code otherwise.
  */
+__rte_experimental
 int
 rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls,
                struct rte_flow_classify_rule *rule);
@@ -260,6 +273,7 @@ rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls,
  * @return
  *   0 on success, error code otherwise.
  */
+__rte_experimental
 int
 rte_flow_classifier_query(struct rte_flow_classifier *cls,
                struct rte_mbuf **pkts,