[PATCH v4 09/31] net/ena/base: optimize Rx ring submission queue
shaibran at amazon.com
shaibran at amazon.com
Tue Mar 12 19:06:54 CET 2024
From: Shai Brandes <shaibran at amazon.com>
RX ring submission queue descriptors are always located in host memory
This optimization replaces the generic descriptor retrieval method
with a tailored method for host memory type descriptors to avoid
unnecessary if statement.
Signed-off-by: Shai Brandes <shaibran at amazon.com>
Reviewed-by: Amit Bernstein <amitbern at amazon.com>
---
drivers/net/ena/base/ena_eth_com.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ena/base/ena_eth_com.c b/drivers/net/ena/base/ena_eth_com.c
index 32090259cd..875d55b00d 100644
--- a/drivers/net/ena/base/ena_eth_com.c
+++ b/drivers/net/ena/base/ena_eth_com.c
@@ -630,9 +630,8 @@ int ena_com_add_single_rx_desc(struct ena_com_io_sq *io_sq,
if (unlikely(!ena_com_sq_have_enough_space(io_sq, 1)))
return ENA_COM_NO_SPACE;
- desc = get_sq_desc(io_sq);
- if (unlikely(!desc))
- return ENA_COM_FAULT;
+ /* virt_addr allocation success is checked before calling this function */
+ desc = get_sq_desc_regular_queue(io_sq);
memset(desc, 0x0, sizeof(struct ena_eth_io_rx_desc));
--
2.17.1
More information about the dev
mailing list