Displaying 20 results from an estimated 93 matches for "virtio_net_hdr_f_data_valid".
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. Fo...
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. Fo...
2017 Jan 17
1
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
...the patches the flags would be set
to VIRTIO_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
Requ...
2017 Jan 17
1
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
...the patches the flags would be set
to VIRTIO_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
Requ...
2017 Jan 20
4
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
Commit 501db511397f ("virtio: don't set VIRTIO_NET_HDR_F_DATA_VALID on
xmit") in fact disables VIRTIO_HDR_F_DATA_VALID on receiving path too,
fixing this by adding a hint (has_data_valid) and set it only on the
receiving path.
Cc: Rolf Neugebauer <rolf.neugebauer at docker.com>
Signed-off-by: Jason Wang <jasowang at redhat.com>
---
drivers/net/ma...
2017 Jan 20
4
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
Commit 501db511397f ("virtio: don't set VIRTIO_NET_HDR_F_DATA_VALID on
xmit") in fact disables VIRTIO_HDR_F_DATA_VALID on receiving path too,
fixing this by adding a hint (has_data_valid) and set it only on the
receiving path.
Cc: Rolf Neugebauer <rolf.neugebauer at docker.com>
Signed-off-by: Jason Wang <jasowang at redhat.com>
---
drivers/net/ma...
2018 Apr 11
3
[PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading
...L;
> +
> + if (hdr->flags & VIRTIO_NET_HDR_F_CSUM_NOT_INET)
> + skb->csum_not_inet = 1;
> }
>
> if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
> @@ -96,6 +99,9 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
> hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
> } /* else everything is zero */
>
> + if (skb->csum_not_inet)
> + hdr->flags &= VIRTIO_NET_HDR_F_CSUM_NOT_INET;
> +
> return 0;
> }
>
> diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
> index 5de6ed3..3f279c8 100644...
2018 Apr 11
3
[PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading
...L;
> +
> + if (hdr->flags & VIRTIO_NET_HDR_F_CSUM_NOT_INET)
> + skb->csum_not_inet = 1;
> }
>
> if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
> @@ -96,6 +99,9 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
> hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
> } /* else everything is zero */
>
> + if (skb->csum_not_inet)
> + hdr->flags &= VIRTIO_NET_HDR_F_CSUM_NOT_INET;
> +
> return 0;
> }
>
> diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
> index 5de6ed3..3f279c8 100644...
2017 Jan 17
0
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
...set
> to VIRTIO_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] sa...
2018 Apr 16
1
[PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading
...DR_F_CSUM_NOT_INET)
> >> + skb->csum_not_inet = 1;
> >> }
> >>
> >> if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
> >> @@ -96,6 +99,9 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
> >> hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
> >> } /* else everything is zero */
> >>
> >> + if (skb->csum_not_inet)
> >> + hdr->flags &= VIRTIO_NET_HDR_F_CSUM_NOT_INET;
> >> +
> >> return 0;
> >> }
> >>
> >> diff --git a/include/uapi/linux/...
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
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...dr(skb);
+ common_hdr = skb_vnet_common_hdr(skb);
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(&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->vde...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
..._RXHASH && vi->has_rss_hash_report)
> >> - virtio_skb_set_hash((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->h...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...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(&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...
2018 Apr 02
12
[PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support
Now that we have SCTP offload capabilities in the kernel, we can add
them to virtio as well. First step is SCTP checksum.
We need a new freature in virtio to negotiate this support since
SCTP is excluded with the stardard checksum and requires a little
bit extra. This series proposes VIRTIO_NET_F_SCTP_CSUM feature bit.
As the "little bit extra", the kernel uses a new bit in the skb
2018 Apr 02
0
[PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading
..._set(skb, start, off))
return -EINVAL;
+
+ if (hdr->flags & VIRTIO_NET_HDR_F_CSUM_NOT_INET)
+ skb->csum_not_inet = 1;
}
if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
@@ -96,6 +99,9 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
} /* else everything is zero */
+ if (skb->csum_not_inet)
+ hdr->flags &= VIRTIO_NET_HDR_F_CSUM_NOT_INET;
+
return 0;
}
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index 5de6ed3..3f279c8 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/inclu...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...atures & 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(&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 (...
2017 Jan 20
0
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
On Fri, Jan 20, 2017 at 02:32:42PM +0800, Jason Wang wrote:
> Commit 501db511397f ("virtio: don't set VIRTIO_NET_HDR_F_DATA_VALID on
> xmit") in fact disables VIRTIO_HDR_F_DATA_VALID on receiving path too,
> fixing this by adding a hint (has_data_valid) and set it only on the
> receiving path.
>
> Cc: Rolf Neugebauer <rolf.neugebauer at docker.com>
> Signed-off-by: Jason Wang <jasowang at redh...
2018 Apr 16
0
[PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading
...r->flags & VIRTIO_NET_HDR_F_CSUM_NOT_INET)
>> + skb->csum_not_inet = 1;
>> }
>>
>> if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
>> @@ -96,6 +99,9 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
>> hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
>> } /* else everything is zero */
>>
>> + if (skb->csum_not_inet)
>> + hdr->flags &= VIRTIO_NET_HDR_F_CSUM_NOT_INET;
>> +
>> return 0;
>> }
>>
>> diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net....