From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Michal Krawczyk <mk@semihalf.com>
Cc: dpdk stable <stable@dpdk.org>, Shai Brandes <shaibran@amazon.com>,
Shay Agroskin <shayagr@amazon.com>
Subject: Re: [dpdk-stable] [PATCH 19.11 2/2] net/ena: trigger reset on Tx prepare failure
Date: Wed, 11 Aug 2021 12:10:58 +0200 [thread overview]
Message-ID: <CAATJJ0KOnhsQOd9h5X3BptDrwMuZe=1oBOeSTppsiZBUPr2mAQ@mail.gmail.com> (raw)
In-Reply-To: <20210811095145.1846-2-mk@semihalf.com>
On Wed, Aug 11, 2021 at 11:52 AM Michal Krawczyk <mk@semihalf.com> wrote:
>
> [ upstream commit b57e1053813b369d20bb2a177081a4c8ca63cede ]
>
Applied, thanks!
> If the prepare function failed, then it means the descriptors are in the
> invalid state.
>
> This condition now triggers the reset, which should be further handled
> by the application.
>
> To notify the application about prepare function failure, the error log
> was added. In general, it should never fail in normal conditions, as the
> Tx function checks for the available space in the Tx ring before the
> preparation even starts.
>
> Fixes: 2081d5e2e92d ("net/ena: add reset routine")
> Cc: stable@dpdk.org
>
> Signed-off-by: Michal Krawczyk <mk@semihalf.com>
> Reviewed-by: Shai Brandes <shaibran@amazon.com>
> Reviewed-by: Shay Agroskin <shayagr@amazon.com>
> ---
> drivers/net/ena/ena_ethdev.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
> index 6c9a2aa1a9..408e127511 100644
> --- a/drivers/net/ena/ena_ethdev.c
> +++ b/drivers/net/ena/ena_ethdev.c
> @@ -2359,7 +2359,12 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
> rc = ena_com_prepare_tx(tx_ring->ena_com_io_sq,
> &ena_tx_ctx, &nb_hw_desc);
> if (unlikely(rc)) {
> + PMD_DRV_LOG(ERR,
> + "Failed to prepare Tx buffers, rc: %d\n", rc);
> ++tx_ring->tx_stats.prepare_ctx_err;
> + tx_ring->adapter->reset_reason =
> + ENA_REGS_RESET_DRIVER_INVALID_STATE;
> + tx_ring->adapter->trigger_reset = true;
> break;
> }
> tx_info->tx_descs = nb_hw_desc;
> --
> 2.25.1
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
next prev parent reply other threads:[~2021-08-11 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 9:51 [dpdk-stable] [PATCH 19.11 1/2] net/ena: enable multi-segment in Tx offload flags Michal Krawczyk
2021-08-11 9:51 ` [dpdk-stable] [PATCH 19.11 2/2] net/ena: trigger reset on Tx prepare failure Michal Krawczyk
2021-08-11 10:10 ` Christian Ehrhardt [this message]
2021-08-11 10:10 ` [dpdk-stable] [PATCH 19.11 1/2] net/ena: enable multi-segment in Tx offload flags Christian Ehrhardt
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='CAATJJ0KOnhsQOd9h5X3BptDrwMuZe=1oBOeSTppsiZBUPr2mAQ@mail.gmail.com' \
--to=christian.ehrhardt@canonical.com \
--cc=mk@semihalf.com \
--cc=shaibran@amazon.com \
--cc=shayagr@amazon.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).