netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: nixge: Minor cleanups
@ 2018-08-11  1:19 Moritz Fischer
  2018-08-11  1:19 ` [PATCH 1/2] net: nixge: Do not zero application specific fields in desc Moritz Fischer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Moritz Fischer @ 2018-08-11  1:19 UTC (permalink / raw)
  To: davem; +Cc: keescook, netdev, linux-kernel, alex.williams, Moritz Fischer

Hi Dave,

in preparation of my 64-bit support series, here's some
minor cleanup in preparation that gets rid of unneccesary
accesses to the descriptor application fields.

I've confirmed that the hardware does not access the fields
in all our configurations.

Thanks,

Moritz

Moritz Fischer (2):
  net: nixge: Do not zero application specific fields in desc
  net: nixge: Don't store skb in app4 field of descriptor

 drivers/net/ethernet/ni/nixge.c | 11 -----------
 1 file changed, 11 deletions(-)

-- 
2.18.0

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

* [PATCH 1/2] net: nixge: Do not zero application specific fields in desc
  2018-08-11  1:19 [PATCH 0/2] net: nixge: Minor cleanups Moritz Fischer
@ 2018-08-11  1:19 ` Moritz Fischer
  2018-08-11  1:19 ` [PATCH 2/2] net: nixge: Don't store skb in app4 field of descriptor Moritz Fischer
  2018-08-13 15:49 ` [PATCH 0/2] net: nixge: Minor cleanups David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Moritz Fischer @ 2018-08-11  1:19 UTC (permalink / raw)
  To: davem; +Cc: keescook, netdev, linux-kernel, alex.williams, Moritz Fischer

Do not zero application specific fields in DMA descriptors.
The hardware does ignore them, so should software.

Signed-off-by: Moritz Fischer <mdf@kernel.org>
---
 drivers/net/ethernet/ni/nixge.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/net/ethernet/ni/nixge.c b/drivers/net/ethernet/ni/nixge.c
index 9ae4fcef725e..ac31b0d30415 100644
--- a/drivers/net/ethernet/ni/nixge.c
+++ b/drivers/net/ethernet/ni/nixge.c
@@ -739,22 +739,12 @@ static void nixge_dma_err_handler(unsigned long data)
 		cur_p->phys = 0;
 		cur_p->cntrl = 0;
 		cur_p->status = 0;
-		cur_p->app0 = 0;
-		cur_p->app1 = 0;
-		cur_p->app2 = 0;
-		cur_p->app3 = 0;
-		cur_p->app4 = 0;
 		cur_p->sw_id_offset = 0;
 	}
 
 	for (i = 0; i < RX_BD_NUM; i++) {
 		cur_p = &lp->rx_bd_v[i];
 		cur_p->status = 0;
-		cur_p->app0 = 0;
-		cur_p->app1 = 0;
-		cur_p->app2 = 0;
-		cur_p->app3 = 0;
-		cur_p->app4 = 0;
 	}
 
 	lp->tx_bd_ci = 0;
-- 
2.18.0

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

* [PATCH 2/2] net: nixge: Don't store skb in app4 field of descriptor
  2018-08-11  1:19 [PATCH 0/2] net: nixge: Minor cleanups Moritz Fischer
  2018-08-11  1:19 ` [PATCH 1/2] net: nixge: Do not zero application specific fields in desc Moritz Fischer
@ 2018-08-11  1:19 ` Moritz Fischer
  2018-08-13 15:49 ` [PATCH 0/2] net: nixge: Minor cleanups David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Moritz Fischer @ 2018-08-11  1:19 UTC (permalink / raw)
  To: davem; +Cc: keescook, netdev, linux-kernel, alex.williams, Moritz Fischer

Don't store skb in app4 field of descriptor since it is
not being used anywhere (including hardware).

Signed-off-by: Moritz Fischer <mdf@kernel.org>
---
 drivers/net/ethernet/ni/nixge.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/ni/nixge.c b/drivers/net/ethernet/ni/nixge.c
index ac31b0d30415..76efed058f33 100644
--- a/drivers/net/ethernet/ni/nixge.c
+++ b/drivers/net/ethernet/ni/nixge.c
@@ -503,7 +503,6 @@ static int nixge_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 	tx_skb->skb = skb;
 
 	cur_p->cntrl |= XAXIDMA_BD_CTRL_TXEOF_MASK;
-	cur_p->app4 = (unsigned long)skb;
 
 	tail_p = priv->tx_bd_p + sizeof(*priv->tx_bd_v) * priv->tx_bd_tail;
 	/* Start the transfer */
-- 
2.18.0

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

* Re: [PATCH 0/2] net: nixge: Minor cleanups
  2018-08-11  1:19 [PATCH 0/2] net: nixge: Minor cleanups Moritz Fischer
  2018-08-11  1:19 ` [PATCH 1/2] net: nixge: Do not zero application specific fields in desc Moritz Fischer
  2018-08-11  1:19 ` [PATCH 2/2] net: nixge: Don't store skb in app4 field of descriptor Moritz Fischer
@ 2018-08-13 15:49 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-08-13 15:49 UTC (permalink / raw)
  To: mdf; +Cc: keescook, netdev, linux-kernel, alex.williams

From: Moritz Fischer <mdf@kernel.org>
Date: Fri, 10 Aug 2018 18:19:39 -0700

> in preparation of my 64-bit support series, here's some
> minor cleanup in preparation that gets rid of unneccesary
> accesses to the descriptor application fields.
> 
> I've confirmed that the hardware does not access the fields
> in all our configurations.

Series applied, thank you.

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

end of thread, other threads:[~2018-08-13 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-11  1:19 [PATCH 0/2] net: nixge: Minor cleanups Moritz Fischer
2018-08-11  1:19 ` [PATCH 1/2] net: nixge: Do not zero application specific fields in desc Moritz Fischer
2018-08-11  1:19 ` [PATCH 2/2] net: nixge: Don't store skb in app4 field of descriptor Moritz Fischer
2018-08-13 15:49 ` [PATCH 0/2] net: nixge: Minor cleanups David Miller

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