diff mbox

[dpdk-dev,v3,01/12] ethdev: extend flow director for input selection

Message ID 1457502180-14124-2-git-send-email-jingjing.wu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Bruce Richardson
Headers show

Commit Message

Wu, Jingjing March 9, 2016, 5:42 a.m. UTC
This patch added RTE_ETH_INPUT_SET_L3_IP4_TTL,
RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS input field type and extended
struct rte_eth_ipv4_flow and rte_eth_ipv6_flow to support filtering
by tos, protocol and ttl.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_ether/rte_eth_ctrl.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Thomas Monjalon March 9, 2016, 9:52 a.m. UTC | #1
2016-03-09 13:42, Jingjing Wu:
> This patch added RTE_ETH_INPUT_SET_L3_IP4_TTL,
> RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS input field type and extended
> struct rte_eth_ipv4_flow and rte_eth_ipv6_flow to support filtering
> by tos, protocol and ttl.
> 
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
>  lib/librte_ether/rte_eth_ctrl.h | 8 ++++++++
>  1 file changed, 8 insertions(+)

You should remove the deprecation notice in this patch.
Thomas Monjalon March 9, 2016, 9:54 a.m. UTC | #2
2016-03-09 13:42, Jingjing Wu:
>  struct rte_eth_ipv4_flow {
>  	uint32_t src_ip;      /**< IPv4 source address to match. */
>  	uint32_t dst_ip;      /**< IPv4 destination address to match. */
> +	uint8_t  tos;         /**< Type of service to match. */
> +	uint8_t  ttl;         /**< Time to live */
> +	uint8_t  proto;

L4 protocol?

>  };
>  
>  /**
> @@ -443,6 +448,9 @@ struct rte_eth_sctpv4_flow {
>  struct rte_eth_ipv6_flow {
>  	uint32_t src_ip[4];      /**< IPv6 source address to match. */
>  	uint32_t dst_ip[4];      /**< IPv6 destination address to match. */
> +	uint8_t  tc;             /**< Traffic class to match. */
> +	uint8_t  proto;          /**< Protocol, next header. */
> +	uint8_t  hop_limits;
>  };

Why some fields are not commented?
I guess the values must be the ones found in the IPv4 header.
Thomas Monjalon March 9, 2016, 9:56 a.m. UTC | #3
2016-03-09 10:52, Thomas Monjalon:
> 2016-03-09 13:42, Jingjing Wu:
> > This patch added RTE_ETH_INPUT_SET_L3_IP4_TTL,
> > RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS input field type and extended
> > struct rte_eth_ipv4_flow and rte_eth_ipv6_flow to support filtering
> > by tos, protocol and ttl.
> > 
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> > ---
> >  lib/librte_ether/rte_eth_ctrl.h | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> 
> You should remove the deprecation notice in this patch.

Forget that, I've seen the patch 7 which makes more important changes.
Wu, Jingjing March 9, 2016, 10:26 a.m. UTC | #4
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, March 09, 2016 5:55 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org; Richardson, Bruce
> Subject: Re: [dpdk-dev] [PATCH v3 01/12] ethdev: extend flow director for
> input selection
> 
> 2016-03-09 13:42, Jingjing Wu:
> >  struct rte_eth_ipv4_flow {
> >  	uint32_t src_ip;      /**< IPv4 source address to match. */
> >  	uint32_t dst_ip;      /**< IPv4 destination address to match. */
> > +	uint8_t  tos;         /**< Type of service to match. */
> > +	uint8_t  ttl;         /**< Time to live */
> > +	uint8_t  proto;
> 
> L4 protocol?
> 
> >  };
> >
> >  /**
> > @@ -443,6 +448,9 @@ struct rte_eth_sctpv4_flow {  struct
> > rte_eth_ipv6_flow {
> >  	uint32_t src_ip[4];      /**< IPv6 source address to match. */
> >  	uint32_t dst_ip[4];      /**< IPv6 destination address to match. */
> > +	uint8_t  tc;             /**< Traffic class to match. */
> > +	uint8_t  proto;          /**< Protocol, next header. */
> > +	uint8_t  hop_limits;
> >  };
> 
> Why some fields are not commented?
> I guess the values must be the ones found in the IPv4 header.

Yes, you are correct. The fields defined in rte_eth_ipvx_flow are the ones in IP header.
Should I comments all of them?

