[dpdk-dev,v5,1/9] ethdev: extend flow director for input selection
Commit Message
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>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 4 ----
doc/guides/rel_notes/release_16_04.rst | 2 ++
lib/librte_ether/rte_eth_ctrl.h | 8 ++++++++
3 files changed, 10 insertions(+), 4 deletions(-)
Comments
2016-03-21 14:18, 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.
[...]
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -22,10 +22,6 @@ Deprecation Notices
> * The ethdev structures rte_eth_link, rte_eth_dev_info and rte_eth_conf
> must be updated to support 100G link and to have a cleaner link speed API.
>
> -* ABI changes are planned for struct rte_eth_fdir_flow in order to support
> - extend flow director's input set. The release 2.2 does not contain these ABI
> - changes, but release 2.3 will, and no backwards compatibility is planned.
The changed structures are part of rte_eth_fdir_flow.
So this deprecation notice apply to this patch.
> * ABI changes are planned for rte_eth_ipv4_flow and rte_eth_ipv6_flow to
> include more fields to be matched against. The release 2.2 does not
> contain these ABI changes, but release 2.3 will.
These are the structures changed in this patch.
I think this section must be also removed.
> --- a/doc/guides/rel_notes/release_16_04.rst
> +++ b/doc/guides/rel_notes/release_16_04.rst
> @@ -435,6 +435,8 @@ ABI Changes
>
> * The cmdline buffer size has been increase from 256 to 512.
>
> +* The ethdev flow director structure ``rte_eth_fdir_flow`` structure was
> + changed. New fields were added to extend flow director's input set.
For reading ease, it's better to group ethdev changes (before cmdline change).
> --- a/lib/librte_ether/rte_eth_ctrl.h
> +++ b/lib/librte_ether/rte_eth_ctrl.h
> @@ -343,6 +343,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,
> @@ -410,6 +412,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 to match. */
> + uint8_t proto; /**< Protocol, next header to match. */
> };
>
> /**
> @@ -446,6 +451,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 to match. */
> + uint8_t hop_limits; /**< Hop limits to match. */
> };
This extension of the existing API looks OK.
Hi, Thomas
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, March 23, 2016 6:06 AM
> To: Wu, Jingjing
> Cc: dev@dpdk.org; Zhang, Helin
> Subject: Re: [dpdk-dev] [PATCH v5 1/9] ethdev: extend flow director for
> input selection
>
> 2016-03-21 14:18, 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.
> [...]
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -22,10 +22,6 @@ Deprecation Notices
> > * The ethdev structures rte_eth_link, rte_eth_dev_info and rte_eth_conf
> > must be updated to support 100G link and to have a cleaner link speed
> API.
> >
> > -* ABI changes are planned for struct rte_eth_fdir_flow in order to
> > support
> > - extend flow director's input set. The release 2.2 does not contain
> > these ABI
> > - changes, but release 2.3 will, and no backwards compatibility is planned.
>
> The changed structures are part of rte_eth_fdir_flow.
> So this deprecation notice apply to this patch.
>
> > * ABI changes are planned for rte_eth_ipv4_flow and rte_eth_ipv6_flow
> to
> > include more fields to be matched against. The release 2.2 does not
> > contain these ABI changes, but release 2.3 will.
>
> These are the structures changed in this patch.
> I think this section must be also removed.
>
This deprecation notice is not raised by me. It is raised by rahul.lakkireddy@chelsio.com at commit 954f1545a1ab.
So, I'm not sure if it is OK for me to remove it in my patch.
/Jingjing
> > --- a/doc/guides/rel_notes/release_16_04.rst
> > +++ b/doc/guides/rel_notes/release_16_04.rst
> > @@ -435,6 +435,8 @@ ABI Changes
> >
> > * The cmdline buffer size has been increase from 256 to 512.
> >
> > +* The ethdev flow director structure ``rte_eth_fdir_flow`` structure
> > +was
> > + changed. New fields were added to extend flow director's input set.
>
> For reading ease, it's better to group ethdev changes (before cmdline
> change).
2016-03-23 00:42, Wu, Jingjing:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > 2016-03-21 14:18, 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.
> > [...]
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -22,10 +22,6 @@ Deprecation Notices
> > > * The ethdev structures rte_eth_link, rte_eth_dev_info and rte_eth_conf
> > > must be updated to support 100G link and to have a cleaner link speed
> > API.
> > >
> > > -* ABI changes are planned for struct rte_eth_fdir_flow in order to
> > > support
> > > - extend flow director's input set. The release 2.2 does not contain
> > > these ABI
> > > - changes, but release 2.3 will, and no backwards compatibility is planned.
> >
> > The changed structures are part of rte_eth_fdir_flow.
> > So this deprecation notice apply to this patch.
> >
> > > * ABI changes are planned for rte_eth_ipv4_flow and rte_eth_ipv6_flow
> > to
> > > include more fields to be matched against. The release 2.2 does not
> > > contain these ABI changes, but release 2.3 will.
> >
> > These are the structures changed in this patch.
> > I think this section must be also removed.
>
> This deprecation notice is not raised by me. It is raised by rahul.lakkireddy@chelsio.com at commit 954f1545a1ab.
> So, I'm not sure if it is OK for me to remove it in my patch.
It does not matter who raised the notice.
Your patch match with it. Please remove it.
@@ -22,10 +22,6 @@ Deprecation Notices
* The ethdev structures rte_eth_link, rte_eth_dev_info and rte_eth_conf
must be updated to support 100G link and to have a cleaner link speed API.
-* ABI changes are planned for struct rte_eth_fdir_flow in order to support
- extend flow director's input set. The release 2.2 does not contain these ABI
- changes, but release 2.3 will, and no backwards compatibility is planned.
-
* ABI changes are planned for rte_eth_ipv4_flow and rte_eth_ipv6_flow to
include more fields to be matched against. The release 2.2 does not
contain these ABI changes, but release 2.3 will.
@@ -435,6 +435,8 @@ ABI Changes
* The cmdline buffer size has been increase from 256 to 512.
+* The ethdev flow director structure ``rte_eth_fdir_flow`` structure was
+ changed. New fields were added to extend flow director's input set.
Shared Library Versions
-----------------------
@@ -343,6 +343,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,
@@ -410,6 +412,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 to match. */
+ uint8_t proto; /**< Protocol, next header to match. */
};
/**
@@ -446,6 +451,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 to match. */
+ uint8_t hop_limits; /**< Hop limits to match. */
};
/**