loopback.c (5175c3786c244f8b689854db24c9e79b1c6a084f) loopback.c (58f539740b1ccfc5ef4e509ec2efe82621b546e3)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Pseudo-driver for the loopback interface.
7 *
8 * Version: @(#)loopback.c 1.0.4b 08/16/93

--- 139 unchanged lines hidden (view full) ---

148 BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP);
149
150 emulate_large_send_offload(skb);
151 return 0;
152 }
153#endif
154 dev->last_rx = jiffies;
155
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Pseudo-driver for the loopback interface.
7 *
8 * Version: @(#)loopback.c 1.0.4b 08/16/93

--- 139 unchanged lines hidden (view full) ---

148 BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP);
149
150 emulate_large_send_offload(skb);
151 return 0;
152 }
153#endif
154 dev->last_rx = jiffies;
155
156 lb_stats = &per_cpu(pcpu_lstats, get_cpu());
156 /* it's OK to use __get_cpu_var() because BHs are off */
157 lb_stats = &__get_cpu_var(pcpu_lstats);
157 lb_stats->bytes += skb->len;
158 lb_stats->packets++;
158 lb_stats->bytes += skb->len;
159 lb_stats->packets++;
159 put_cpu();
160
161 netif_rx(skb);
162
160
161 netif_rx(skb);
162
163 return(0);
163 return 0;
164}
165
166static struct net_device_stats loopback_stats;
167
168static struct net_device_stats *get_stats(struct net_device *dev)
169{
170 struct net_device_stats *stats = &loopback_stats;
171 unsigned long bytes = 0;

--- 66 unchanged lines hidden ---
164}
165
166static struct net_device_stats loopback_stats;
167
168static struct net_device_stats *get_stats(struct net_device *dev)
169{
170 struct net_device_stats *stats = &loopback_stats;
171 unsigned long bytes = 0;

--- 66 unchanged lines hidden ---