Lines Matching defs:skb
241 struct sk_buff *skb;
247 skb = alloc_skb(pkt_size+64+16, GFP_ATOMIC);
248 if (!skb) {
253 skb_reserve(skb, 16);
256 eth = (__u8 *) skb_push(skb, 14);
257 iph = (struct iphdr*)skb_put(skb, sizeof( struct iphdr));
258 udph = (struct udphdr*)skb_put(skb, sizeof( struct udphdr));
284 skb->protocol = __constant_htons(ETH_P_IP);
285 skb->mac.raw = ((u8*)iph) - 14;
286 skb->dev = odev;
287 skb->pkt_type = PACKET_HOST;
290 skb_put(skb, datalen);
298 skb_put(skb, datalen-frags*PAGE_SIZE);
305 skb_shinfo(skb)->frags[i].page = page;
306 skb_shinfo(skb)->frags[i].page_offset = 0;
307 skb_shinfo(skb)->frags[i].size = (datalen < PAGE_SIZE ? datalen : PAGE_SIZE);
308 datalen -= skb_shinfo(skb)->frags[i].size;
309 skb->len += skb_shinfo(skb)->frags[i].size;
310 skb->data_len += skb_shinfo(skb)->frags[i].size;
312 skb_shinfo(skb)->nr_frags = i;
321 rem = skb_shinfo(skb)->frags[i-1].size/2;
325 skb_shinfo(skb)->frags[i-1].size -= rem;
327 skb_shinfo(skb)->frags[i] = skb_shinfo(skb)->frags[i-1];
328 get_page(skb_shinfo(skb)->frags[i].page);
329 skb_shinfo(skb)->frags[i].page = skb_shinfo(skb)->frags[i-1].page;
330 skb_shinfo(skb)->frags[i].page_offset += skb_shinfo(skb)->frags[i-1].size;
331 skb_shinfo(skb)->frags[i].size = rem;
333 skb_shinfo(skb)->nr_frags = i;
337 return skb;
345 struct sk_buff *skb;
354 skb = fill_packet(odev, saddr);
355 if (skb == NULL)
367 atomic_inc(&skb->users);
369 if (odev->hard_start_xmit(skb, odev)) {
370 kfree_skb(skb);
376 kfree_skb(skb);
388 if (atomic_read(&skb->users) != 1) {
392 while (atomic_read(&skb->users) != 1) {
438 pc, skb->len, skb_shinfo(skb)->nr_frags,
445 kfree_skb(skb);