mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[NETPOLL]: Minor coding-style cleanups.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ba4e58eca8
commit
c68b907028
1 changed files with 48 additions and 51 deletions
|
@ -144,7 +144,6 @@ static void service_arp_queue(struct netpoll_info *npi)
|
||||||
arp_reply(skb);
|
arp_reply(skb);
|
||||||
skb = skb_dequeue(&npi->arp_tx);
|
skb = skb_dequeue(&npi->arp_tx);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void netpoll_poll(struct netpoll *np)
|
void netpoll_poll(struct netpoll *np)
|
||||||
|
@ -243,10 +242,9 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't get messages out of order, and no recursion */
|
/* don't get messages out of order, and no recursion */
|
||||||
if ( skb_queue_len(&npinfo->txq) == 0
|
if (skb_queue_len(&npinfo->txq) == 0 &&
|
||||||
&& npinfo->poll_owner != smp_processor_id()
|
npinfo->poll_owner != smp_processor_id() &&
|
||||||
&& netif_tx_trylock(dev)) {
|
netif_tx_trylock(dev)) {
|
||||||
|
|
||||||
/* try until next clock tick */
|
/* try until next clock tick */
|
||||||
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; tries > 0; --tries) {
|
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; tries > 0; --tries) {
|
||||||
if (!netif_queue_stopped(dev))
|
if (!netif_queue_stopped(dev))
|
||||||
|
@ -423,7 +421,6 @@ int __netpoll_rx(struct sk_buff *skb)
|
||||||
struct netpoll_info *npi = skb->dev->npinfo;
|
struct netpoll_info *npi = skb->dev->npinfo;
|
||||||
struct netpoll *np = npi->rx_np;
|
struct netpoll *np = npi->rx_np;
|
||||||
|
|
||||||
|
|
||||||
if (!np)
|
if (!np)
|
||||||
goto out;
|
goto out;
|
||||||
if (skb->dev->type != ARPHRD_ETHER)
|
if (skb->dev->type != ARPHRD_ETHER)
|
||||||
|
@ -551,8 +548,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
|
||||||
printk(KERN_INFO "%s: remote IP %d.%d.%d.%d\n",
|
printk(KERN_INFO "%s: remote IP %d.%d.%d.%d\n",
|
||||||
np->name, HIPQUAD(np->remote_ip));
|
np->name, HIPQUAD(np->remote_ip));
|
||||||
|
|
||||||
if( *cur != 0 )
|
if (*cur != 0) {
|
||||||
{
|
|
||||||
/* MAC address */
|
/* MAC address */
|
||||||
if ((delim = strchr(cur, ':')) == NULL)
|
if ((delim = strchr(cur, ':')) == NULL)
|
||||||
goto parse_failed;
|
goto parse_failed;
|
||||||
|
@ -735,7 +731,8 @@ int netpoll_setup(struct netpoll *np)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init netpoll_init(void) {
|
static int __init netpoll_init(void)
|
||||||
|
{
|
||||||
skb_queue_head_init(&skb_pool);
|
skb_queue_head_init(&skb_pool);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue