From 223449be1e32945d176e8990b5dc4c785ddd2dc5 Mon Sep 17 00:00:00 2001 From: Alfredo Cardigliano Date: Mon, 29 Jul 2024 18:30:09 +0200 Subject: [PATCH] Set tail to 0 on ring initialization --- drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_main.c | 5 +++++ drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_txrx.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_main.c b/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_main.c index 5a8038eff..be42e8cae 100644 --- a/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_main.c +++ b/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_main.c @@ -1579,6 +1579,11 @@ static void iavf_enable_adapter(struct iavf_adapter *adapter) iavf_napi_enable_all(adapter); adapter->aq_required |= IAVF_FLAG_AQ_ENABLE_QUEUES; + +#ifdef HAVE_PF_RING + if (unlikely(enable_debug)) + printk("[PF_RING-ZC] %s: enabling adapter [RX Tail=%u]", __FUNCTION__, readl(adapter->rx_rings[0].tail)); +#endif } /** diff --git a/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_txrx.c b/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_txrx.c index 46c111502..6f0fc089d 100644 --- a/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_txrx.c +++ b/drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_txrx.c @@ -1060,8 +1060,10 @@ bool iavf_alloc_rx_buffers(struct iavf_ring *rx_ring, u16 cleaned_count) #ifdef HAVE_PF_RING #ifdef HAVE_PF_RING_ONLY - if (!kernel_only_adapter[adapter->instance]) + if (!kernel_only_adapter[adapter->instance]) { + iavf_release_rx_desc(rx_ring, 0 /* set tail to 0 */); return true; + } #endif if (unlikely(enable_debug)) printk("[PF_RING-ZC] %s(%s) prefilling rx ring with %u/%u skbuff\n",