Skip to content

Commit

Permalink
Set tail to 0 on ring initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Jul 29, 2024
1 parent a4f27f6 commit 223449b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down
4 changes: 3 additions & 1 deletion drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 223449b

Please sign in to comment.