Skip to contentSkip to conversation

net: nixge: Minor cleanups

PATCH In review Moritz Fischer 2 participants 4 messages Aug 11, 2018 – Aug 13, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover net: nixge: Minor cleanups

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(-)
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/2 net: nixge: Do not zero application specific fields in desc

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

---
 drivers/net/ethernet/ni/nixge.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/net/ethernet/ni/nixge.c +0 -10
index 9ae4fcef725e..ac31b0d30415 100644
@@ -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;
Signature · 1 line
2.18.0
#2 lore raw

PATCH 2/2 net: nixge: Don't store skb in app4 field of descriptor

In reply to Moritz Fischer

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

---
 drivers/net/ethernet/ni/nixge.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/ni/nixge.c +0 -1
index ac31b0d30415..76efed058f33 100644
@@ -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 */
Signature · 1 line
2.18.0
maintainer
#3 lore raw
In reply to Moritz Fischer

From: Moritz Fischer <[email protected]>
Date: Fri, 10 Aug 2018 18:19:39 -0700

Quoted 6 lines

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.