Thanks
Jingjing
Thomas Monjalon March 9, 2016, 10:36 a.m. UTC | #5
2016-03-09 10:26, Wu, Jingjing:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > 2016-03-09 13:42, Jingjing Wu:
> > >  struct rte_eth_ipv4_flow {
> > >  	uint32_t src_ip;      /**< IPv4 source address to match. */
> > >  	uint32_t dst_ip;      /**< IPv4 destination address to match. */
> > > +	uint8_t  tos;         /**< Type of service to match. */
> > > +	uint8_t  ttl;         /**< Time to live */
> > > +	uint8_t  proto;
> > 
> > L4 protocol?
> > 
> > >  };
> > >
> > >  /**
> > > @@ -443,6 +448,9 @@ struct rte_eth_sctpv4_flow {  struct
> > > rte_eth_ipv6_flow {
> > >  	uint32_t src_ip[4];      /**< IPv6 source address to match. */
> > >  	uint32_t dst_ip[4];      /**< IPv6 destination address to match. */
> > > +	uint8_t  tc;             /**< Traffic class to match. */
> > > +	uint8_t  proto;          /**< Protocol, next header. */
> > > +	uint8_t  hop_limits;
> > >  };
> > 
> > Why some fields are not commented?
> > I guess the values must be the ones found in the IPv4 header.
> 
> Yes, you are correct. The fields defined in rte_eth_ipvx_flow are the ones in IP header.
> Should I comments all of them?

Please, do I really need to confirm that the API must be clearly documented?
Wu, Jingjing March 9, 2016, 11:22 a.m. UTC | #6
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, March 09, 2016 6:37 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org; Richardson, Bruce
> Subject: Re: [dpdk-dev] [PATCH v3 01/12] ethdev: extend flow director for
> input selection
> 
> 2016-03-09 10:26, Wu, Jingjing:
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > > 2016-03-09 13:42, Jingjing Wu:
> > > >  struct rte_eth_ipv4_flow {
> > > >  	uint32_t src_ip;      /**< IPv4 source address to match. */
> > > >  	uint32_t dst_ip;      /**< IPv4 destination address to match. */
> > > > +	uint8_t  tos;         /**< Type of service to match. */
> > > > +	uint8_t  ttl;         /**< Time to live */
> > > > +	uint8_t  proto;
> > >
> > > L4 protocol?
> > >
> > > >  };
> > > >
> > > >  /**
> > > > @@ -443,6 +448,9 @@ struct rte_eth_sctpv4_flow {  struct
> > > > rte_eth_ipv6_flow {
> > > >  	uint32_t src_ip[4];      /**< IPv6 source address to match. */
> > > >  	uint32_t dst_ip[4];      /**< IPv6 destination address to match. */
> > > > +	uint8_t  tc;             /**< Traffic class to match. */
> > > > +	uint8_t  proto;          /**< Protocol, next header. */
> > > > +	uint8_t  hop_limits;
> > > >  };
> > >
> > > Why some fields are not commented?
> > > I guess the values must be the ones found in the IPv4 header.
> >
> > Yes, you are correct. The fields defined in rte_eth_ipvx_flow are the ones
> in IP header.
> > Should I comments all of them?
> 
> Please, do I really need to confirm that the API must be clearly documented?
OK. Just asking for your view to avoid meaningless comments. Anyway, will update.
Thanks
diff mbox

Patch

diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index ce224ad..8c51023 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -340,6 +340,8 @@  enum rte_eth_input_set_field {
 	RTE_ETH_INPUT_SET_L3_IP4_PROTO,
 	RTE_ETH_INPUT_SET_L3_IP6_TC,
 	RTE_ETH_INPUT_SET_L3_IP6_NEXT_HEADER,
+	RTE_ETH_INPUT_SET_L3_IP4_TTL,
+	RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS,
 
 	/* L4 */
 	RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT = 257,
@@ -407,6 +409,9 @@  struct rte_eth_l2_flow {
 struct rte_eth_ipv4_flow {
 	uint32_t src_ip;      /**< IPv4 source address to match. */
 	uint32_t dst_ip;      /**< IPv4 destination address to match. */
+	uint8_t  tos;         /**< Type of service to match. */
+	uint8_t  ttl;         /**< Time to live */
+	uint8_t  proto;
 };
 
 /**
@@ -443,6 +448,9 @@  struct rte_eth_sctpv4_flow {
 struct rte_eth_ipv6_flow {
 	uint32_t src_ip[4];      /**< IPv6 source address to match. */
 	uint32_t dst_ip[4];      /**< IPv6 destination address to match. */
+	uint8_t  tc;             /**< Traffic class to match. */
+	uint8_t  proto;          /**< Protocol, next header. */
+	uint8_t  hop_limits;
 };
 
 /**