diff mbox

Fwd: [API-NEXT PATCHv3 2/4] api: classification: add ODP_PMR_CUSTOM_FRAME

Message ID CAGr7dC1j3-N1eToQd90EUOUYpaSPxZRZasGdjs_9J_1Zm4OEHg@mail.gmail.com
State New
Headers show

Commit Message

Balasubramanian Manoharan Aug. 28, 2015, 11:30 a.m. UTC
Hi,

I have added the following comment on this patch 2/4 regarding the
naming for this patch. Other than this I am fine with this patch.

Regards,
Bala
---------- Forwarded message ----------
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Date: 20 August 2015 at 17:48
Subject: Re: [lng-odp] [API-NEXT PATCHv3 2/4] api: classification: add
ODP_PMR_CUSTOM_FRAME
To: lng-odp@lists.linaro.org


My suggestion was to actually defer this movement patch after your
existing patch series for including PMR_CUSTOM_FRAME gets applied.
Also the naming of this patch should be "rename or move the header for
better readability".
These are required for tracking the changes in the header file.

Regards,
Bala

On Thursday 20 August 2015 04:41 PM, Benoît Ganne wrote:

This patch only moves definitions. It does
not modify any structures, functions or
comments.

Move odp_pmr_match_t and odp_pmr_create()
definitions before odp_pmr_detroy() for
better readability.

Signed-off-by: Benoît Ganne <bganne@kalray.eu>
---
 include/odp/api/classification.h | 46 ++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

 unsigned odp_pmr_terms_avail(void);
  /**
- * Following structure is used to define a packet matching rule
- */
-typedef struct odp_pmr_match_t {
- odp_pmr_term_e  term; /**< PMR term value to be matched */
- const void *val; /**< Value to be matched */
- const void *mask; /**< Masked set of bits to be matched */
- uint32_t val_sz; /**< Size of the term value */
- uint32_t offset;  /**< User-defined offset in packet
- Used if term == ODP_PMR_CUSTOM_FRAME only,
- otherwise must be 0 */
-} odp_pmr_match_t;
-
-/**
- * Create a packet match rule with mask and value
- *
- * @param[in] match   packet matching rule definition
- *
- * @return Handle of the matching rule
- * @retval ODP_PMR_INVAL on failure
- */
-odp_pmr_t odp_pmr_create(const odp_pmr_match_t *match);
-
-/**
  * @typedef odp_pmr_set_t
  * An opaque handle to a composite packet match rule-set
  */
diff mbox

Patch

diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
index b63a6c8..d4e1330 100644
--- a/include/odp/api/classification.h
+++ b/include/odp/api/classification.h
@@ -226,6 +226,29 @@  typedef enum odp_pmr_term {
 } odp_pmr_term_e;
  /**
+ * Following structure is used to define a packet matching rule
+ */
+typedef struct odp_pmr_match_t {
+ odp_pmr_term_e  term; /**< PMR term value to be matched */
+ const void *val; /**< Value to be matched */
+ const void *mask; /**< Masked set of bits to be matched */
+ uint32_t val_sz; /**< Size of the term value */
+ uint32_t offset;  /**< User-defined offset in packet
+ Used if term == ODP_PMR_CUSTOM_FRAME only,
+ otherwise must be 0 */
+} odp_pmr_match_t;
+
+/**
+ * Create a packet match rule with mask and value
+ *
+ * @param[in] match   packet matching rule definition
+ *
+ * @return Handle of the matching rule
+ * @retval ODP_PMR_INVAL on failure
+ */
+odp_pmr_t odp_pmr_create(const odp_pmr_match_t *match);
+
+/**
  * Invalidate a packet match rule and vacate its resources
  *
  * @param[in] pmr_id Identifier of the PMR to be destroyed
@@ -276,29 +299,6 @@  unsigned long long odp_pmr_terms_cap(void);