diff mbox

[API-NEXT,PATCHv1,1/3] api: classification: remove odp_pmr_create_range() function definition.

Message ID 1428661592-18311-1-git-send-email-bala.manoharan@linaro.org
State New
Headers show

Commit Message

Balasubramanian Manoharan April 10, 2015, 10:26 a.m. UTC
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>

The support for a range based packet matching rule is not available in most of
the hardwares and hence this API is removed.

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
---
 include/odp/api/classification.h | 61 +++++++---------------------------------
 1 file changed, 10 insertions(+), 51 deletions(-)

Comments

Maxim Uvarov April 20, 2015, 9:05 a.m. UTC | #1
Merged, to api-next.

Maxim.

On 04/17/15 13:17, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> The patch series
>
> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
>
>
>> -----Original Message-----
>> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of ext
>> bala.manoharan@linaro.org
>> Sent: Friday, April 10, 2015 1:27 PM
>> To: lng-odp@lists.linaro.org
>> Subject: [lng-odp] [API-NEXT PATCHv1 1/3] api: classification: remove
>> odp_pmr_create_range() function definition.
>>
>> From: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>>
>> The support for a range based packet matching rule is not available in
>> most of
>> the hardwares and hence this API is removed.
>>
>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>> ---
>>   include/odp/api/classification.h | 61 +++++++----------------------------
>> -----
>>   1 file changed, 10 insertions(+), 51 deletions(-)
>>
>> diff --git a/include/odp/api/classification.h
>> b/include/odp/api/classification.h
>> index 7db3645..f597b26 100644
>> --- a/include/odp/api/classification.h
>> +++ b/include/odp/api/classification.h
>> @@ -50,8 +50,8 @@ extern "C" {
>>   /**
>>    * @def ODP_PMR_INVAL
>>    * Invalid odp_pmr_t value.
>> - * This value is returned from odp_pmr_create_match() and
>> - * odp_pmr_create_range() functions on failure.
>> + * This value is returned from odp_pmr_create()
>> + * function on failure.
>>    */
>>
>>   /**
>> @@ -236,30 +236,10 @@ typedef enum odp_pmr_term {
>>    * @return		Handle of the matching rule
>>    * @retval		ODP_PMR_INVAL on failure
>>    */
>> -odp_pmr_t odp_pmr_create_match(odp_pmr_term_e term,
>> -			       const void *val,
>> -			       const void *mask,
>> -			       uint32_t val_sz);
>> +odp_pmr_t odp_pmr_create(odp_pmr_term_e term, const void *val,
>> +			 const void *mask, uint32_t val_sz);
>>
>>   /**
>> - * Create a packet match rule with value range
>> - *
>> - * @param[in]	term	One of the enumerated values supported
>> - * @param[in]	val1    Lower bound of the header field range.
>> - * @param[in]	val2    Upper bound of the header field range.
>> - * @param[in]	val_sz	Size of the val1 and val2 arguments,
>> - *			that must match the value size requirement of the
>> - *			specific term.
>> - *
>> - * @return		Handle of the matching rule
>> - * @retval		ODP_PMR_INVAL on failure
>> - * @note: Range is inclusive [val1..val2].
>> - */
>> -odp_pmr_t odp_pmr_create_range(odp_pmr_term_e term,
>> -			       const void *val1,
>> -			       const void *val2,
>> -			       uint32_t val_sz);
>> -/**
>>    * Invalidate a packet match rule and vacate its resources
>>    *
>>    * @param[in]	pmr_id	Identifier of the PMR to be destroyed
>> @@ -310,39 +290,18 @@ unsigned long long odp_pmr_terms_cap(void);
>>   unsigned odp_pmr_terms_avail(void);
>>
>>   /**
>> - * Packet Match Type field enumeration
>> - * for fields that may be used to identify
>> - * the different PMR match type.
>> - */
>> -typedef enum odp_pmr_match_type {
>> -		ODP_PMR_MASK,       /**< Match a masked set of bits */
>> -		ODP_PMR_RANGE,      /**< Match an integer range */
>> -	} odp_pmr_match_type_e;
>> -
>> -/**
>>    * Following structure is used to define composite packet matching rules
>> - * in the form of an array of individual match or range rules.
>> + * in the form of an array of individual match rules.
>>    * The underlying platform may not support all or any specific
>> combination
>> - * of value match or range rules, and the application should take care
>> + * of value match rules, and the application should take care
>>    * of inspecting the return value when installing such rules, and perform
>>    * appropriate fallback action.
>>    */
>>   typedef struct odp_pmr_match_t {
>> -	odp_pmr_match_type_e match_type; /**< Packet Match Type*/
>> -	union {
>> -		struct {
>> -			odp_pmr_term_e  term;
>> -			const void          *val;
>> -			const void          *mask;
>> -			unsigned int         val_sz;
>> -		} mask; /**< Match a masked set of bits */
>> -		struct {
>> -			odp_pmr_term_e  term;
>> -			const void          *val1;
>> -			const void          *val2;
>> -			unsigned int         val_sz;
>> -		} range; /**< Match an integer range */
>> -	};
>> +	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 */
>> +	unsigned int	val_sz;	 /**< Size of the term value */
>>   } odp_pmr_match_t;
>>
>>   /**
>> --
>> 2.0.1.472.g6f92e5f
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
index 7db3645..f597b26 100644
--- a/include/odp/api/classification.h
+++ b/include/odp/api/classification.h
@@ -50,8 +50,8 @@  extern "C" {
 /**
  * @def ODP_PMR_INVAL
  * Invalid odp_pmr_t value.
- * This value is returned from odp_pmr_create_match() and
- * odp_pmr_create_range() functions on failure.
+ * This value is returned from odp_pmr_create()
+ * function on failure.
  */
 
 /**
@@ -236,30 +236,10 @@  typedef enum odp_pmr_term {
  * @return		Handle of the matching rule
  * @retval		ODP_PMR_INVAL on failure
  */
-odp_pmr_t odp_pmr_create_match(odp_pmr_term_e term,
-			       const void *val,
-			       const void *mask,
-			       uint32_t val_sz);
+odp_pmr_t odp_pmr_create(odp_pmr_term_e term, const void *val,
+			 const void *mask, uint32_t val_sz);
 
 /**
- * Create a packet match rule with value range
- *
- * @param[in]	term	One of the enumerated values supported
- * @param[in]	val1    Lower bound of the header field range.
- * @param[in]	val2    Upper bound of the header field range.
- * @param[in]	val_sz	Size of the val1 and val2 arguments,
- *			that must match the value size requirement of the
- *			specific term.
- *
- * @return		Handle of the matching rule
- * @retval		ODP_PMR_INVAL on failure
- * @note: Range is inclusive [val1..val2].
- */
-odp_pmr_t odp_pmr_create_range(odp_pmr_term_e term,
-			       const void *val1,
-			       const void *val2,
-			       uint32_t val_sz);
-/**
  * Invalidate a packet match rule and vacate its resources
  *
  * @param[in]	pmr_id	Identifier of the PMR to be destroyed
@@ -310,39 +290,18 @@  unsigned long long odp_pmr_terms_cap(void);
 unsigned odp_pmr_terms_avail(void);
 
 /**
- * Packet Match Type field enumeration
- * for fields that may be used to identify
- * the different PMR match type.
- */
-typedef enum odp_pmr_match_type {
-		ODP_PMR_MASK,       /**< Match a masked set of bits */
-		ODP_PMR_RANGE,      /**< Match an integer range */
-	} odp_pmr_match_type_e;
-
-/**
  * Following structure is used to define composite packet matching rules
- * in the form of an array of individual match or range rules.
+ * in the form of an array of individual match rules.
  * The underlying platform may not support all or any specific combination
- * of value match or range rules, and the application should take care
+ * of value match rules, and the application should take care
  * of inspecting the return value when installing such rules, and perform
  * appropriate fallback action.
  */
 typedef struct odp_pmr_match_t {
-	odp_pmr_match_type_e match_type; /**< Packet Match Type*/
-	union {
-		struct {
-			odp_pmr_term_e  term;
-			const void          *val;
-			const void          *mask;
-			unsigned int         val_sz;
-		} mask; /**< Match a masked set of bits */
-		struct {
-			odp_pmr_term_e  term;
-			const void          *val1;
-			const void          *val2;
-			unsigned int         val_sz;
-		} range; /**< Match an integer range */
-	};
+	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 */
+	unsigned int	val_sz;	 /**< Size of the term value */
 } odp_pmr_match_t;
 
 /**