virtio_net.c (3e7fb80b604b5bc7116fe374f604eb7c85f00b43) | virtio_net.c (d1dc06dcd0f8fc559e449322d2fa4d769c289e00) |
---|---|
1/* A network driver using virtio. 2 * 3 * Copyright 2007 Rusty Russell <rusty@rustcorp.com.au> IBM Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 468 unchanged lines hidden (view full) --- 477 u64_stats_update_begin(&stats->rx_syncp); 478 stats->rx_bytes += skb->len; 479 stats->rx_packets++; 480 u64_stats_update_end(&stats->rx_syncp); 481 482 if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) 483 skb->ip_summed = CHECKSUM_UNNECESSARY; 484 | 1/* A network driver using virtio. 2 * 3 * Copyright 2007 Rusty Russell <rusty@rustcorp.com.au> IBM Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 468 unchanged lines hidden (view full) --- 477 u64_stats_update_begin(&stats->rx_syncp); 478 stats->rx_bytes += skb->len; 479 stats->rx_packets++; 480 u64_stats_update_end(&stats->rx_syncp); 481 482 if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) 483 skb->ip_summed = CHECKSUM_UNNECESSARY; 484 |
485 skb->protocol = eth_type_trans(skb, dev); 486 pr_debug("Receiving skb proto 0x%04x len %i type %i\n", 487 ntohs(skb->protocol), skb->len, skb->pkt_type); 488 | |
489 if (virtio_net_hdr_to_skb(skb, &hdr->hdr, 490 virtio_is_little_endian(vi->vdev))) { 491 net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n", 492 dev->name, hdr->hdr.gso_type, 493 hdr->hdr.gso_size); 494 goto frame_err; 495 } 496 | 485 if (virtio_net_hdr_to_skb(skb, &hdr->hdr, 486 virtio_is_little_endian(vi->vdev))) { 487 net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n", 488 dev->name, hdr->hdr.gso_type, 489 hdr->hdr.gso_size); 490 goto frame_err; 491 } 492 |
493 skb->protocol = eth_type_trans(skb, dev); 494 pr_debug("Receiving skb proto 0x%04x len %i type %i\n", 495 ntohs(skb->protocol), skb->len, skb->pkt_type); 496 |
|
497 napi_gro_receive(&rq->napi, skb); 498 return; 499 500frame_err: 501 dev->stats.rx_frame_errors++; 502 dev_kfree_skb(skb); 503} 504 --- 1539 unchanged lines hidden --- | 497 napi_gro_receive(&rq->napi, skb); 498 return; 499 500frame_err: 501 dev->stats.rx_frame_errors++; 502 dev_kfree_skb(skb); 503} 504 --- 1539 unchanged lines hidden --- |