DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ori Kam <orika@nvidia.com>,
	"Sean Zhang (Networking SW)" <xiazhang@nvidia.com>,
	"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [v1 2/4] ethdev: support GRE optional fields
Date: Fri, 4 Feb 2022 15:15:19 +0000	[thread overview]
Message-ID: <602443bd-6d34-d029-9de4-f7b414db1fcc@intel.com> (raw)
In-Reply-To: <MW2PR12MB46664BD32DB68608268367C0D6269@MW2PR12MB4666.namprd12.prod.outlook.com>

On 2/1/2022 12:57 PM, Ori Kam wrote:
> Hi Sean,
> 
> Please add this feature to the release note.
> 

Hi Sean,

Reminder of this change request, waiting for new version.

Also please remember to add the missing doc in mlx patch (4/4) in next version.

Thanks,
ferruh


>> -----Original Message-----
>> From: Sean Zhang (Networking SW) <xiazhang@nvidia.com>
>> Sent: Wednesday, January 26, 2022 10:44 AM
>> Subject: [v1 2/4] ethdev: support GRE optional fields
>>
>> Add flow pattern items and header format for matching optional fields
>> (checksum/key/sequence) in GRE header. And the flags in gre item should
>> be correspondingly set with the new added items.
>>
>> Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
>> ---
>>   doc/guides/prog_guide/rte_flow.rst | 17 +++++++++++++++++
>>   lib/ethdev/rte_flow.c              |  1 +
>>   lib/ethdev/rte_flow.h              | 19 +++++++++++++++++++
>>   3 files changed, 37 insertions(+)
>>
>> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
>> index b4aa9c4..0e47501 100644
>> --- a/doc/guides/prog_guide/rte_flow.rst
>> +++ b/doc/guides/prog_guide/rte_flow.rst
>> @@ -1106,6 +1106,7 @@ Matches a GRE header.
>>
>>   Item: ``GRE_KEY``
>>   ^^^^^^^^^^^^^^^^^
>> +This action is deprecated. Consider `Item: GRE_OPTION`.
>>
>>   Matches a GRE key field.
>>   This should be preceded by item ``GRE``.
>> @@ -1113,6 +1114,22 @@ This should be preceded by item ``GRE``.
>>   - Value to be matched is a big-endian 32 bit integer.
>>   - When this item present it implicitly match K bit in default mask as "1"
>>
>> +Item: ``GRE_OPTION``
>> +^^^^^^^^^^^^^^^^^^^^
>> +
>> +Matches a GRE optional fields (checksum/key/sequence).
>> +This should be preceded by item ``GRE``.
>> +
>> +- ``checksum``: checksum.
>> +- ``key``: key.
>> +- ``sequence``: sequence.
>> +- The items in GRE_OPTION do not change bit flags(c_bit/k_bit/s_bit) in GRE
>> +  item. The bit flags need be set with GRE item by application. When the items
>> +  present, the corresponding bits in GRE spec and mask should be set "1" by
>> +  application, it means to match specified value of the fields. When the items
>> +  no present, but the corresponding bits in GRE spec and mask is "1", it means
>> +  to match any value of the fields.
>> +
>>   Item: ``FUZZY``
>>   ^^^^^^^^^^^^^^^
>>
>> diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
>> index a93f68a..7f93900 100644
>> --- a/lib/ethdev/rte_flow.c
>> +++ b/lib/ethdev/rte_flow.c
>> @@ -139,6 +139,7 @@ struct rte_flow_desc_data {
>>   	MK_FLOW_ITEM(META, sizeof(struct rte_flow_item_meta)),
>>   	MK_FLOW_ITEM(TAG, sizeof(struct rte_flow_item_tag)),
>>   	MK_FLOW_ITEM(GRE_KEY, sizeof(rte_be32_t)),
>> +	MK_FLOW_ITEM(GRE_OPTION, sizeof(struct rte_flow_item_gre_opt)),
>>   	MK_FLOW_ITEM(GTP_PSC, sizeof(struct rte_flow_item_gtp_psc)),
>>   	MK_FLOW_ITEM(PPPOES, sizeof(struct rte_flow_item_pppoe)),
>>   	MK_FLOW_ITEM(PPPOED, sizeof(struct rte_flow_item_pppoe)),
>> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
>> index 1031fb2..db58b47 100644
>> --- a/lib/ethdev/rte_flow.h
>> +++ b/lib/ethdev/rte_flow.h
>> @@ -37,6 +37,7 @@
>>   #include <rte_gtp.h>
>>   #include <rte_l2tpv2.h>
>>   #include <rte_ppp.h>
>> +#include <rte_gre.h>
>>
>>   #ifdef __cplusplus
>>   extern "C" {
>> @@ -660,6 +661,13 @@ enum rte_flow_item_type {
>>   	 * See struct rte_flow_item_ppp.
>>   	 */
>>   	RTE_FLOW_ITEM_TYPE_PPP,
>> +
>> +	/**
>> +	 * Matches GRE optional fields.
>> +	 *
>> +	 * See struct rte_flow_item_gre_opt.
>> +	 */
>> +	RTE_FLOW_ITEM_TYPE_GRE_OPTION,
>>   };
>>
>>   /**
>> @@ -1196,6 +1204,17 @@ struct rte_flow_item_gre {
>>   #endif
>>
>>   /**
>> + * RTE_FLOW_ITEM_TYPE_GRE_OPTION.
>> + *
>> + * Matches GRE optional fields in header.
>> + */
>> +struct rte_flow_item_gre_opt {
>> +	struct rte_gre_hdr_opt_checksum checksum;
>> +	struct rte_gre_hdr_opt_key key;
>> +	struct rte_gre_hdr_opt_sequence sequence;
>> +};
>> +
>> +/**
>>    * RTE_FLOW_ITEM_TYPE_FUZZY
>>    *
>>    * Fuzzy pattern match, expect faster than default.
>> --
>> 1.8.3.1
> 
> Best,
> Ori
> 


  reply	other threads:[~2022-02-04 15:15 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  3:08 [RFC 0/3] Add support for GRE optional fields matching Sean Zhang
2021-12-30  3:08 ` [RFC 1/3] ethdev: support GRE optional fields Sean Zhang
2022-01-09 12:30   ` Ori Kam
2022-01-11  3:44     ` Sean Zhang (Networking SW)
2022-01-11  7:24       ` Ori Kam
2022-01-11  8:31         ` Sean Zhang (Networking SW)
2022-01-19  9:53   ` Ferruh Yigit
2022-01-19 10:01     ` Thomas Monjalon
2022-01-19 10:56       ` Ori Kam
2022-01-25  9:49         ` Sean Zhang (Networking SW)
2022-01-25 11:37           ` Ferruh Yigit
2022-01-25 13:06             ` Ori Kam
2022-01-25 14:29               ` Ferruh Yigit
2022-01-25 16:03                 ` Ori Kam
2022-01-26  8:44   ` [v1 0/4] Add support for GRE optional fields matching Sean Zhang
2022-01-26  8:44     ` [v1 1/4] lib: add optional fields in GRE header Sean Zhang
2022-02-01 12:47       ` Ori Kam
2022-01-26  8:44     ` [v1 2/4] ethdev: support GRE optional fields Sean Zhang
2022-02-01 12:57       ` Ori Kam
2022-02-04 15:15         ` Ferruh Yigit [this message]
2022-01-26  8:44     ` [v1 3/4] app/testpmd: add gre_option item command Sean Zhang
2022-02-01 12:57       ` Ori Kam
2022-01-26  8:44     ` [v1 4/4] net/mlx5: support matching optional fields of GRE Sean Zhang
2022-02-01 10:50       ` Ferruh Yigit
2022-02-01 11:13     ` [v1 0/4] Add support for GRE optional fields matching Ferruh Yigit
2022-02-11  1:45     ` [v2 " Sean Zhang
2022-02-11  1:45       ` [v2 1/4] lib: add optional fields in GRE header Sean Zhang
2022-02-11  9:38         ` Ferruh Yigit
2022-02-11 10:23           ` Sean Zhang (Networking SW)
2022-02-11 10:37             ` Ferruh Yigit
2022-02-11 10:12         ` Ori Kam
2022-02-11  1:45       ` [v2 2/4] ethdev: support GRE optional fields Sean Zhang
2022-02-11 10:10         ` Ori Kam
2022-02-11  1:45       ` [v2 3/4] app/testpmd: add gre_option item command Sean Zhang
2022-02-11 10:10         ` Ori Kam
2022-02-11  1:45       ` [v2 4/4] net/mlx5: support matching optional fields of GRE Sean Zhang
2022-02-17  6:27         ` [PATCH] " Sean Zhang
2022-02-17  8:33           ` Thomas Monjalon
2022-02-21  3:00             ` Sean Zhang (Networking SW)
2022-02-25 15:31               ` Thomas Monjalon
2022-02-26  0:57                 ` Sean Zhang (Networking SW)
2022-02-24 13:18           ` Raslan Darawsheh
2022-02-25  1:18             ` Sean Zhang (Networking SW)
2022-02-25  1:14           ` [v4] " Sean Zhang
2022-02-25 15:32             ` Thomas Monjalon
2022-02-25 17:55             ` Ferruh Yigit
2022-02-25 18:32               ` Thomas Monjalon
2022-02-11  9:36       ` [v2 0/4] Add support for GRE optional fields matching Ferruh Yigit
2022-02-11 10:33         ` Sean Zhang (Networking SW)
2022-02-11 10:38           ` Ferruh Yigit
2022-02-11 16:14       ` Ferruh Yigit
2021-12-30  3:08 ` [RFC 2/3] app/testpmd: add gre_option item command Sean Zhang
2021-12-30  3:08 ` [RFC 3/3] net/mlx5: support matching on optional fields of GRE Sean Zhang

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=602443bd-6d34-d029-9de4-f7b414db1fcc@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=xiazhang@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).