search for: checksum_parti

Displaying 20 results from an estimated 110 matches for "checksum_parti".

Did you mean: checksum_partial
2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...llowing hack so guests rely on it, and we have to replicate it, too: Use port number to detect incoming IPv4 DHCP response packets, and fill in the checksum for these. The issue we are solving is that on linux guests, some apps that use recvmsg with AF_PACKET sockets, don't know how to handle CHECKSUM_PARTIAL; The interface to return the relevant information was added in 8dc4194474159660d7f37c495e3fc3f10d0db8cc, and older userspace does not use it. One important user of recvmsg with AF_PACKET is dhclient, so we add a work-around just for DHCP. Don't bother applying the hack to IPv6 as userspace v...
2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...llowing hack so guests rely on it, and we have to replicate it, too: Use port number to detect incoming IPv4 DHCP response packets, and fill in the checksum for these. The issue we are solving is that on linux guests, some apps that use recvmsg with AF_PACKET sockets, don't know how to handle CHECKSUM_PARTIAL; The interface to return the relevant information was added in 8dc4194474159660d7f37c495e3fc3f10d0db8cc, and older userspace does not use it. One important user of recvmsg with AF_PACKET is dhclient, so we add a work-around just for DHCP. Don't bother applying the hack to IPv6 as userspace v...
2017 Jan 17
1
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
...e for virtio_net_hdr and skb GSO conversion introduced a subtle (but unexplained) difference in how virtio_net flags are derived from skb->ip_summed fields on transmit from the guest to the host/backend. Prior to 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...
2017 Jan 17
1
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
...e for virtio_net_hdr and skb GSO conversion introduced a subtle (but unexplained) difference in how virtio_net flags are derived from skb->ip_summed fields on transmit from the guest to the host/backend. Prior to 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...
2010 Jun 27
0
[PATCH RFC] vhost-net: add dhclient work-around from userspace
...llowing hack so guests rely on it, and we have to replicate it, too: use source port to detect incoming IPv4 DHCP response packets, and fill in the checksum for these. The issue we are solving is that on linux guests, some apps that use recvmsg with AF_PACKET sockets, don't know how to handle CHECKSUM_PARTIAL; The interface to return the relevant information was added in 8dc4194474159660d7f37c495e3fc3f10d0db8cc, and older userspace does not use it. One important user of recvmsg with AF_PACKET is dhclient, so we add a work-around just for DHCP. Signed-off-by: Michael S. Tsirkin <mst at redhat.com&g...
2010 Jun 27
0
[PATCH RFC] vhost-net: add dhclient work-around from userspace
...llowing hack so guests rely on it, and we have to replicate it, too: use source port to detect incoming IPv4 DHCP response packets, and fill in the checksum for these. The issue we are solving is that on linux guests, some apps that use recvmsg with AF_PACKET sockets, don't know how to handle CHECKSUM_PARTIAL; The interface to return the relevant information was added in 8dc4194474159660d7f37c495e3fc3f10d0db8cc, and older userspace does not use it. One important user of recvmsg with AF_PACKET is dhclient, so we add a work-around just for DHCP. Signed-off-by: Michael S. Tsirkin <mst at redhat.com&g...
2017 Jan 17
0
virtio: Subtle changes to virtio_net flags breaks VXLAN on Google Cloud
...gt; GSO conversion > > introduced a subtle (but unexplained) difference in how virtio_net > flags are derived from skb->ip_summed fields on transmit from the > guest to the host/backend. Prior to 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. O...
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
2018 May 02
2
[PATCH V2 net-next 5/6] macvlan/macvtap: Add support for SCTP checksum offload.
...b/drivers/net/tap.c > index 9b6cb78..2c8512b 100644 > --- a/drivers/net/tap.c > +++ b/drivers/net/tap.c > @@ -369,8 +369,7 @@ rx_handler_result_t tap_handle_frame(struct sk_buff **pskb) > * check, we either support them all or none. > */ > if (skb->ip_summed == CHECKSUM_PARTIAL && > - !(features & NETIF_F_CSUM_MASK) && > - skb_checksum_help(skb)) > + skb_csum_hwoffload_help(skb, features)) > goto drop; > if (ptr_ring_produce(&q->ring, skb)) > goto drop; > @@ -945,6 +944,9 @@ static int set_offload...
2018 May 02
2
[PATCH V2 net-next 5/6] macvlan/macvtap: Add support for SCTP checksum offload.
...b/drivers/net/tap.c > index 9b6cb78..2c8512b 100644 > --- a/drivers/net/tap.c > +++ b/drivers/net/tap.c > @@ -369,8 +369,7 @@ rx_handler_result_t tap_handle_frame(struct sk_buff **pskb) > * check, we either support them all or none. > */ > if (skb->ip_summed == CHECKSUM_PARTIAL && > - !(features & NETIF_F_CSUM_MASK) && > - skb_checksum_help(skb)) > + skb_csum_hwoffload_help(skb, features)) > goto drop; > if (ptr_ring_produce(&q->ring, skb)) > goto drop; > @@ -945,6 +944,9 @@ static int set_offload...
2018 May 02
10
[PATCH V2 net-next 0/6] virtio-net: Add SCTP checksum offload support
...uck in. - virtio feature bits moved to high bits - distinguish between GUEST and HOST features - Fixed offload control command to control sctp checksum offload - added ipvlan support Vladislav Yasevich (6): virtio: Add support for SCTP checksum offloading sctp: Handle sctp packets with CHECKSUM_PARTIAL sctp: Build sctp offload support into the base kernel tun: Add support for SCTP checksum offload macvlan/macvtap: Add support for SCTP checksum offload. ipvlan: Add support for SCTP checksum offload drivers/net/ipvlan/ipvlan_main.c | 3 ++- drivers/net/macvlan.c | 5 +++--...
2018 May 02
10
[PATCH V2 net-next 0/6] virtio-net: Add SCTP checksum offload support
...uck in. - virtio feature bits moved to high bits - distinguish between GUEST and HOST features - Fixed offload control command to control sctp checksum offload - added ipvlan support Vladislav Yasevich (6): virtio: Add support for SCTP checksum offloading sctp: Handle sctp packets with CHECKSUM_PARTIAL sctp: Build sctp offload support into the base kernel tun: Add support for SCTP checksum offload macvlan/macvtap: Add support for SCTP checksum offload. ipvlan: Add support for SCTP checksum offload drivers/net/ipvlan/ipvlan_main.c | 3 ++- drivers/net/macvlan.c | 5 +++--...
2018 Apr 02
12
[PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support
...d buys us nothing in added support to virtio. To add true GSO, would require a lot of re-work inside of SCTP and would require extensions to the virtio net header to carry extra sctp data. Vladislav Yasevich (5): virtio: Add support for SCTP checksum offloading sctp: Handle sctp packets with CHECKSUM_PARTIAL sctp: Build sctp offload support into the base kernel tun: Add support for SCTP checksum offload macvlan/macvtap: Add support for SCTP checksum offload. drivers/net/macvlan.c | 5 +++-- drivers/net/tap.c | 8 +++++--- drivers/net/tun.c | 5 +++++ d...
2008 Jan 15
2
[PATCH 1/3] skb_partial_csum_set
...f) +{ + if (unlikely(start > skb->len - 2) || + unlikely((int)start + off > skb->len - 2)) { + if (net_ratelimit()) + printk(KERN_WARNING + "bad partial csum: csum=%u/%u len=%u\n", + start, off, skb->len); + return false; + } + skb->ip_summed = CHECKSUM_PARTIAL; + skb->csum_start = skb_headroom(skb) + start; + skb->csum_offset = off; + return true; +} + EXPORT_SYMBOL(___pskb_trim); EXPORT_SYMBOL(__kfree_skb); EXPORT_SYMBOL(kfree_skb); @@ -2250,3 +2278,4 @@ EXPORT_SYMBOL(skb_append_datato_frags); EXPORT_SYMBOL_GPL(skb_to_sgvec); EXPORT_SYMBO...
2008 Jan 15
2
[PATCH 1/3] skb_partial_csum_set
...f) +{ + if (unlikely(start > skb->len - 2) || + unlikely((int)start + off > skb->len - 2)) { + if (net_ratelimit()) + printk(KERN_WARNING + "bad partial csum: csum=%u/%u len=%u\n", + start, off, skb->len); + return false; + } + skb->ip_summed = CHECKSUM_PARTIAL; + skb->csum_start = skb_headroom(skb) + start; + skb->csum_offset = off; + return true; +} + EXPORT_SYMBOL(___pskb_trim); EXPORT_SYMBOL(__kfree_skb); EXPORT_SYMBOL(kfree_skb); @@ -2250,3 +2278,4 @@ EXPORT_SYMBOL(skb_append_datato_frags); EXPORT_SYMBOL_GPL(skb_to_sgvec); EXPORT_SYMBO...
2018 May 02
2
[PATCH V2 net-next 5/6] macvlan/macvtap: Add support for SCTP checksum offload.
...4 > >> --- a/drivers/net/tap.c > >> +++ b/drivers/net/tap.c > >> @@ -369,8 +369,7 @@ rx_handler_result_t tap_handle_frame(struct sk_buff **pskb) > >> * check, we either support them all or none. > >> */ > >> if (skb->ip_summed == CHECKSUM_PARTIAL && > >> - !(features & NETIF_F_CSUM_MASK) && > >> - skb_checksum_help(skb)) > >> + skb_csum_hwoffload_help(skb, features)) > >> goto drop; > >> if (ptr_ring_produce(&q->ring, skb)) > >> goto...
2018 May 02
2
[PATCH V2 net-next 5/6] macvlan/macvtap: Add support for SCTP checksum offload.
...4 > >> --- a/drivers/net/tap.c > >> +++ b/drivers/net/tap.c > >> @@ -369,8 +369,7 @@ rx_handler_result_t tap_handle_frame(struct sk_buff **pskb) > >> * check, we either support them all or none. > >> */ > >> if (skb->ip_summed == CHECKSUM_PARTIAL && > >> - !(features & NETIF_F_CSUM_MASK) && > >> - skb_checksum_help(skb)) > >> + skb_csum_hwoffload_help(skb, features)) > >> goto drop; > >> if (ptr_ring_produce(&q->ring, skb)) > >> goto...
2007 Jul 24
0
[PATCH] virtio_net.c gso & feature support
...81,70 @@ static void receive_skb(struct net_devic ntohs(skb->protocol), skb->len, skb->pkt_type); dev->stats.rx_bytes += skb->len; dev->stats.rx_packets++; + + if (hdr->flags & VIRTIO_NET_F_NEEDS_CSUM) { + pr_debug("Needs csum!\n"); + skb->ip_summed = CHECKSUM_PARTIAL; + skb->csum_start = hdr->csum_start; + skb->csum_offset = hdr->csum_offset; + if (skb->csum_start > skb->len - 2 + || skb->csum_offset > skb->len - 2) { + if (net_ratelimit()) + printk(KERN_WARNING "%s: csum=%u/%u len=%u\n", + dev-&g...
2007 Jul 24
0
[PATCH] virtio_net.c gso & feature support
...81,70 @@ static void receive_skb(struct net_devic ntohs(skb->protocol), skb->len, skb->pkt_type); dev->stats.rx_bytes += skb->len; dev->stats.rx_packets++; + + if (hdr->flags & VIRTIO_NET_F_NEEDS_CSUM) { + pr_debug("Needs csum!\n"); + skb->ip_summed = CHECKSUM_PARTIAL; + skb->csum_start = hdr->csum_start; + skb->csum_offset = hdr->csum_offset; + if (skb->csum_start > skb->len - 2 + || skb->csum_offset > skb->len - 2) { + if (net_ratelimit()) + printk(KERN_WARNING "%s: csum=%u/%u len=%u\n", + dev-&g...