From: Joshua Washington <joshwash@google.com>
To: Thomas Monjalon <thomas@monjalon.net>,
Jeroen de Borst <jeroendb@google.com>,
Rushil Gupta <rushilg@google.com>,
Joshua Washington <joshwash@google.com>,
Junfeng Guo <junfeng.guo@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org,
Ferruh Yigit <ferruh.yigit@amd.com>,
Praveen Kaligineedi <pkaligineedi@google.com>
Subject: [PATCH] net/gve: always attempt Rx refill on DQ
Date: Tue, 1 Oct 2024 16:45:33 -0700 [thread overview]
Message-ID: <20241001234533.3308368-1-joshwash@google.com> (raw)
Before this patch, gve_rx_refill_dqo() is only called if the number of
packets received in a cycle is non-zero. However, in a
memory-constrained scenario, this doesn't behave well, as this could be
a potential source of lockup, if there is no memory and all buffers have
been received before memory is freed up for the driver to use.
This patch moves the gve_rx_refill_dqo() call to occur regardless of
whether packets have been received so that in the case that enough
memory is freed, the driver can recover.
Fixes: 45da16b5b181 ("net/gve: support basic Rx data path for DQO")
Cc: stable@dpdk.org
Signed-off-by: Joshua Washington <joshwash@google.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Rushil Gupta <rushilg@google.com>
---
.mailmap | 1 +
drivers/net/gve/gve_rx_dqo.c | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/.mailmap b/.mailmap
index d798a3f30f..d2f30cf8eb 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1174,6 +1174,7 @@ Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Prashant Upadhyaya <prashant.upadhyaya@aricent.com> <praupadhyaya@gmail.com>
Prateek Agarwal <prateekag@cse.iitb.ac.in>
Prathisna Padmasanan <prathisna.padmasanan@intel.com>
+Praveen Kaligineedi <pkaligineedi@google.com>
Praveen Shetty <praveen.shetty@intel.com>
Pravin Pathak <pravin.pathak@intel.com>
Prince Takkar <ptakkar@marvell.com>
diff --git a/drivers/net/gve/gve_rx_dqo.c b/drivers/net/gve/gve_rx_dqo.c
index d8e9eee4a8..60702d4100 100644
--- a/drivers/net/gve/gve_rx_dqo.c
+++ b/drivers/net/gve/gve_rx_dqo.c
@@ -195,14 +195,12 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
if (nb_rx > 0) {
rxq->rx_tail = rx_id;
- if (rx_id_bufq != rxq->next_avail)
- rxq->next_avail = rx_id_bufq;
-
- gve_rx_refill_dqo(rxq);
+ rxq->next_avail = rx_id_bufq;
rxq->stats.packets += nb_rx;
rxq->stats.bytes += bytes;
}
+ gve_rx_refill_dqo(rxq);
return nb_rx;
}
--
2.46.1.824.gd892dcdcdd-goog
next reply other threads:[~2024-10-01 23:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 23:45 Joshua Washington [this message]
2024-10-04 4:47 ` 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=20241001234533.3308368-1-joshwash@google.com \
--to=joshwash@google.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=jeroendb@google.com \
--cc=junfeng.guo@intel.com \
--cc=pkaligineedi@google.com \
--cc=rushilg@google.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).