DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Soumyadeep Hore <soumyadeep.hore@intel.com>
Cc: <aman.deep.singh@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH v1] net/cpfl: add checks for received ctlq messages
Date: Thu, 4 Jul 2024 13:49:27 +0100	[thread overview]
Message-ID: <ZoaaV584HrARJg0w@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20240704051835.2630052-1-soumyadeep.hore@intel.com>

On Thu, Jul 04, 2024 at 05:18:35AM +0000, Soumyadeep Hore wrote:
> cpfl_process_rx_ctlq_msg() is used to check error status
> returned for specific opcodes.
> 
> Previously error codes were only -ve for
> cpfl_receive_ctlq_msg() but now there are +ve error codes.
> Hence code changes are made accordingly.
> 

Is this a bugfix? If so, please reword title to start with "fix" and put in
a fixes tag in the commit body here. If it fixes a commit not yet pulled to
main I can merge the fix into the original commit in the net-intel tree.

Also, I wonder if this patch should be split into two commits - one adding
the new function for printing error messages, and the second for changing
the return value check from < 0 to != 0. The two don't seem to be directly
related to each other, so should be separate, I think.

> Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
> ---
>  drivers/net/cpfl/cpfl_flow_engine_fxp.c |  2 +-
>  drivers/net/cpfl/cpfl_fxp_rule.c        | 52 +++++++++++++++++++++++++
>  2 files changed, 53 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/cpfl/cpfl_flow_engine_fxp.c b/drivers/net/cpfl/cpfl_flow_engine_fxp.c
> index 39a281fa61..983b4188e4 100644
> --- a/drivers/net/cpfl/cpfl_flow_engine_fxp.c
> +++ b/drivers/net/cpfl/cpfl_flow_engine_fxp.c
> @@ -95,7 +95,7 @@ cpfl_fxp_create(struct rte_eth_dev *dev,
>  
>  	ret = cpfl_rule_process(itf, ad->ctlqp[cpq_id], ad->ctlqp[cpq_id + 1],
>  				rim->rules, rim->rule_num, true);
> -	if (ret < 0) {
> +	if (ret) {

Style nit - put in explicit "!= 0" for integer comparisons.

>  		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
>  				   "cpfl filter create flow fail");
>  		rte_free(rim);

<snip>

Thanks,
/Bruce

  reply	other threads:[~2024-07-04 12:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04  5:18 Soumyadeep Hore
2024-07-04 12:49 ` Bruce Richardson [this message]
2024-07-05  5:08 ` [PATCH v2 0/2] Avoid rule duplication in CPFL PMD Soumyadeep Hore
2024-07-05  5:08   ` [PATCH v2 1/2] net/cpfl: fix check for opcodes of received ctlq messages Soumyadeep Hore
2024-07-05  5:08   ` [PATCH v2 2/2] net/cpfl: fix +ve error codes for " Soumyadeep Hore
2024-07-05  8:30     ` [PATCH v3 0/2] Avoid rule duplication in CPFL PMD Soumyadeep Hore
2024-07-05  8:30       ` [PATCH v3 1/2] net/cpfl: fix check for opcodes of received ctlq messages Soumyadeep Hore
2024-07-05  9:49         ` Bruce Richardson
2024-07-05  8:30       ` [PATCH v3 2/2] net/cpfl: fix +ve error codes for " Soumyadeep Hore
2024-07-05 13:05         ` [PATCH v4 0/2] Avoid rule duplication in CPFL PMD Soumyadeep Hore
2024-07-05 13:05           ` [PATCH v4 1/2] net/cpfl: fix check for opcodes of received ctlq messages Soumyadeep Hore
2024-07-05 14:21             ` Bruce Richardson
2024-07-05 13:05           ` [PATCH v4 2/2] net/cpfl: fix +ve error codes for " Soumyadeep Hore
2024-07-05 14:47           ` [PATCH v4 0/2] Avoid rule duplication in CPFL PMD Bruce Richardson

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=ZoaaV584HrARJg0w@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=soumyadeep.hore@intel.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).