Skip to content

Commit c81c2d9

Browse files
Alexander Duyckdavem330
authored andcommitted
skbuff: remove skb_dma_map/unmap
The two functions skb_dma_map/unmap are unsafe to use as they cause problems when packets are cloned and sent to multiple devices while a HW IOMMU is enabled. Due to this it is best to remove the code so it is not used by any other network driver maintainters. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f4188d8 commit c81c2d9

3 files changed

Lines changed: 0 additions & 74 deletions

File tree

‎include/linux/skbuff.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,6 @@ struct sk_buff {
416416

417417
#include <asm/system.h>
418418

419-
#ifdef CONFIG_HAS_DMA
420-
#include <linux/dma-mapping.h>
421-
extern int skb_dma_map(struct device *dev, struct sk_buff *skb,
422-
enum dma_data_direction dir);
423-
extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb,
424-
enum dma_data_direction dir);
425-
#endif
426-
427419
static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
428420
{
429421
return (struct dst_entry *)skb->_skb_dst;

‎net/core/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ obj-y := sock.o request_sock.o skbuff.o iovec.o datagram.o stream.o scm.o \
66
gen_stats.o gen_estimator.o net_namespace.o
77

88
obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
9-
obj-$(CONFIG_HAS_DMA) += skb_dma_map.o
109

1110
obj-y += dev.o ethtool.o dev_mcast.o dst.o netevent.o \
1211
neighbour.o rtnetlink.o utils.o link_watch.o filter.o

‎net/core/skb_dma_map.c‎

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)