From 13134db7a2efe890fb440004f54f236dc28bace1 Mon Sep 17 00:00:00 2001 From: Arthur Kiyanovski Date: Fri, 29 Aug 2025 20:57:15 +0000 Subject: [PATCH] cleanup: Use CI_CFG_PKT_BUF_SIZE instead of hardcoded number --- src/include/onload/pkt_filler.h | 4 ++-- src/lib/ciul/efxdp_vi.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/include/onload/pkt_filler.h b/src/include/onload/pkt_filler.h index 67ad23c69..758c98dc2 100644 --- a/src/include/onload/pkt_filler.h +++ b/src/include/onload/pkt_filler.h @@ -39,8 +39,8 @@ ci_inline void oo_pkt_filler_init(struct oo_pkt_filler* pf, ci_ip_pkt_fmt* pkt, void* buf_start) { pf->last_pkt = pf->pkt = pkt; pf->buf_start = buf_start; - /* ?? or could this just be ((char*) pkt + 2048) ? */ - pf->buf_end = CI_PTR_ALIGN_FWD(PKT_START(pkt), 2048); + /* ?? or could this just be ((char*) pkt + CI_CFG_PKT_BUF_SIZE) ? */ + pf->buf_end = CI_PTR_ALIGN_FWD(PKT_START(pkt), CI_CFG_PKT_BUF_SIZE); /* ?? FIXME: should depend on runtime buffer size */ } diff --git a/src/lib/ciul/efxdp_vi.c b/src/lib/ciul/efxdp_vi.c index a8076e62b..5b0c29cc4 100644 --- a/src/lib/ciul/efxdp_vi.c +++ b/src/lib/ciul/efxdp_vi.c @@ -17,6 +17,7 @@ #ifdef HAVE_AF_XDP #include +#include #include "af_xdp_defs.h" #include "logging.h" @@ -455,7 +456,7 @@ void efxdp_vi_init(ef_vi* vi) efxdp_ef_vi_transmitv_ctpio_fallback_not_supp; } - vi->rx_buffer_len = 2048; + vi->rx_buffer_len = CI_CFG_PKT_BUF_SIZE; vi->rx_prefix_len = 0; vi->evq_phase_bits = 1; /* We set this flag for ef_eventq_has_event */ }