Skip to contentSkip to conversation

unexport softnet_data

PATCH In review Adrian Bunk 3 participants 5 messages Oct 24, 2007 – Nov 7, 2007

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

PATCH 1/1 unexport softnet_data

The EXPORT_PER_CPU_SYMBOL(softnet_data) is no longer used.

---
6bf19ad197b0076e48be8720659d38413d438e26

net/core/dev.c +0 -1
index 38b03da..113d216 100644
@@ -4469,4 +4469,3 @@ EXPORT_SYMBOL(br_fdb_put_hook);
 EXPORT_SYMBOL(dev_load);
 #endif
 
-EXPORT_PER_CPU_SYMBOL(softnet_data);
maintainer
#1 lore raw

From: Adrian Bunk <[email protected]>
Date: Wed, 24 Oct 2007 18:24:25 +0200

Quoted 3 lines

The EXPORT_PER_CPU_SYMBOL(softnet_data) is no longer used.

I wanted to apply this, but in validing the patch I noticed what appears to be an omission in TCP ipv6.

It seems that NET_DMA support there is only half-cooked and the following patch is needed (and thus there is a modular use of softnet_data again).

Looking at Christopher Leech's original TCP I/O AT commit:

1a2449a87bb7606113b1aa1a9d3c3e78ef189a1c

this appears to just be an oversight.

If one of the current I/O AT folks can look this over and confirm I'd appreciate it.

Thanks!

[TCP]: Add missing I/O AT code to ipv6 side.

net/ipv6/tcp_ipv6.c +2 -0
index 32dc329..06fa4ba 100644
@@ -1732,6 +1732,8 @@ process:
 	if (!sock_owned_by_user(sk)) {
 #ifdef CONFIG_NET_DMA
 		struct tcp_sock *tp = tcp_sk(sk);
+		if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
+			tp->ucopy.dma_chan = get_softnet_dma();
 		if (tp->ucopy.dma_chan)
 			ret = tcp_v6_do_rcv(sk, skb);
 		else
#2 lore raw
Quoted 38 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]

From: Adrian Bunk <[email protected]>
Date: Wed, 24 Oct 2007 18:24:25 +0200

Quoted 3 lines

The EXPORT_PER_CPU_SYMBOL(softnet_data) is no longer used.

I wanted to apply this, but in validing the patch I noticed what appears to be an omission in TCP ipv6.

It seems that NET_DMA support there is only half-cooked and the following patch is needed (and thus there is a modular use of softnet_data again).

Looking at Christopher Leech's original TCP I/O AT commit:

1a2449a87bb7606113b1aa1a9d3c3e78ef189a1c

this appears to just be an oversight.

If one of the current I/O AT folks can look this over and confirm I'd appreciate it.

Thanks!

[TCP]: Add missing I/O AT code to ipv6 side.

net/ipv6/tcp_ipv6.c +0 -0
index 32dc329..06fa4ba 100644

net/ipv6/tcp_ipv6.c process: · line 1739

Quoted 8 lines
net/ipv6/tcp_ipv6.c +2 -0
@@ -1732,6 +1732,8 @@ process:
 	if (!sock_owned_by_user(sk)) {
 #ifdef CONFIG_NET_DMA
 		struct tcp_sock *tp = tcp_sk(sk);
+		if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
+			tp->ucopy.dma_chan = get_softnet_dma();
 		if (tp->ucopy.dma_chan)
 			ret = tcp_v6_do_rcv(sk, skb);
 		else

There is no creation of a pinned_list yet in this path, so I don't think this would do us much good. Anyway, I believe the next bit is simply checking to see if we can process it right away (if we have a dma channel or a reader task is waiting) otherwise stick it into backlog. Once we go to process it, if it is an IP packet we'll drop into the ipv4 processing code and end up in tcp_recv() which can create the pinned_list and process from there.

I'm sure someone will correct me if I'm wrong, but I believe this bit it not needed. I suggest a NAK for this patch.

sln

maintainer
#3 lore raw

From: "Nelson, Shannon" <[email protected]>
Date: Fri, 26 Oct 2007 08:38:55 -0700

Quoted 2 lines

There is no creation of a pinned_list yet in this path, so I don't think this would do us much good.

The pinned list is created in the generic net/ipv4/tcp.c code, not in the address family specific code.

So your comments do not apply as a reason for this patch to not go in. My patch has been in Linus's tree for weeks, and until you show me a real reason why the check shouldn't be there in the ipv6 path, it's staying.

#4 lore raw
Quoted 10 lines

From: David Miller [mailto:[email protected]]
Sent: Tuesday, November 06, 2007 11:41 PM

From: "Nelson, Shannon" <[email protected]>
Date: Fri, 26 Oct 2007 08:38:55 -0700

Quoted 1 line

There is no creation of a pinned_list yet in this path, so I

don't think

Quoted 1 line

this would do us much good.

Quoted 7 lines

The pinned list is created in the generic net/ipv4/tcp.c code, not in the address family specific code.

So your comments do not apply as a reason for this patch to not go in. My patch has been in Linus's tree for weeks, and until you show me a real reason why the check shouldn't be there in the ipv6 path, it's staying.

Understood.

Thanks,
sln