[dpdk-dev,v3,2/6] net/i40e: add definition for invalid pctype

Message ID 1505917983-119112-3-git-send-email-kirill.rybalchenko@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Rybalchenko, Kirill Sept. 20, 2017, 2:32 p.m. UTC
  Add new definition in enum i40e_filter_pctype for
for invalid pctype

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 drivers/net/i40e/base/i40e_type.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Xing, Beilei Sept. 22, 2017, 7:29 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kirill Rybalchenko
> Sent: Wednesday, September 20, 2017 10:33 PM
> To: dev@dpdk.org
> Cc: Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Chilikin, Andrey
> <andrey.chilikin@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v3 2/6] net/i40e: add definition for invalid
> pctype
> 
> Add new definition in enum i40e_filter_pctype for for invalid pctype
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> ---
>  drivers/net/i40e/base/i40e_type.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/base/i40e_type.h
> b/drivers/net/i40e/base/i40e_type.h
> index dca725a..d57986e 100644
> --- a/drivers/net/i40e/base/i40e_type.h
> +++ b/drivers/net/i40e/base/i40e_type.h
> @@ -1245,9 +1245,11 @@ struct i40e_filter_program_desc {
> 
>  /* Packet Classifier Types for filters */  enum i40e_filter_pctype {
> -	/* Note: Values 0-28 are reserved for future use.
> +	/* Note: Vlue 0 is not valid pctype.
> +	 * Values 0-28 are reserved for future use.
>  	 * Value 29, 30, 32 are not supported on XL710 and X710.
>  	 */
> +	I40E_FILTER_PCTYPE_INVALID			= 0,

We'd better not to change base code which is aligned with kernel driver.
We can add macro in i40e_ethdev.h.

>  	I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP	= 29,
>  	I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP	= 30,
>  	I40E_FILTER_PCTYPE_NONF_IPV4_UDP		= 31,
> --
> 2.5.5
  

Patch

diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index dca725a..d57986e 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -1245,9 +1245,11 @@  struct i40e_filter_program_desc {
 
 /* Packet Classifier Types for filters */
 enum i40e_filter_pctype {
-	/* Note: Values 0-28 are reserved for future use.
+	/* Note: Vlue 0 is not valid pctype.
+	 * Values 0-28 are reserved for future use.
 	 * Value 29, 30, 32 are not supported on XL710 and X710.
 	 */
+	I40E_FILTER_PCTYPE_INVALID			= 0,
 	I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP	= 29,
 	I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP	= 30,
 	I40E_FILTER_PCTYPE_NONF_IPV4_UDP		= 31,