DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: longli@linuxonhyperv.com,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: dev@dpdk.org, Ajay Sharma <sharmaajay@microsoft.com>,
	Long Li <longli@microsoft.com>
Subject: Re: [PATCH] net/mana: fix wrong indexing on CQE error when coalescing is used
Date: Fri, 7 Jul 2023 10:01:36 +0100	[thread overview]
Message-ID: <718d5b7e-d315-d935-8cae-5ed0a8d31872@amd.com> (raw)
In-Reply-To: <1688689077-5557-1-git-send-email-longli@linuxonhyperv.com>

On 7/7/2023 1:17 AM, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
> 
> On a fatal CQE error when coalescing is used, update the correct index
> and allow proceeding to the next CQE.
> 
> Fixes: 3409e0f172f6 ("net/mana: implement Rx CQE coalescing")
>

Is above fixes commit correct?
Logic for 'CQE_RX_COALESCED_4' is not changed with this commit, in above
commit and in this commit both does breaks the loop.

This commit changes logic for 'CQE_RX_TRUNCATED' and 'default' cases,
which are added with different commits, not the one in fixes line.

"fatal CQE error when coalescing" mentioned in the commit log, to which
switch case does this corresponds to?


> Signed-off-by: Long Li <longli@microsoft.com>
> ---
>  drivers/net/mana/rx.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
> index cacfd9ae1b..220b372b15 100644
> --- a/drivers/net/mana/rx.c
> +++ b/drivers/net/mana/rx.c
> @@ -416,23 +416,21 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
>  
>  		switch (oob->cqe_hdr.cqe_type) {
>  		case CQE_RX_OKAY:
> +		case CQE_RX_COALESCED_4:
>  			/* Proceed to process mbuf */
>  			break;
>  
>  		case CQE_RX_TRUNCATED:
> -			DP_LOG(DEBUG, "Drop a truncated packet");
> +		default:
> +			DP_LOG(ERR, "RX CQE type %d client %d vendor %d",
> +			       oob->cqe_hdr.cqe_type, oob->cqe_hdr.client_type,
> +			       oob->cqe_hdr.vendor_err);
> +
>  			rxq->stats.errors++;
>  			rte_pktmbuf_free(mbuf);
> -			goto drop;
> -
> -		case CQE_RX_COALESCED_4:
> -			/* Proceed to process mbuf */
> -			break;
>  
> -		default:
> -			DP_LOG(ERR, "Unknown RX CQE type %d",
> -			       oob->cqe_hdr.cqe_type);
> -			continue;
> +			i++;
> +			goto drop;
>  		}
>  
>  		DP_LOG(DEBUG, "mana_rx_comp_oob type %d rxq %p",


  reply	other threads:[~2023-07-07  9:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  0:17 longli
2023-07-07  9:01 ` Ferruh Yigit [this message]
2023-07-07 18:01   ` Long Li
2023-07-10 10:42     ` Ferruh Yigit
2023-07-10 11:00 ` Ferruh Yigit

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=718d5b7e-d315-d935-8cae-5ed0a8d31872@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=longli@linuxonhyperv.com \
    --cc=longli@microsoft.com \
    --cc=sharmaajay@microsoft.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).