aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorOsama Abboud <osamaabb@amazon.com>2024-08-07 06:24:20 +0000
committerOsama Abboud <osamaabb@FreeBSD.org>2024-10-31 14:55:20 +0000
commit5d5b31eb79aac0e433c4de878f113f1506688fd2 (patch)
treec854b6ab7cdfdf9b1369ac29a2b634ba33bde04e /sys/dev
parentcd995601730acb15c50044196fd8acc782e4cdbc (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ena/ena_netmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c
index ae269cca853a..910b447b12c6 100644
--- a/sys/dev/ena/ena_netmap.c
+++ b/sys/dev/ena/ena_netmap.c
@@ -577,7 +577,7 @@ ena_netmap_tx_map_slots(struct ena_netmap_ctx *ctx,
remaining_len = *packet_len;
delta = 0;
- __builtin_prefetch(&ctx->slots[ctx->nm_i + 1]);
+ __builtin_prefetch(&ctx->slots[nm_next(ctx->nm_i, ctx->lim)]);
if (tx_ring->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) {
/*
* When the device is in LLQ mode, the driver will copy
@@ -664,7 +664,7 @@ ena_netmap_tx_map_slots(struct ena_netmap_ctx *ctx,
* The first segment is already counted in.
*/
while (delta > 0) {
- __builtin_prefetch(&ctx->slots[ctx->nm_i + 1]);
+ __builtin_prefetch(&ctx->slots[nm_next(ctx->nm_i, ctx->lim)]);
frag_len = slot->len;
/*
@@ -722,7 +722,7 @@ ena_netmap_tx_map_slots(struct ena_netmap_ctx *ctx,
/* Map all remaining data (regular routine for non-LLQ mode) */
while (remaining_len > 0) {
- __builtin_prefetch(&ctx->slots[ctx->nm_i + 1]);
+ __builtin_prefetch(&ctx->slots[nm_next(ctx->nm_i, ctx->lim)]);
rc = ena_netmap_map_single_slot(ctx->na, slot,
adapter->tx_buf_tag, *nm_maps, &vaddr, &paddr);