Skip to contentSkip to conversation

dma_skb_copy_datagram_iovec not EXPORTed

PATCH In review Sam Hopkins 5 participants 5 messages Jun 5, 2007 – Jun 10, 2007 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,

I'm forwarding along a message sent to kernelnewbies as I was directed to address my question to this list. I am not a member of netdev, so please copy me on all discussion of this topic.

Cheers,

Sam

---

Greetings,

I am a developer of the kernel AoE (ATA over Ethernet) driver. I am attempting to add dma offloading of data receive, following in TCP's footsteps via config option NET_DMA. There is a function in net/core/user_dma.c, dma_skb_copy_datagram_iovec, that appears to be exactly what I need, but this function is not EXPORTed for use by external modules.

Since the NET_DMA option is documented as "Network: TCP receive copy offload" perhaps it's just an oversight that anyone else might benefit from it?

Cheers,

Sam

#2 lore raw
Quoted 21 lines · On Tue, 5 Jun 2007 10:56:58 -0400 Sam Hopkins wrote:

Hello,

I'm forwarding along a message sent to kernelnewbies as I was directed to address my question to this list. I am not a member of netdev, so please copy me on all discussion of this topic.

Cheers,

Sam

---

Greetings,

I am a developer of the kernel AoE (ATA over Ethernet) driver. I am attempting to add dma offloading of data receive, following in TCP's footsteps via config option NET_DMA. There is a function in net/core/user_dma.c, dma_skb_copy_datagram_iovec, that appears to be exactly what I need, but this function is not EXPORTed for use by external modules.

Quoted 3 lines

Since the NET_DMA option is documented as "Network: TCP receive copy offload" perhaps it's just an oversight that anyone else might benefit from it?

Makes sense to me. Maybe someone in the hierarchy will agree, or you may need to just send a patch and see if it is accepted.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#3 lore raw

PATCH 1/1 make network DMA usable for non-tcp drivers

Here is a patch against the netdev-2.6 git tree that makes the net DMA feature usable for drivers like the ATA over Ethernet block driver, which can use dma_skb_copy_datagram_iovec when receiving data from the network.

The change was suggested on kernelnewbies.

http://article.gmane.org/gmane.linux.kernel.kernelnewbies/21663

---
 drivers/dma/Kconfig |    2 +-
 net/core/user_dma.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/dma/Kconfig +1 -1
index 72be6c6..270d23e 100644
@@ -14,7 +14,7 @@ config DMA_ENGINE
 comment "DMA Clients"
 
 config NET_DMA
-	bool "Network: TCP receive copy offload"
+	bool "Network: receive copy offload"
 	depends on DMA_ENGINE && NET
 	default y
 	---help---
net/core/user_dma.c +2 -0
index 0ad1cd5..69d0b15 100644
@@ -130,3 +130,5 @@ end:
 fault:
 	return -EFAULT;
 }
+
+EXPORT_SYMBOL(dma_skb_copy_datagram_iovec);
Signature · 1 line
1.5.2.1
#4 lore raw

Re: [PATCH 1/1] make network DMA usable for non-tcp drivers

Quoted 33 lines · On Fri, 8 Jun 2007 10:30:53 -0400 "Ed L. Cashin" <[email protected]> wrote:

Here is a patch against the netdev-2.6 git tree that makes the net DMA feature usable for drivers like the ATA over Ethernet block driver, which can use dma_skb_copy_datagram_iovec when receiving data from the network.

The change was suggested on kernelnewbies.

http://article.gmane.org/gmane.linux.kernel.kernelnewbies/21663

---
 drivers/dma/Kconfig |    2 +-
 net/core/user_dma.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/dma/Kconfig +1 -1
index 72be6c6..270d23e 100644
@@ -14,7 +14,7 @@ config DMA_ENGINE
 comment "DMA Clients"
 
 config NET_DMA
-	bool "Network: TCP receive copy offload"
+	bool "Network: receive copy offload"
 	depends on DMA_ENGINE && NET
 	default y
 	---help---
net/core/user_dma.c +0 -0
index 0ad1cd5..69d0b15 100644

net/core/user_dma.c end: · line 134

Quoted 5 lines
net/core/user_dma.c +2 -0
@@ -130,3 +130,5 @@ end:
 fault:
 	return -EFAULT;
 }
+
+EXPORT_SYMBOL(dma_skb_copy_datagram_iovec);

We wouldn't want to merge this until code which actually uses the export is also merged.

#5 lore raw

Re: [PATCH 1/1] make network DMA usable for non-tcp drivers

Quoted 10 lines

net/core/user_dma.c end: · line 134

Quoted 6 lines
net/core/user_dma.c +2 -0
@@ -130,3 +130,5 @@ end:
 fault:
      return -EFAULT;
 }
+
+EXPORT_SYMBOL(dma_skb_copy_datagram_iovec);

We wouldn't want to merge this until code which actually uses the export is also merged.

...and I recommend EXPORT_SYMBOL_GPL following the lead of the other async dma options in -mm.