DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bing Zhao <bingz@nvidia.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Matan Azrad <matan@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	 Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
	Raslan Darawsheh <rasland@nvidia.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Michael Baum <michaelba@nvidia.com>
Subject: RE: [PATCH 1/7] net/mlx5: fix the modify field check of tag
Date: Mon, 3 Jul 2023 13:31:37 +0000	[thread overview]
Message-ID: <DM4PR12MB5184FC30E15F00BEC783A34DD029A@DM4PR12MB5184.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20230629230831.10023261@hermes.local>

Hi Stephen,
If I understand correctly, do you mean that the internal value and rte_flow API value may have some conflict?
All the MLX5 internal enum values start from INT_MIN. When treating it as a int value, it would not have the same value with rte_flow enums, unless all the 2^^32 are defined.
But yes, this has some risk since there is no limitation of the values in the rte_flow API.

BR. Bing

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Friday, June 30, 2023 2:09 PM
> To: Bing Zhao <bingz@nvidia.com>
> Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>;
> dev@dpdk.org; Michael Baum <michaelba@nvidia.com>
> Subject: Re: [PATCH 1/7] net/mlx5: fix the modify field check of tag
> 
> External email: Use caution opening links or attachments
> 
> 
> On Fri, 30 Jun 2023 08:43:03 +0300
> Bing Zhao <bingz@nvidia.com> wrote:
> 
> > @@ -1117,9 +1117,10 @@ flow_dv_fetch_field(const uint8_t *data,
> > uint32_t size)  static inline bool
> > flow_modify_field_support_tag_array(enum rte_flow_field_id field)  {
> > -     switch (field) {
> > +     switch ((int)field) {
> >       case RTE_FLOW_FIELD_TAG:
> >       case RTE_FLOW_FIELD_MPLS:
> > +     case MLX5_RTE_FLOW_FIELD_META_REG:
> 
> Mixing internal and API fields seems like something that could get easily
> broken by changes to rte_flow.

  reply	other threads:[~2023-07-03 13:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  5:43 Bing Zhao
2023-06-30  6:08 ` Stephen Hemminger
2023-07-03 13:31   ` Bing Zhao [this message]
2023-07-06  9:37     ` Thomas Monjalon
2023-07-06  9:59       ` Bing Zhao
2023-07-10 10:34 ` Raslan Darawsheh

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=DM4PR12MB5184FC30E15F00BEC783A34DD029A@DM4PR12MB5184.namprd12.prod.outlook.com \
    --to=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=michaelba@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=suanmingm@nvidia.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).