DPDK patches and discussions
 help / color / mirror / Atom feed
From: Suanming Mou <suanmingm@mellanox.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	 Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Ori Kam <orika@mellanox.com>, Matan Azrad <matan@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>
Subject: Re: [dpdk-dev] [RFC] ethdev: add IPv4/IPv6 DSCP rewrite action
Date: Tue, 10 Dec 2019 08:55:40 +0000	[thread overview]
Message-ID: <HE1PR05MB34846ED3E4306FDD7421C6FDCC5B0@HE1PR05MB3484.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <322fb1d5-c629-5f67-59d4-c38df67f0c9b@solarflare.com>



> -----Original Message-----
> From: Andrew Rybchenko <arybchenko@solarflare.com>
> Sent: Tuesday, December 10, 2019 3:33 PM
> To: Suanming Mou <suanmingm@mellanox.com>; Adrien Mazarguil
> <adrien.mazarguil@6wind.com>; John McNamara <john.mcnamara@intel.com>;
> Marko Kovacevic <marko.kovacevic@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>; Ferruh Yigit <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Shahaf Shuler <shahafs@mellanox.com>; Ori Kam
> <orika@mellanox.com>; Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Subject: Re: [dpdk-dev] [RFC] ethdev: add IPv4/IPv6 DSCP rewrite action
> 
> On 12/10/19 8:23 AM, Suanming Mou wrote:
> > For some overlay network, such as VXLAN, the DSCP field in the new
> > outer IP header after VXLAN decapsulation may need to be updated
> accordingly.
> >
> > This commit introduce the DSCP modify action for IPv4 and IPv6.
> >
> > Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
> 
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> as usual it requires testpmd support and a driver which supports it (I understand
> that it may be omitted in RFC).

Thanks. Yes, it will be added later.

> 
> Few minor notes below.

Will update the second version fix these.

> 
> > ---
> >  doc/guides/prog_guide/rte_flow.rst | 40
> ++++++++++++++++++++++++++++++++++++++
> >  lib/librte_ethdev/rte_flow.h       | 31 +++++++++++++++++++++++++++++
> >  2 files changed, 71 insertions(+)
> >
> > diff --git a/doc/guides/prog_guide/rte_flow.rst
> > b/doc/guides/prog_guide/rte_flow.rst
> > index a254c81..54b9250 100644
> > --- a/doc/guides/prog_guide/rte_flow.rst
> > +++ b/doc/guides/prog_guide/rte_flow.rst
> > @@ -2558,6 +2558,46 @@ the other path depending on HW capability.
> >     | ``mask`` | bit-mask applies to "data" |
> >     +----------+----------------------------+
> >
> > +Action: ``SET_IPV4_DSCP``
> > +^^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > +Set IPv4DSCP.
> 
> I think it is better to have space between IPv4 and DSCP above.
> 
> > +
> > +Modify DSCP in IPv4 header.
> > +
> > +It must be used with RTE_FLOW_ITEM_TYPE_IPV4 in pattern.
> > +Otherwise, RTE_FLOW_ERROR_TYPE_ACTION error will be returned.
> > +
> > +.. _table_rte_flow_action_set_ipv4_dscp:
> > +
> > +.. table:: SET_IPV4_DSCP
> > +
> > +   +-----------+---------------------------------+
> > +   | Field     | Value                           |
> > +   +===========+=================================+
> > +   | ``dscp``  | DSCP in low 6 bits, rest ingore |
> 
> ingore -> ignore
> 
> > +   +-----------+---------------------------------+
> > +
> > +Action: ``SET_IPV6_DSCP``
> > +^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > +Set IPv6DSCP.
> 
> Same.
> 
> > +
> > +Modify DSCP in IPv6 header.
> > +
> > +It must be used with RTE_FLOW_ITEM_TYPE_IPV6 in pattern.
> > +Otherwise, RTE_FLOW_ERROR_TYPE_ACTION error will be returned.
> > +
> > +.. _table_rte_flow_action_set_ipv6_dscp:
> > +
> > +.. table:: SET_IPV6_DSCP
> > +
> > +   +-----------+---------------------------------+
> > +   | Field     | Value                           |
> > +   +===========+=================================+
> > +   | ``dscp``  | DSCP in low 6 bits, rest ingore |
> 
> ingore -> ignore
> 
> > +   +-----------+---------------------------------+
> > +
> >  Negative types
> >  ~~~~~~~~~~~~~~
> >
> > diff --git a/lib/librte_ethdev/rte_flow.h
> > b/lib/librte_ethdev/rte_flow.h index 452d359..76bf080 100644
> > --- a/lib/librte_ethdev/rte_flow.h
> > +++ b/lib/librte_ethdev/rte_flow.h
> > @@ -2004,6 +2004,26 @@ enum rte_flow_action_type {
> >  	 * See struct rte_flow_action_set_meta.
> >  	 */
> >  	RTE_FLOW_ACTION_TYPE_SET_META,
> > +
> > +	/**
> > +	 * Modify IPv4 DSCP in the outermost IP header.
> > +	 *
> > +	 * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV4,
> > +	 * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION
> error.
> > +	 *
> > +	 * See struct rte_flow_action_set_dscp.
> > +	 */
> > +	RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP,
> > +
> > +	/**
> > +	 * Modify IPv6 DSCP in the outermost IP header.
> > +	 *
> > +	 * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV6,
> > +	 * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION
> error.
> > +	 *
> > +	 * See struct rte_flow_action_set_dscp.
> > +	 */
> > +	RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP,
> >  };
> >
> >  /**
> > @@ -2530,6 +2550,17 @@ struct rte_flow_action_set_meta {
> >  	uint32_t mask;
> >  };
> >
> > +/**
> > + * RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP
> > + * RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP
> > + *
> > + * Set the DSCP value for IPv4/IPv6 header.
> > + * DSCP in low 6 bits, rest ignored.
> > + */
> > +struct rte_flow_action_set_dscp {
> > +	uint8_t dscp;
> > +};
> > +
> >  /* Mbuf dynamic field offset for metadata. */  extern int
> > rte_flow_dynf_metadata_offs;
> >
> >


  reply	other threads:[~2019-12-10  8:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10  5:23 Suanming Mou
2019-12-10  7:33 ` Andrew Rybchenko
2019-12-10  8:55   ` Suanming Mou [this message]
2019-12-10 18:32     ` Stephen Hemminger
2019-12-10 18:31   ` Stephen Hemminger
2019-12-10 19:48     ` Ori Kam
2019-12-11  1:36     ` Suanming Mou
2019-12-10  9:27 ` [dpdk-dev] [RFC v2] " Suanming Mou
2019-12-16  3:42 ` [dpdk-dev] [RFC v3 1/2] " Suanming Mou
2019-12-16  3:42   ` [dpdk-dev] [RFC v3 2/2] net/mlx5: " Suanming Mou
2019-12-16  7:49   ` [dpdk-dev] [RFC v3 1/2] ethdev: " Ori Kam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HE1PR05MB34846ED3E4306FDD7421C6FDCC5B0@HE1PR05MB3484.eurprd05.prod.outlook.com \
    --to=suanmingm@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).