Skip to contentSkip to conversation

net: num_dma_maps is not used

PATCH Applied Eric Dumazet 2 participants 3 messages Jun 5, 2009 – Jun 8, 2009

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

PATCH 1/2 net: num_dma_maps is not used

Get rid of num_dma_maps in struct skb_shared_info, as it seems unused.

---
 include/linux/skbuff.h |    3 ---
 net/core/skb_dma_map.c |    1 -
 2 files changed, 4 deletions(-)
include/linux/skbuff.h +0 -3
index 7305da9..7485058 100644
@@ -194,9 +194,6 @@ struct skb_shared_info {
 	unsigned short  gso_type;
 	__be32          ip6_frag_id;
 	union skb_shared_tx tx_flags;
-#ifdef CONFIG_HAS_DMA
-	unsigned int	num_dma_maps;
-#endif
 	struct sk_buff	*frag_list;
 	struct skb_shared_hwtstamps hwtstamps;
 	skb_frag_t	frags[MAX_SKB_FRAGS];
net/core/skb_dma_map.c +0 -1
index 8623492..7adb623 100644
@@ -30,7 +30,6 @@ int skb_dma_map(struct device *dev, struct sk_buff *skb,
 			goto unwind;
 		sp->dma_maps[i + 1] = map;
 	}
-	sp->num_dma_maps = i + 1;
 
 	return 0;
 
maintainer
#1 lore raw

From: Eric Dumazet <[email protected]>
Date: Fri, 05 Jun 2009 16:03:35 +0200

Quoted 3 lines

Get rid of num_dma_maps in struct skb_shared_info, as it seems unused.

It's going to be used when architectures implement optimized versions of skb_dma_map(), which can thus virtually map page vectors via IOMMU's and thus the resulting number of DMA address/length pairs will be smaller than (num_frags + 1)

Similarly to how dma_map_sg() works.

maintainer
#2 lore raw

From: David Miller <[email protected]>
Date: Fri, 05 Jun 2009 18:09:49 -0700 (PDT)

Quoted 5 lines

From: Eric Dumazet <[email protected]>
Date: Fri, 05 Jun 2009 16:03:35 +0200

Quoted 2 lines

Get rid of num_dma_maps in struct skb_shared_info, as it seems unused.

Quoted 8 lines
Quoted 1 line

It's going to be used when architectures implement optimized versions of skb_dma_map(), which can thus virtually map page vectors via IOMMU's and thus the resulting number of DMA address/length pairs will be smaller than (num_frags + 1)

Similarly to how dma_map_sg() works.

But we aren't doing that yet and I have no idea when I'll get to it, so I've applied your patch for now, thanks!