DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ori Kam <orika@nvidia.com>
To: Gregory Etelson <getelson@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
	Raslan Darawsheh <rasland@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: fix integrity flow item
Date: Thu, 29 Apr 2021 10:13:21 +0000	[thread overview]
Message-ID: <DM6PR12MB4987B58CFB29EE9253B2B97CD65F9@DM6PR12MB4987.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210429061634.3481-2-getelson@nvidia.com>

Hi Gregory,

> -----Original Message-----
> From: Gregory Etelson <getelson@nvidia.com>
> Sent: Thursday, April 29, 2021 9:17 AM
> Subject: [PATCH v2 1/4] ethdev: fix integrity flow item
> 
> Add integrity item definition to the rte_flow_desc_item array.
> The new entry allows to build RTE flow item from a data stored in
> rte_flow_item_integrity type.
> 
> Add bitmasks to the integrity item value.
> The masks allow to query multiple integrity filters in a single compare
> operation.
> 
> Fixes: b10a421a1f3b ("ethdev: add packet integrity check flow rules")
> 
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
>  lib/ethdev/rte_flow.c | 1 +
>  lib/ethdev/rte_flow.h | 9 +++++++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index
> c7c7108933..8cb7a069c8 100644
> --- a/lib/ethdev/rte_flow.c
> +++ b/lib/ethdev/rte_flow.c
> @@ -98,6 +98,7 @@ static const struct rte_flow_desc_data
> rte_flow_desc_item[] = {
>  	MK_FLOW_ITEM(PFCP, sizeof(struct rte_flow_item_pfcp)),
>  	MK_FLOW_ITEM(ECPRI, sizeof(struct rte_flow_item_ecpri)),
>  	MK_FLOW_ITEM(GENEVE_OPT, sizeof(struct
> rte_flow_item_geneve_opt)),
> +	MK_FLOW_ITEM(INTEGRITY, sizeof(struct rte_flow_item_integrity)),
>  	MK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)),  };
> 
This fix is correct. 

> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index
> 94c8c1ccc8..147fdefcae 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -1738,6 +1738,15 @@ struct rte_flow_item_integrity {
>  	};
>  };
> 
> +#define RTE_FLOW_ITEM_INTEGRITY_PKT_OK       RTE_BIT64(0)
> +#define RTE_FLOW_ITEM_INTEGRITY_L2_OK        RTE_BIT64(1)
> +#define RTE_FLOW_ITEM_INTEGRITY_L3_OK        RTE_BIT64(2)
> +#define RTE_FLOW_ITEM_INTEGRITY_L4_OK        RTE_BIT64(3)
> +#define RTE_FLOW_ITEM_INTEGRITY_L2_CRC_OK    RTE_BIT64(4)
> +#define RTE_FLOW_ITEM_INTEGRITY_IPV4_CSUM_OK RTE_BIT64(5)
> +#define RTE_FLOW_ITEM_INTEGRITY_L4_CSUM_OK   RTE_BIT64(6)
> +#define RTE_FLOW_ITEM_INTEGRITY_L3_LEN_OK    RTE_BIT64(7)
> +

I don't think that we need those flags, this means two option for the same API,
I suggest that we remove the value from the struct.

In any case I think this should be in a different thread then the above fix.

>  #ifndef __cplusplus
>  static const struct rte_flow_item_integrity  rte_flow_item_integrity_mask =
> {
> --
> 2.31.1

Best,
Ori

  parent reply	other threads:[~2021-04-29 10:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 17:59 [dpdk-dev] [PATCH 0/4] net/mlx5: add integrity flow item support Gregory Etelson
2021-04-28 17:59 ` [dpdk-dev] [PATCH 1/4] ethdev: fix integrity flow item Gregory Etelson
2021-04-28 18:06   ` Thomas Monjalon
2021-04-28 17:59 ` [dpdk-dev] [PATCH 2/4] net/mlx5: update PRM definitions Gregory Etelson
2021-04-28 17:59 ` [dpdk-dev] [PATCH 3/4] net/mlx5: support integrity flow item Gregory Etelson
2021-04-28 17:59 ` [dpdk-dev] [PATCH 4/4] doc: add MLX5 PMD integrity item limitations Gregory Etelson
2021-04-29  6:16 ` [dpdk-dev] [PATCH v2 0/4] net/mlx5: add integrity flow item support Gregory Etelson
2021-04-29  6:16   ` [dpdk-dev] [PATCH v2 1/4] ethdev: fix integrity flow item Gregory Etelson
2021-04-29  7:57     ` Thomas Monjalon
2021-04-29 10:13     ` Ori Kam [this message]
2021-04-29 11:37       ` Thomas Monjalon
2021-04-29  6:16   ` [dpdk-dev] [PATCH v2 2/4] net/mlx5: update PRM definitions Gregory Etelson
2021-04-29  6:16   ` [dpdk-dev] [PATCH v2 3/4] net/mlx5: support integrity flow item Gregory Etelson
2021-04-29  6:16   ` [dpdk-dev] [PATCH v2 4/4] doc: add MLX5 PMD integrity item support Gregory Etelson
2021-04-29 18:36 ` [dpdk-dev] [PATCH v3 0/4] net/mlx5: add integrity flow " Gregory Etelson
2021-04-29 18:36   ` [dpdk-dev] [PATCH v3 1/4] ethdev: fix integrity flow item Gregory Etelson
2021-04-29 21:19     ` Ajit Khaparde
2021-05-02  5:54       ` Ori Kam
2021-04-29 18:36   ` [dpdk-dev] [PATCH v3 2/4] net/mlx5: update PRM definitions Gregory Etelson
2021-04-29 18:36   ` [dpdk-dev] [PATCH v3 3/4] net/mlx5: support integrity flow item Gregory Etelson
2021-04-29 18:36   ` [dpdk-dev] [PATCH v3 4/4] doc: add MLX5 PMD integrity item support Gregory Etelson
2021-05-04 15:21     ` Ferruh Yigit
2021-05-04 15:26       ` Ferruh Yigit
2021-05-04 15:42   ` [dpdk-dev] [PATCH v3 0/4] net/mlx5: add integrity flow " Ferruh Yigit

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=DM6PR12MB4987B58CFB29EE9253B2B97CD65F9@DM6PR12MB4987.namprd12.prod.outlook.com \
    --to=orika@nvidia.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=getelson@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    --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).