netpoll: Trivial updates
Subsystems (2)
cover netpoll: Trivial updates
Joe Perches (2):
netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
netpoll: Remove trivial wrapper function netpoll_poll
include/linux/netpoll.h | 2 -- net/core/netpoll.c | 13 +++---------- 2 files changed, 3 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.6.rc1
PATCH 1/2 netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
Unused symbols waste space.
Commit 0e34e93177fb
"(netpoll: add generic support for bridge and bonding devices)" added the symbol more than a year ago with the promise of "future use".
Because it is so far unused, remove it for now.
It can be easily readded if or when it actually needs to be used.
--- include/linux/netpoll.h | 2 -- net/core/netpoll.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-)
include/linux/netpoll.h +0 -2
@@ -40,8 +40,6 @@ struct netpoll_info {struct netpoll *netpoll; }; -void netpoll_poll_dev (struct net_device *dev); -void netpoll_poll (struct netpoll *np);void netpoll_send_udp (struct netpoll *np,const char *msg,int len);void netpoll_print_options (struct netpoll *np);int netpoll_parse_options (struct netpoll *np,char *opt);
net/core/netpoll.c +2 -4
@@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi) } } -void netpoll_poll_dev (struct net_device *dev) +static void netpoll_poll_dev (struct net_device *dev) {const struct net_device_ops *ops;
@@ -208,13 +208,11 @@ void netpoll_poll_dev(struct net_device *dev)zap_completion_queue (); } -EXPORT_SYMBOL (netpoll_poll_dev); -void netpoll_poll (struct netpoll *np) +static void netpoll_poll (struct netpoll *np) {netpoll_poll_dev (np->dev); } -EXPORT_SYMBOL (netpoll_poll);static void refill_skbs (void ) {
Signature · 1 line
1.7.6.rc1
Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
From: Joe Perches <[email protected]>
Date: Thu, 30 Jun 2011 18:08:57 -0700
Quoted 11 lines
Unused symbols waste space.
Commit
0e34e93177fb
"(netpoll: add generic support for bridge and bonding devices)" added the symbol more than a year ago with the promise of "future use".Because it is so far unused, remove it for now.
It can be easily readded if or when it actually needs to be used.cc WANG Cong <[email protected]>Signed-off-by Joe Perches <[email protected]>
Applied.
Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
In reply to Joe PerchesQuoted 34 lines · Joe Perches
Unused symbols waste space.
Commit
0e34e93177fb
"(netpoll: add generic support for bridge and bonding devices)" added the symbol more than a year ago with the promise of "future use".Because it is so far unused, remove it for now.
It can be easily readded if or when it actually needs to be used.cc WANG Cong <[email protected]>Signed-off-by Joe Perches <[email protected]>--- include/linux/netpoll.h | 2 -- net/core/netpoll.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-)include/linux/netpoll.h +0
-2@@ -40,8 +40,6 @@ struct netpoll_info {struct netpoll *netpoll; }; -void netpoll_poll_dev (struct net_device *dev); -void netpoll_poll (struct netpoll *np);void netpoll_send_udp (struct netpoll *np,const char *msg,int len);void netpoll_print_options (struct netpoll *np);int netpoll_parse_options (struct netpoll *np,char *opt);net/core/netpoll.c +0
-0
net/core/netpoll.c static void service_arp_queue(struct netpoll_info *npi) · line 180
Quoted 5 lines
net/core/netpoll.c +1
-1@@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi) } } -void netpoll_poll_dev (struct net_device *dev) +static void netpoll_poll_dev (struct net_device *dev)
Hi Joe,
You have removed the function declaration in include/linux/netpoll.h. And you changed the function like
static void netpoll_poll_dev(...)
{
...
}But i don't know its usage.
The 'static' before this function just says the active area of 'netpoll_poll_dev' is in the file net/core/netpoll.c. What is the purpose? Could you please tell me?
Thanks in advance.
Quoted 20 lines
net/core/netpoll.c +1
-3{const struct net_device_ops *ops;@@ -208,13 +208,11 @@ void netpoll_poll_dev(struct net_device *dev)zap_completion_queue (); } -EXPORT_SYMBOL (netpoll_poll_dev); -void netpoll_poll (struct netpoll *np) +static void netpoll_poll (struct netpoll *np) {netpoll_poll_dev (np->dev); } -EXPORT_SYMBOL (netpoll_poll);static void refill_skbs (void ) {Signature · 1 line
1.7.6.rc1
Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
Quoted 14 lines · Harry Wei
include/linux/netpoll.h
Quoted 13 lines · Joe Perches
Unused symbols waste space.
Commit0e34e93177fb
"(netpoll: add generic support for bridge and bonding devices)" added the symbol more than a year ago with the promise of "future use". Because it is so far unused, remove it for now.
It can be easily readded if or when it actually needs to be used.cc WANG Cong <[email protected]>Signed-off-by Joe Perches <[email protected]>--- include/linux/netpoll.h | 2 -- net/core/netpoll.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-)include/linux/netpoll.h +0
-0
[]
Quoted 17 lines
Quoted 17 lines
include/linux/netpoll.h +0
-2@@ -40,8 +40,6 @@ struct netpoll_info {struct netpoll *netpoll; }; -void netpoll_poll_dev (struct net_device *dev); -void netpoll_poll (struct netpoll *np);void netpoll_send_udp (struct netpoll *np,const char *msg,int len);void netpoll_print_options (struct netpoll *np);int netpoll_parse_options (struct netpoll *np,char *opt);net/core/netpoll.c +0
-0@@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi) } }
Quoted 3 lines
net/core/netpoll.c static void service_arp_queue(struct netpoll_info *npi) · line 180
Quoted 2 lines
net/core/netpoll.c +1
-1-void netpoll_poll_dev (struct net_device *dev) +static void netpoll_poll_dev (struct net_device *dev)You have removed the function declaration in
include/linux/netpoll.h.
Because it's unused by anything in the tree
but netpoll.c
Quoted 6 lines
And you changed the function like
static voidnetpoll_poll_dev(...){ ... }But i don't know its usage.
It's now a local function to netpoll.c
Quoted 2 lines
The 'static' before this function just says the active area of '
netpoll_poll_dev' is in the filenet/core/netpoll.c. What is the purpose? Could you please tell me?
It prods the device to perform network work.
/* Process pending work on NIC */ ops->ndo_poll_controller(dev); poll_napi(dev);
Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
On Mon, Jul 04, 2011 at 12:46:29AM -0700, Joe Perches wrote:
[...]
Quoted 4 lines
Quoted 1 line
You have removed the function declaration in
include/linux/netpoll.h.Because it's unused by anything in the tree
butnetpoll.c
Hmmmm..., so sorry. I misunderstood your 'unused', which i thought there was also no use in netpoll.c :-/
Quoted 9 lines
Quoted 7 lines
And you changed the function like
static voidnetpoll_poll_dev(...){ ... }But i don't know its usage.
It's now a local function to
netpoll.c
Yeah, it's true.
Quoted 10 lines
Quoted 3 lines
The 'static' before this function just says the active area of '
netpoll_poll_dev' is in the filenet/core/netpoll.c. What is the purpose? Could you please tell me?It prods the device to perform network work.
/* Process pending work on NIC */ ops->ndo_poll_controller(dev); poll_napi(dev);
Yeah, i will read the codes.
Thanks so much
Harry Wei
PATCH 2/2 netpoll: Remove wrapper function netpoll_poll
In reply to Joe PerchesToo trivial to live.
--- net/core/netpoll.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)
net/core/netpoll.c +2 -7
@@ -209,11 +209,6 @@ static void netpoll_poll_dev(struct net_device *dev)zap_completion_queue (); } -static void netpoll_poll (struct netpoll *np) -{ -netpoll_poll_dev (np->dev); -} -static void refill_skbs (void ) {struct sk_buff *skb;
@@ -273,7 +268,7 @@ repeat:if (!skb) {if (++count <10 ) { -netpoll_poll (np); +netpoll_poll_dev (np->dev); goto repeat; }return NULL ;
@@ -334,7 +329,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, }/* tickle device maybe there is some cleanup */ -netpoll_poll (np); +netpoll_poll_dev (np->dev);udelay (USEC_PER_POLL ); }
Signature · 1 line
1.7.6.rc1
Re: [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll
From: Joe Perches <[email protected]>
Date: Thu, 30 Jun 2011 18:08:58 -0700
Quoted 4 lines
Too trivial to live.
cc WANG Cong <[email protected]>Signed-off-by Joe Perches <[email protected]>
Applied.
Quoted 10 lines · Joe Perches
cc WANG Cong<[email protected]>Joe Perches (2):
netpoll: Remove unusedEXPORT_SYMBOLsofnetpoll_pollandnetpoll_poll_dev
netpoll: Remove trivial wrapper functionnetpoll_pollinclude/linux/netpoll.h | 2 -- net/core/netpoll.c | 13 +++---------- 2 files changed, 3 insertions(+), 12 deletions(-)
I am fine with patch 1/2, but not 2/2, since it is trivial, why touch it? With netpoll_poll(), we don't need to explore the details of struct netpoll, I think it is nice to have it.
BTW, you can kill the export of netpoll_send_skb_on_dev() too.
Thanks.
Quoted 11 lines · Cong Wang
Quoted 7 lines · Joe Perches
cc: WANG Cong<[email protected]>
Joe Perches (2):
netpoll: Remove unusedEXPORT_SYMBOLsofnetpoll_pollandnetpoll_poll_dev
netpoll: Remove trivial wrapper functionnetpoll_pollinclude/linux/netpoll.h | 2 -- net/core/netpoll.c | 13 +++---------- 2 files changed, 3 insertions(+), 12 deletions(-)I am fine with patch 1/2, but not 2/2, since it is trivial, why touch it? With
netpoll_poll(), we don't need to explore the details of struct netpoll, I think it is nice to have it.
Shrug. Neither is used. Keep things minimal.
Quoted 1 line
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.
Not too sure about that.
It's used in netpoll.h by netpoll_send_skb.
It could be called from anywhere.
It's currently called/used by bonding.h.
cheers, Joe
Quoted 8 lines · Joe Perches
Quoted 2 lines
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.Not too sure about that.
It's used in
netpoll.hbynetpoll_send_skb.
It could be called from anywhere.
It's currently called/used bybonding.h.
% git grep netpoll_send_skb_on_dev .
include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,include/linux/netpoll.h: netpoll_send_skb_on_dev(np, skb, np->dev);
net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
No modules use it...
Quoted 6 lines · Cong Wang
Quoted 5 lines · Joe Perches
Quoted 1 line
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.Not too sure about that.
It's used innetpoll.hbynetpoll_send_skb. It could be called from anywhere. It's currently called/used bybonding.h.
Quoted 6 lines
% git grep
netpoll_send_skb_on_dev.
include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, structsk_buff*skb,include/linux/netpoll.h:netpoll_send_skb_on_dev(np, skb, np->dev);
net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, structsk_buff*skb, net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
No modules use it...
Read what I wrote.
Look up one level at where it's used by netpoll.h.
Quoted 14 lines · Joe Perches
Quoted 6 lines · Cong Wang
Quoted 5 lines · Joe Perches
Quoted 1 line
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.Not too sure about that.
It's used innetpoll.hbynetpoll_send_skb. It could be called from anywhere. It's currently called/used bybonding.h.Quoted 6 lines
% git grep
netpoll_send_skb_on_dev.
include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, structsk_buff*skb,include/linux/netpoll.h:netpoll_send_skb_on_dev(np, skb, np->dev);
net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, structsk_buff*skb, net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
No modules use it...
Quoted 4 lines
Read what I wrote.
Look up one level at where it's used by
netpoll.h.
Then move netpoll_send_skb(), export it instead of netpoll_send_skb_on_dev()...
Quoted 11 lines · Cong Wang
Quoted 9 lines · Joe Perches
Quoted 6 lines · Cong Wang
Quoted 5 lines · Joe Perches
Quoted 1 line
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.Not too sure about that.
It's used innetpoll.hbynetpoll_send_skb. It could be called from anywhere. It's currently called/used bybonding.h.Read what I wrote.
Look up one level at where it's used bynetpoll.h.Then move
netpoll_send_skb(), export it instead ofnetpoll_send_skb_on_dev()...
Submit that if you choose.
Quoted 9 lines · Joe Perches
Quoted 8 lines · Cong Wang
Quoted 7 lines · Joe Perches
Quoted 6 lines · Cong Wang
Quoted 5 lines · Joe Perches
Quoted 1 line
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.Not too sure about that.
It's used innetpoll.hbynetpoll_send_skb. It could be called from anywhere. It's currently called/used bybonding.h.
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Read what I wrote.
Look up one level at where it's used bynetpoll.h.Then move
netpoll_send_skb(), export it instead ofnetpoll_send_skb_on_dev()...Submit that if you choose.
Well, you are on it, I am fine to leave as it is, as you agree these changes are all trivial. :)
David Miller
maintainerFrom: Cong Wang <[email protected]>
Date: Fri, 01 Jul 2011 11:49:23 +0800
Quoted 18 lines
Quoted 8 lines · Joe Perches
Quoted 2 lines
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.Not too sure about that.
It's used in
netpoll.hbynetpoll_send_skb.
It could be called from anywhere.
It's currently called/used bybonding.h.% git grep
netpoll_send_skb_on_dev. include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, structsk_buff*skb,include/linux/netpoll.h:netpoll_send_skb_on_dev(np, skb, np->dev); net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, structsk_buff*skb, net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
Quoted 1 line
No modules use it...
Right, this is a relic that bonding was using at one point in the past but it no longer does.
Quoted 7 lines · David Miller
From: Cong Wang <[email protected]>
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
BTW, you can kill the export of
netpoll_send_skb_on_dev()too.Not too sure about that.
It's used innetpoll.hbynetpoll_send_skb. It could be called from anywhere. It's currently called/used bybonding.h.% git grep
netpoll_send_skb_on_dev.
[]
Quoted 3 lines
Quoted 1 line
No modules use it...
Right, this is a relic that bonding was using at one point in the past but it no longer does.
Are you sure?
netpoll.h:
void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
struct net_device *dev);
static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
{
netpoll_send_skb_on_dev(np, skb, np->dev);
}$ grep -rP --include=*.[ch] -w netpoll_send_skb * drivers/net/bonding/bonding.h: netpoll_send_skb(np, skb); include/linux/netpoll.h:static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) net/bridge/br_private.h: netpoll_send_skb(np, skb); net/core/netpoll.c: "netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n", net/core/netpoll.c: netpoll_send_skb(np, skb); net/core/netpoll.c: netpoll_send_skb(np, send_skb);
from bonding.h
#ifdef CONFIG_NET_POLL_CONTROLLER
static inline void bond_netpoll_send_skb(const struct slave *slave,
struct sk_buff *skb)
{
struct netpoll *np = slave->np;
if (np)
netpoll_send_skb(np, skb);
}and br_private.h
static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
struct sk_buff *skb)
{
struct netpoll *np = p->np;
if (np)
netpoll_send_skb(np, skb);
}These are inlined and dependent on CONFIG_NET_POLL_CONTROLLER in drivers/net/Kconfig so doesn't netpoll_send_skb_on_dev need to be SYMBOL_EXPORTed?
cheers, Joe
David Miller
maintainerFrom: Joe Perches <[email protected]>
Date: Fri, 01 Jul 2011 15:18:23 -0700
Quoted 3 lines
These are inlined and dependent on
CONFIG_NET_POLL_CONTROLLERindrivers/net/Kconfigso doesn'tnetpoll_send_skb_on_devneed to beSYMBOL_EXPORTed?
Right I noticed this when I read the rest of the thread where this was discussed.