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>, <stable@dpdk.org>
Subject: Re: [PATCH v4 1/2] net/cpfl: fix check for opcodes of received ctlq messages
Date: Fri, 5 Jul 2024 15:21:20 +0100	[thread overview]
Message-ID: <ZogBYBq6Z_9X60Ek@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20240705130515.3090598-2-soumyadeep.hore@intel.com>

On Fri, Jul 05, 2024 at 01:05:14PM +0000, Soumyadeep Hore wrote:
> Include checks for error status returned for specific
> opcodes and display error messages accordingly.
> 
> Fixes: db042ef09d26 ("net/cpfl: implement FXP rule creation and destroying")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
> ---
>  drivers/net/cpfl/cpfl_fxp_rule.c |  8 ++++++++
>  drivers/net/cpfl/cpfl_rules.h    | 11 +++++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/drivers/net/cpfl/cpfl_fxp_rule.c b/drivers/net/cpfl/cpfl_fxp_rule.c
> index 0e710a007b..f48ecd5656 100644
> --- a/drivers/net/cpfl/cpfl_fxp_rule.c
> +++ b/drivers/net/cpfl/cpfl_fxp_rule.c
> @@ -92,6 +92,14 @@ cpfl_receive_ctlq_msg(struct idpf_hw *hw, struct idpf_ctlq_info *cq, u16 num_q_m
>  
>  		/* TODO - process rx controlq message */
>  		for (i = 0; i < num_q_msg; i++) {
> +			ret = q_msg[i].status;
> +			if (ret &&

DPDK style guide recommends doing explicit comparisons for conditionals,
rather than relying on non-zero being true. Therefore this would be better
as "if (ret != CPFL_CFG_PKT_ERR_OK &&"

> +				q_msg[i].opcode != cpfl_ctlq_sem_query_del_rule_hash_addr) {

The indentation here is problematic as the line continuation aligns with
the conditional body. Looking at the rest of this file, the continuation
style is that of aligning with opening brackets so that should be used here
too.

> +				PMD_INIT_LOG(ERR, "Failed to process rx_ctrlq msg: %s",
> +					cpfl_cfg_pkt_errormsg[ret]);
> +				return ret;
> +			}
> +
>  			if (q_msg[i].data_len > 0)
>  				dma = q_msg[i].ctx.indirect.payload;
>  			else

If there is no objection, I'll fix both these comments on patch apply.

/Bruce

  reply	other threads:[~2024-07-05 14:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04  5:18 [PATCH v1] net/cpfl: add checks for " Soumyadeep Hore
2024-07-04 12:49 ` Bruce Richardson
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 [this message]
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=ZogBYBq6Z_9X60Ek@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 \
    --cc=stable@dpdk.org \
    /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).