netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] i40e: remove dead stores on XSK hotpath
@ 2021-11-30 18:36 Alexander Lobakin
  2021-11-30 18:36 ` [PATCH net-next 2/2] ice: remove dead store " Alexander Lobakin
  2022-02-18  8:35 ` [Intel-wired-lan] [PATCH net-next 1/2] i40e: remove dead stores " Kuruvinakunnel, George
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Lobakin @ 2021-11-30 18:36 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: Alexander Lobakin, Tony Nguyen, Jesse Brandeburg,
	Maciej Fijalkowski, Magnus Karlsson, Michal Swiatkowski,
	David S. Miller, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend,
	Cristian Dumitrescu, bpf, netdev, linux-kernel

The 'if (ntu == rx_ring->count)' block in i40e_alloc_rx_buffers_zc()
was previously residing in the loop, but after introducing the
batched interface it is used only to wrap-around the NTU descriptor,
thus no more need to assign 'xdp'.

'cleaned_count' in i40e_clean_rx_irq_zc() was previously being
incremented in the loop, but after commit f12738b6ec06
("i40e: remove unnecessary cleaned_count updates") it gets
assigned only once after it, so the initialization can be dropped.

Fixes: 6aab0bb0c5cd ("i40e: Use the xsk batched rx allocation interface")
Fixes: f12738b6ec06 ("i40e: remove unnecessary cleaned_count updates")
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_xsk.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index ea06e957393e..f08d19b8c554 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
@@ -218,7 +218,6 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count)
 	ntu += nb_buffs;
 	if (ntu == rx_ring->count) {
 		rx_desc = I40E_RX_DESC(rx_ring, 0);
-		xdp = i40e_rx_bi(rx_ring, 0);
 		ntu = 0;
 	}
 
@@ -324,11 +323,11 @@ static void i40e_handle_xdp_result_zc(struct i40e_ring *rx_ring,
 int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
 {
 	unsigned int total_rx_bytes = 0, total_rx_packets = 0;
-	u16 cleaned_count = I40E_DESC_UNUSED(rx_ring);
 	u16 next_to_clean = rx_ring->next_to_clean;
 	u16 count_mask = rx_ring->count - 1;
 	unsigned int xdp_res, xdp_xmit = 0;
 	bool failure = false;
+	u16 cleaned_count;
 
 	while (likely(total_rx_packets < (unsigned int)budget)) {
 		union i40e_rx_desc *rx_desc;
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH net-next 2/2] ice: remove dead store on XSK hotpath
  2021-11-30 18:36 [PATCH net-next 1/2] i40e: remove dead stores on XSK hotpath Alexander Lobakin
@ 2021-11-30 18:36 ` Alexander Lobakin
  2022-02-18  8:35 ` [Intel-wired-lan] [PATCH net-next 1/2] i40e: remove dead stores " Kuruvinakunnel, George
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Lobakin @ 2021-11-30 18:36 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: Alexander Lobakin, Tony Nguyen, Jesse Brandeburg,
	Maciej Fijalkowski, Magnus Karlsson, Michal Swiatkowski,
	David S. Miller, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend,
	Cristian Dumitrescu, bpf, netdev, linux-kernel

The 'if (ntu == rx_ring->count)' block in ice_alloc_rx_buffers_zc()
was previously residing in the loop, but after introducing the
batched interface it is used only to wrap-around the NTU descriptor,
thus no more need to assign 'xdp'.

Fixes: db804cfc21e9 ("ice: Use the xsk batched rx allocation interface")
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_xsk.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c
index ff55cb415b11..8573d2a3d873 100644
--- a/drivers/net/ethernet/intel/ice/ice_xsk.c
+++ b/drivers/net/ethernet/intel/ice/ice_xsk.c
@@ -391,7 +391,6 @@ bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
 	ntu += nb_buffs;
 	if (ntu == rx_ring->count) {
 		rx_desc = ICE_RX_DESC(rx_ring, 0);
-		xdp = rx_ring->xdp_buf;
 		ntu = 0;
 	}
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [Intel-wired-lan] [PATCH net-next 1/2] i40e: remove dead stores on XSK hotpath
  2021-11-30 18:36 [PATCH net-next 1/2] i40e: remove dead stores on XSK hotpath Alexander Lobakin
  2021-11-30 18:36 ` [PATCH net-next 2/2] ice: remove dead store " Alexander Lobakin
@ 2022-02-18  8:35 ` Kuruvinakunnel, George
  1 sibling, 0 replies; 3+ messages in thread
From: Kuruvinakunnel, George @ 2022-02-18  8:35 UTC (permalink / raw)
  To: Lobakin, Alexandr, intel-wired-lan
  Cc: linux-kernel, Jesper Dangaard Brouer, Daniel Borkmann, netdev,
	bpf, John Fastabend, Alexei Starovoitov, Jakub Kicinski,
	Dumitrescu, Cristian, David S. Miller, Karlsson, Magnus, Nagraj,
	Shravan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Lobakin,
> Alexandr
> Sent: Wednesday, December 1, 2021 12:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: linux-kernel@vger.kernel.org; Jesper Dangaard Brouer <hawk@kernel.org>;
> Daniel Borkmann <daniel@iogearbox.net>; netdev@vger.kernel.org;
> bpf@vger.kernel.org; John Fastabend <john.fastabend@gmail.com>; Alexei
> Starovoitov <ast@kernel.org>; Jakub Kicinski <kuba@kernel.org>; Dumitrescu,
> Cristian <cristian.dumitrescu@intel.com>; David S. Miller <davem@davemloft.net>;
> Karlsson, Magnus <magnus.karlsson@intel.com>
> Subject: [Intel-wired-lan] [PATCH net-next 1/2] i40e: remove dead stores on XSK
> hotpath
> 
> The 'if (ntu == rx_ring->count)' block in i40e_alloc_rx_buffers_zc() was previously
> residing in the loop, but after introducing the batched interface it is used only to wrap-
> around the NTU descriptor, thus no more need to assign 'xdp'.
> 
> 'cleaned_count' in i40e_clean_rx_irq_zc() was previously being incremented in the
> loop, but after commit f12738b6ec06
> ("i40e: remove unnecessary cleaned_count updates") it gets assigned only once after
> it, so the initialization can be dropped.
> 
> Fixes: 6aab0bb0c5cd ("i40e: Use the xsk batched rx allocation interface")
> Fixes: f12738b6ec06 ("i40e: remove unnecessary cleaned_count updates")
> Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_xsk.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-18  8:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 18:36 [PATCH net-next 1/2] i40e: remove dead stores on XSK hotpath Alexander Lobakin
2021-11-30 18:36 ` [PATCH net-next 2/2] ice: remove dead store " Alexander Lobakin
2022-02-18  8:35 ` [Intel-wired-lan] [PATCH net-next 1/2] i40e: remove dead stores " Kuruvinakunnel, George

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).