patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Kaijun Zeng <corezeng@gmail.com>, dev@dpdk.org
Cc: stable@dpdk.org, Jochen Behrens <jbehrens@vmware.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH v2] net/vmxnet3: fix return code in initializing
Date: Tue, 6 Jun 2023 10:08:22 +0100	[thread overview]
Message-ID: <3515fc61-74a0-0d33-dada-498251ba84b5@amd.com> (raw)
In-Reply-To: <20230602164438.45939-1-corezeng@gmail.com>

On 6/2/2023 5:44 PM, Kaijun Zeng wrote:
> Improve error handling
> 
> Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kaijun Zeng <corezeng@gmail.com>
> ---
>  drivers/net/vmxnet3/vmxnet3_rxtx.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
> index 73ec1e4727..e615d40d09 100644
> --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
> +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
> @@ -1311,7 +1311,17 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
>  		for (j = 0; j < VMXNET3_RX_CMDRING_SIZE; j++) {
>  			/* Passing 0 as alloc_num will allocate full ring */
>  			ret = vmxnet3_post_rx_bufs(rxq, j);
> -			if (ret <= 0) {
> +
> +			/* Zero number of descriptors in the configuration of the RX queue */
> +			if (ret == 0) {
> +				PMD_INIT_LOG(ERR,
> +					"ERROR: Zero descriptor requirement in Rx queue: %d,"
> +					"buffers ring: %d\n",
> +					i, j);
> +				return -EINVAL;
> +			}
> +			/* Return the errno */
> +			if (ret < 0) {
>  				PMD_INIT_LOG(ERR,
>  					     "ERROR: Posting Rxq: %d buffers ring: %d",
>  					     i, j);


Looks good to me, @Jochen any objection?

  reply	other threads:[~2023-06-06  9:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230528143734.145326-1-user@sklga>
2023-06-02 16:44 ` Kaijun Zeng
2023-06-06  9:08   ` Ferruh Yigit [this message]
2023-06-06 15:36   ` Stephen Hemminger
2023-06-07 15:49     ` Ferruh Yigit
2023-06-07 17:57   ` [PATCH v3] " Kaijun Zeng
2023-06-09 18:08     ` Ferruh Yigit
2023-06-07 16:54 ` [PATCH] " Kaijun Zeng

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=3515fc61-74a0-0d33-dada-498251ba84b5@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=bruce.richardson@intel.com \
    --cc=corezeng@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jbehrens@vmware.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).