* [PATCH v2 net-next] ice, xsk: Move Rx allocation out of while-loop
@ 2020-12-11 8:54 Björn Töpel
2020-12-15 2:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Björn Töpel @ 2020-12-11 8:54 UTC (permalink / raw)
To: intel-wired-lan
Cc: Björn Töpel, magnus.karlsson, netdev, bpf, maciej.fijalkowski
From: Björn Töpel <bjorn.topel@intel.com>
Instead doing the check for allocation in each loop, move it outside
the while loop and do it every NAPI loop.
This change boosts the xdpsock rxdrop scenario with 15% more
packets-per-second.
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
---
v2: Fixed spelling and reworked the commit message. (Maciej)
---
drivers/net/ethernet/intel/ice/ice_xsk.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c
index 797886524054..39757b4cf8f4 100644
--- a/drivers/net/ethernet/intel/ice/ice_xsk.c
+++ b/drivers/net/ethernet/intel/ice/ice_xsk.c
@@ -570,12 +570,6 @@ int ice_clean_rx_irq_zc(struct ice_ring *rx_ring, int budget)
u16 vlan_tag = 0;
u8 rx_ptype;
- if (cleaned_count >= ICE_RX_BUF_WRITE) {
- failure |= ice_alloc_rx_bufs_zc(rx_ring,
- cleaned_count);
- cleaned_count = 0;
- }
-
rx_desc = ICE_RX_DESC(rx_ring, rx_ring->next_to_clean);
stat_err_bits = BIT(ICE_RX_FLEX_DESC_STATUS0_DD_S);
@@ -642,6 +636,9 @@ int ice_clean_rx_irq_zc(struct ice_ring *rx_ring, int budget)
ice_receive_skb(rx_ring, skb, vlan_tag);
}
+ if (cleaned_count >= ICE_RX_BUF_WRITE)
+ failure = !ice_alloc_rx_bufs_zc(rx_ring, cleaned_count);
+
ice_finalize_xdp_rx(rx_ring, xdp_xmit);
ice_update_rx_ring_stats(rx_ring, total_rx_packets, total_rx_bytes);
base-commit: d9838b1d39283c1200c13f9076474c7624b8ec34
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 net-next] ice, xsk: Move Rx allocation out of while-loop
2020-12-11 8:54 [PATCH v2 net-next] ice, xsk: Move Rx allocation out of while-loop Björn Töpel
@ 2020-12-15 2:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-12-15 2:00 UTC (permalink / raw)
To: =?utf-8?b?QmrDtnJuIFTDtnBlbCA8Ympvcm4udG9wZWxAZ21haWwuY29tPg==?=
Cc: intel-wired-lan, bjorn.topel, magnus.karlsson, netdev, bpf,
maciej.fijalkowski
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Fri, 11 Dec 2020 09:54:10 +0100 you wrote:
> From: Björn Töpel <bjorn.topel@intel.com>
>
> Instead doing the check for allocation in each loop, move it outside
> the while loop and do it every NAPI loop.
>
> This change boosts the xdpsock rxdrop scenario with 15% more
> packets-per-second.
>
> [...]
Here is the summary with links:
- [v2,net-next] ice, xsk: Move Rx allocation out of while-loop
https://git.kernel.org/netdev/net-next/c/5bb0c4b5eb61
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-15 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 8:54 [PATCH v2 net-next] ice, xsk: Move Rx allocation out of while-loop Björn Töpel
2020-12-15 2:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).