search for: checksum_unnecessary

Displaying 20 results from an estimated 112 matches for "checksum_unnecessary".

2011 Jun 10
1
[PATCH] virtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID
There's no need for the guest to validate the checksum if it have been validated by host nics. So this patch introduces a new flag - VIRTIO_NET_HDR_F_DATA_VALID which is used to bypass the checksum examing in guest. The backend (tap/macvtap) may set this flag when met skbs with CHECKSUM_UNNECESSARY to save cpu utilization. No feature negotiation is needed as old driver just ignore this flag. Iperf shows 12%-30% performance improvement for UDP traffic. For TCP, when gro is on no difference as it produces skb with partial checksum. But when gro is disabled, 20% or even higher improvement coul...
2011 Jun 10
1
[PATCH] virtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID
There's no need for the guest to validate the checksum if it have been validated by host nics. So this patch introduces a new flag - VIRTIO_NET_HDR_F_DATA_VALID which is used to bypass the checksum examing in guest. The backend (tap/macvtap) may set this flag when met skbs with CHECKSUM_UNNECESSARY to save cpu utilization. No feature negotiation is needed as old driver just ignore this flag. Iperf shows 12%-30% performance improvement for UDP traffic. For TCP, when gro is on no difference as it produces skb with partial checksum. But when gro is disabled, 20% or even higher improvement coul...
2017 Jan 17
1
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
..._NET_HDR_F_NEEDS_CSUM if ip_summed was CHECKSUM_PARTIAL, otherwise the flags would be set to 0. After the commits, virtio_net flags would still be set to VIRTIO_NET_HDR_F_NEEDS_CSUM if ip_summed == CHECKSUM_PARTIAL but it now sets the virtio_net flags to VIRTIO_NET_HDR_F_DATA_VALID if ip_summed == CHECKSUM_UNNECESSARY. Otherwise the virtio_net flags are set to 0. skbuff.h says that for transmitting CHECKSUM_NONE and CHECKSUM_UNNECESSARY have the same meaning, yet the above changes treat them different. Version 1.0 of the virtio spec [1] says in Section 5.1.6.2.1 Driver Requirements: Packet Transmission: "...
2017 Jan 17
1
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
..._NET_HDR_F_NEEDS_CSUM if ip_summed was CHECKSUM_PARTIAL, otherwise the flags would be set to 0. After the commits, virtio_net flags would still be set to VIRTIO_NET_HDR_F_NEEDS_CSUM if ip_summed == CHECKSUM_PARTIAL but it now sets the virtio_net flags to VIRTIO_NET_HDR_F_DATA_VALID if ip_summed == CHECKSUM_UNNECESSARY. Otherwise the virtio_net flags are set to 0. skbuff.h says that for transmitting CHECKSUM_NONE and CHECKSUM_UNNECESSARY have the same meaning, yet the above changes treat them different. Version 1.0 of the virtio spec [1] says in Section 5.1.6.2.1 Driver Requirements: Packet Transmission: "...
2017 Jan 17
0
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
...mmed was CHECKSUM_PARTIAL, > otherwise the flags would be set to 0. > > After the commits, virtio_net flags would still be set to > VIRTIO_NET_HDR_F_NEEDS_CSUM if ip_summed == CHECKSUM_PARTIAL but it > now sets the virtio_net flags to VIRTIO_NET_HDR_F_DATA_VALID if > ip_summed == CHECKSUM_UNNECESSARY. Otherwise the virtio_net flags are set to 0. > > skbuff.h says that for transmitting CHECKSUM_NONE and > CHECKSUM_UNNECESSARY have the same meaning, yet the above changes > treat them different. > > Version 1.0 of the virtio spec [1] says in Section 5.1.6.2.1 Driver > Requir...
2006 May 09
4
[PATCH] Fix checksum errors when firewalling in domU
..., size, flags) && @@ -669,7 +672,10 @@ * can infer it from csum_blank so test both flags. */ if (txreq.flags & (NETTXF_data_validated|NETTXF_csum_blank)) { - skb->ip_summed = CHECKSUM_UNNECESSARY; + if (txreq.flags & NETTXF_csum_blank) + skb->ip_summed = CHECKSUM_HW; + else + skb->ip_summed = CHECKSUM_UNNECESSARY; skb->proto_data_valid = 1;...
2017 Jul 03
2
[PATCH net] virtio-net: unbreak cusmed packet for small buffer XDP
...39;re dealing with doesn't calculate the full checksum > > > > > * (as in CHECKSUM_COMPLETE), but it does parse headers and verify > > > > > checksums > > > > > * for specific protocols. For such packets it will set > > > > > CHECKSUM_UNNECESSARY > > > > > * if their checksums are okay. skb->csum is still undefined in this case > > > > > * though. A driver or device must never modify the checksum field in the > > > > > * packet even if checksum is verified. > > > > &...
2017 Jul 03
2
[PATCH net] virtio-net: unbreak cusmed packet for small buffer XDP
...39;re dealing with doesn't calculate the full checksum > > > > > * (as in CHECKSUM_COMPLETE), but it does parse headers and verify > > > > > checksums > > > > > * for specific protocols. For such packets it will set > > > > > CHECKSUM_UNNECESSARY > > > > > * if their checksums are okay. skb->csum is still undefined in this case > > > > > * though. A driver or device must never modify the checksum field in the > > > > > * packet even if checksum is verified. > > > > &...
2016 Jun 08
7
[PATCH 0/6] virtio_net: use common code for virtio_net_hdr and skb GSO conversion
Hi, This patches introduce virtio_net_hdr_{from,to}_skb functions for conversion of GSO information between skb and virtio_net_hdr. Mike Rapoport (6): virtio_net: add _UAPI prefix to virtio_net header guards virtio_net: introduce virtio_net_hdr_{from,to}_skb macvtap: use common code for virtio_net_hdr and skb GSO conversion tuntap: use common code for virtio_net_hdr and skb GSO
2016 Jun 08
7
[PATCH 0/6] virtio_net: use common code for virtio_net_hdr and skb GSO conversion
Hi, This patches introduce virtio_net_hdr_{from,to}_skb functions for conversion of GSO information between skb and virtio_net_hdr. Mike Rapoport (6): virtio_net: add _UAPI prefix to virtio_net header guards virtio_net: introduce virtio_net_hdr_{from,to}_skb macvtap: use common code for virtio_net_hdr and skb GSO conversion tuntap: use common code for virtio_net_hdr and skb GSO
2017 Jul 04
0
[PATCH net] virtio-net: unbreak cusmed packet for small buffer XDP
...;re dealing with doesn't calculate the full checksum >>>>>> * (as in CHECKSUM_COMPLETE), but it does parse headers and verify >>>>>> checksums >>>>>> * for specific protocols. For such packets it will set >>>>>> CHECKSUM_UNNECESSARY >>>>>> * if their checksums are okay. skb->csum is still undefined in this case >>>>>> * though. A driver or device must never modify the checksum field in the >>>>>> * packet even if checksum is verified. >>>>&g...
2005 Nov 30
1
State of Xen and bonding
Hello, I''m trying to setup Xen on a machine with 2 physical network devices using linux bonding without success. I haven''t received any answer on my question on xen-users, the only discussion on this seems to be at http://lists.xensource.com/archives/html/xen-devel/2005-10/msg01174.html Could someone shed some light on state/ plans regarding Xen and bonding? Regards --
2017 Jan 20
4
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
.../* no info leak */ @@ -91,6 +92,9 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, skb_checksum_start_offset(skb)); hdr->csum_offset = __cpu_to_virtio16(little_endian, skb->csum_offset); + } else if (has_data_valid && + skb->ip_summed == CHECKSUM_UNNECESSARY) { + hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID; } /* else everything is zero */ return 0; diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index b9e1a13..3d555c7 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1976,7 +1976,7 @@ static int packet_rcv_vnet(st...
2017 Jan 20
4
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
.../* no info leak */ @@ -91,6 +92,9 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, skb_checksum_start_offset(skb)); hdr->csum_offset = __cpu_to_virtio16(little_endian, skb->csum_offset); + } else if (has_data_valid && + skb->ip_summed == CHECKSUM_UNNECESSARY) { + hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID; } /* else everything is zero */ return 0; diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index b9e1a13..3d555c7 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1976,7 +1976,7 @@ static int packet_rcv_vnet(st...
2023 Aug 21
3
[PATCH net-next v3] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...kb); if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report) - virtio_skb_set_hash((const struct virtio_net_hdr_v1_hash *)hdr, skb); + virtio_skb_set_hash(&hdr->hash_v1_hdr, skb); if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -2105,7 +2114,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) if (can_push) hdr = (struct virtio_net_hdr_mrg_rxbuf *)(skb->data - hdr_len); else - hdr = skb_vnet_hdr(skb); + hdr = &skb_vnet_common_hdr(skb)->mrg_hdr; if (virtio_net_hdr_from_skb(skb, &a...
2015 Sep 24
2
[PATCH v2] Fix AF_PACKET ABI breakage in 4.2
..., > + vnet_hdr.csum_start = __cpu_to_virtio16(vio_le(), > skb_checksum_start_offset(skb)); > - vnet_hdr.csum_offset = __cpu_to_virtio16(false, > + vnet_hdr.csum_offset = __cpu_to_virtio16(vio_le(), > skb->csum_offset); > } else if (skb->ip_summed == CHECKSUM_UNNECESSARY) { > vnet_hdr.flags = VIRTIO_NET_HDR_F_DATA_VALID; >
2015 Sep 24
2
[PATCH v2] Fix AF_PACKET ABI breakage in 4.2
..., > + vnet_hdr.csum_start = __cpu_to_virtio16(vio_le(), > skb_checksum_start_offset(skb)); > - vnet_hdr.csum_offset = __cpu_to_virtio16(false, > + vnet_hdr.csum_offset = __cpu_to_virtio16(vio_le(), > skb->csum_offset); > } else if (skb->ip_summed == CHECKSUM_UNNECESSARY) { > vnet_hdr.flags = VIRTIO_NET_HDR_F_DATA_VALID; >
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...(const struct virtio_net_hdr_v1_hash *)hdr, skb); + virtio_skb_set_hash(&common_hdr->hash_v1_hdr, skb); - if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) + mrg_hdr = &common_hdr->mrg_hdr; + if (mrg_hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) skb->ip_summed = CHECKSUM_UNNECESSARY; - if (virtio_net_hdr_to_skb(skb, &hdr->hdr, + if (virtio_net_hdr_to_skb(skb, &mrg_hdr->hdr, virtio_is_little_endian(vi->vdev))) { net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n", - dev->name, hdr->hdr.gso_type, - hdr->hdr.gso...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
..._hdr, skb); > >> > >> - if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) > >> + mrg_hdr = &common_hdr->mrg_hdr; > >> + if (mrg_hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) > >> skb->ip_summed = CHECKSUM_UNNECESSARY; > >> > >> - if (virtio_net_hdr_to_skb(skb, &hdr->hdr, > >> + if (virtio_net_hdr_to_skb(skb, &mrg_hdr->hdr, > >> virtio_is_little_endian(vi->vdev))) { > >> net_warn_ratelimi...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...irtio_skb_set_hash(&common_hdr->hash_v1_hdr, skb); > > - if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) > + mrg_hdr = &common_hdr->mrg_hdr; > + if (mrg_hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) > skb->ip_summed = CHECKSUM_UNNECESSARY; > > - if (virtio_net_hdr_to_skb(skb, &hdr->hdr, > + if (virtio_net_hdr_to_skb(skb, &mrg_hdr->hdr, > virtio_is_little_endian(vi->vdev))) { > net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n&quo...