DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gregory Etelson <getelson@nvidia.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Slava Ovsiienko <viacheslavo@nvidia.com>
Subject: RE: [dpdk-dev] [PATCH] doc: add flex item API examples
Date: Sun, 21 Nov 2021 08:20:09 +0000	[thread overview]
Message-ID: <BYAPR12MB2631189E18EC87773401A7F8A59E9@BYAPR12MB2631.namprd12.prod.outlook.com> (raw)
In-Reply-To: <857beced-415e-221c-60ae-775185174bda@intel.com>

Hello Ferruh,

I'll post v2 with a fix.

Regards,
Gregory

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Friday, November 19, 2021 19:08
> To: Gregory Etelson <getelson@nvidia.com>;
> dev@dpdk.org; Slava Ovsiienko
> <viacheslavo@nvidia.com>
> Subject: Re: [dpdk-dev] [PATCH] doc: add flex
> item API examples
> 
> External email: Use caution opening links or
> attachments
> 
> 
> On 11/10/2021 9:38 AM, Gregory Etelson
> wrote:
> > Demonstrate flex item API usage on known
> network protocols.
> >
> > Signed-off-by: Gregory Etelson
> <getelson@nvidia.com>
> > Reviewed-by: Viacheslav Ovsiienko
> <viacheslavo@nvidia.com>
> 
> <...>
> 
> > +* Match Geneve basic header
> > +
> > +   .. code-block:: c
> > +      :linenos:
> > +
> > +      const struct geneve_hdr
> geneve_basic_header_spec = {
> > +         .ver = 0,
> > +         .opt_len = 0,
> > +      };
> > +      const struct geneve_hdr
> geneve_basic_header_mask = {
> > +         .ver = 3,
> > +         .opt_len = 0x3f,
> > +      };
> > +
> > +      const struct rte_flow_item_flex
> geneve_basic_header_flex_spec = {
> > +         .handle = geneve_flex_handle,
> > +         .length =
> sizeof(geneve_basic_header_spec),
> > +         .pattern = &geneve_basic_header_spec
> > +      };
> > +
> > +      const struct rte_flow_item_flex
> geneve_basic_header_flex_mask = {
> > +         .handle = geneve_flex_handle,
> > +         .length =
> sizeof(geneve_basic_header_mask),
> > +         .pattern = &geneve_basic_header_mask
> > +      };
> > +
> > +      const struct rte_flow_item
> geneve_basic_header_flow_item = {
> > +         .type = RTE_FLOW_ITEM_TYPE_FLEX,
> > +         .spec = (const void
> *)&geneve_basic_header_flex_spec,
> > +         .maks = (const void
> *)&geneve_basic_header_flex_mask,
> 
> s/maks/mask/
> 
> > +      };
> > +
> > +* Match if the first option class is Open
> vSwitch
> > +
> > +   .. code-block:: c
> > +      :linenos:
> > +
> > +      const struct geneve_option_hdr
> geneve_ovs_opt_spec = {
> > +         .class = rte_cpu_to_be16(0x0101),
> > +      };
> > +
> > +      const struct geneve_option_hdr
> geneve_ovs_opt_mask = {
> > +         .class = 0xffff,
> > +      };
> > +
> > +      const struct geneve_hdr
> geneve_hdr_with_ovs_spec = {
> > +         .ver = 0,
> > +         .options = (const unsigned long
> *)&geneve_ovs_opt_spec
> > +      };
> > +
> > +      const struct geneve_hdr
> geneve_hdr_with_ovs_mask = {
> > +         .ver = 3,
> > +         .options = (const unsigned long
> *)&geneve_ovs_opt_mask
> > +      };
> > +
> > +      const struct rte_flow_item_flex
> geneve_flex_spec = {
> > +         .handle = geneve_flex_handle,
> > +         .length =
> sizeof(geneve_hdr_with_ovs_spec) +
> sizeof(geneve_ovs_opt_spec),
> > +         .pattern = &geneve_hdr_with_ovs_spec
> > +      };
> > +
> > +      const struct rte_flow_item_flex
> geneve_flex_mask = {
> > +         .handle = geneve_flex_handle,
> > +         .length =
> sizeof(geneve_hdr_with_ovs_mask) +
> sizeof(geneve_ovs_opt_mask),
> > +         .pattern =
> &geneve_hdr_with_ovs_mask
> > +      };
> > +
> > +      const struct rte_flow_item
> geneve_vni_flow_item = {
> > +         .type = RTE_FLOW_ITEM_TYPE_FLEX,
> > +         .spec = (const void *)&geneve_flex_spec,
> > +         .maks = (const void
> *)&geneve_flex_mask,
> 
> ditto

      reply	other threads:[~2021-11-21  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  9:38 Gregory Etelson
2021-11-19 17:08 ` Ferruh Yigit
2021-11-21  8:20   ` Gregory Etelson [this message]

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=BYAPR12MB2631189E18EC87773401A7F8A59E9@BYAPR12MB2631.namprd12.prod.outlook.com \
    --to=getelson@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=viacheslavo@nvidia.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).