git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
64 bit kernel
[linux-2.6.git]
/
drivers
/
net
/
loopback.c
diff --git
a/drivers/net/loopback.c
b/drivers/net/loopback.c
index
997cbce
..
690a1aa
100644
(file)
--- a/
drivers/net/loopback.c
+++ b/
drivers/net/loopback.c
@@
-74,7
+74,7
@@
static void emulate_large_send_offload(struct sk_buff *skb)
struct iphdr *iph = skb->nh.iph;
struct tcphdr *th = (struct tcphdr*)(skb->nh.raw + (iph->ihl * 4));
unsigned int doffset = (iph->ihl + th->doff) * 4;
struct iphdr *iph = skb->nh.iph;
struct tcphdr *th = (struct tcphdr*)(skb->nh.raw + (iph->ihl * 4));
unsigned int doffset = (iph->ihl + th->doff) * 4;
- unsigned int mtu = skb_shinfo(skb)->
g
so_size + doffset;
+ unsigned int mtu = skb_shinfo(skb)->
t
so_size + doffset;
unsigned int offset = 0;
u32 seq = ntohl(th->seq);
u16 id = ntohs(iph->id);
unsigned int offset = 0;
u32 seq = ntohl(th->seq);
u16 id = ntohs(iph->id);
@@
-139,7
+139,7
@@
static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
#endif
#ifdef LOOPBACK_TSO
#endif
#ifdef LOOPBACK_TSO
- if (skb_
is_gso(skb)
) {
+ if (skb_
shinfo(skb)->tso_size
) {
BUG_ON(skb->protocol != htons(ETH_P_IP));
BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP);
BUG_ON(skb->protocol != htons(ETH_P_IP));
BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP);
@@
-172,9
+172,11
@@
static struct net_device_stats *get_stats(struct net_device *dev)
memset(stats, 0, sizeof(struct net_device_stats));
memset(stats, 0, sizeof(struct net_device_stats));
- for
_each_possible_cpu(i
) {
+ for
(i=0; i < NR_CPUS; i++
) {
struct net_device_stats *lb_stats;
struct net_device_stats *lb_stats;
+ if (!cpu_possible(i))
+ continue;
lb_stats = &per_cpu(loopback_stats, i);
stats->rx_bytes += lb_stats->rx_bytes;
stats->tx_bytes += lb_stats->tx_bytes;
lb_stats = &per_cpu(loopback_stats, i);
stats->rx_bytes += lb_stats->rx_bytes;
stats->tx_bytes += lb_stats->tx_bytes;