DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Junfeng Guo <junfengg@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	"Minggang(Gavin) Li" <gavinl@nvidia.com>,
	"Jiawei(Jonny) Wang" <jiaweiw@nvidia.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH] net/mlx5: fix err message overwrite for actions translation
Date: Mon, 24 Feb 2025 10:38:47 +0000	[thread overview]
Message-ID: <CH3PR12MB8460B7F6DE2D6FBBD7B1BDE3CFC02@CH3PR12MB8460.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20250220070850.6661-1-junfengg@nvidia.com>

Hi,

From: Junfeng Guo <junfengg@nvidia.com>
Sent: Thursday, February 20, 2025 9:08 AM
To: dev@dpdk.org
Cc: Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad; Minggang(Gavin) Li; Jiawei(Jonny) Wang; stable@dpdk.org
Subject: [PATCH] net/mlx5: fix err message overwrite for actions translation

Function __flow_hw_translate_actions_template contains several
encapsulated functions that already have internal error handling
process via rte_flow_error_set for each case.

Thus the one (rte_flow_error_set) within the goto statement `err`
at the end of __flow_hw_translate_actions_template function may be
redundant for those failed cases. As a result, the error messages
would all be overwritten as "fail to create rte table", making it
displayed at quite large granularity.

To prevent above error messages overwrite, this patch add a local
variable `struct rte_flow_error sub_error` to the function and pass
this `sub_error` instead of `error` to each sub-function. Under error
handling process (`err` label), if `sub_error` was updated, copy its
contents to `error` and return. If it was not updated, return default
error message (`fail to create rte table`).

Also refactor the logic for SEND_TO_KERNEL, COUNT and AGE actions in
above function to align the error handling process.

Fixes: f13fab23922b ("net/mlx5: add flow jump action")
Cc: suanmingm@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Junfeng Guo <junfengg@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      parent reply	other threads:[~2025-02-24 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20  7:08 Junfeng Guo
2025-02-20  9:49 ` Dariusz Sosnowski
2025-02-24 10:38 ` Raslan Darawsheh [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=CH3PR12MB8460B7F6DE2D6FBBD7B1BDE3CFC02@CH3PR12MB8460.namprd12.prod.outlook.com \
    --to=rasland@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=gavinl@nvidia.com \
    --cc=jiaweiw@nvidia.com \
    --cc=junfengg@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.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).