search for: virtnet_clear_guest_offload

Displaying 20 results from an estimated 20 matches for "virtnet_clear_guest_offload".

2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+ if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_GUEST_OFFLOADS, > + VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, &sg)) { > + dev_warn(&vi->dev->dev, "Fail to set guest offload. \n"); > + return -EINVAL; > + } > + > + return 0; > +} > + > +static int virtnet_clear_guest_offloads(struct virtnet_info *vi) > +{ > + u64 offloads = 0; > + > + if (!vi->guest_offloads) > + return 0; > + > + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offload...
2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+ if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_GUEST_OFFLOADS, > + VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, &sg)) { > + dev_warn(&vi->dev->dev, "Fail to set guest offload. \n"); > + return -EINVAL; > + } > + > + return 0; > +} > + > +static int virtnet_clear_guest_offloads(struct virtnet_info *vi) > +{ > + u64 offloads = 0; > + > + if (!vi->guest_offloads) > + return 0; > + > + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offload...
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+ if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_GUEST_OFFLOADS, > + VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, &sg)) { > + dev_warn(&vi->dev->dev, "Fail to set guest offload. \n"); > + return -EINVAL; > + } > + > + return 0; > +} > + > +static int virtnet_clear_guest_offloads(struct virtnet_info *vi) > +{ > + u64 offloads = 0; > + > + if (!vi->guest_offloads) > + return 0; > + > + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offload...
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+ if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_GUEST_OFFLOADS, > + VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, &sg)) { > + dev_warn(&vi->dev->dev, "Fail to set guest offload. \n"); > + return -EINVAL; > + } > + > + return 0; > +} > + > +static int virtnet_clear_guest_offloads(struct virtnet_info *vi) > +{ > + u64 offloads = 0; > + > + if (!vi->guest_offloads) > + return 0; > + > + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offload...
2017 Jul 17
0
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...rl_offloads, sizeof(vi->ctrl_offloads)); + + if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_GUEST_OFFLOADS, + VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, &sg)) { + dev_warn(&vi->dev->dev, "Fail to set guest offload. \n"); + return -EINVAL; + } + + return 0; +} + +static int virtnet_clear_guest_offloads(struct virtnet_info *vi) +{ + u64 offloads = 0; + + if (!vi->guest_offloads) + return 0; + + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) + offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; + + return virtnet_set_guest_offloads(vi, offloads); +} + +static int virtnet_restore_...
2017 Jul 19
0
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...rl_offloads, sizeof(vi->ctrl_offloads)); + + if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_GUEST_OFFLOADS, + VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, &sg)) { + dev_warn(&vi->dev->dev, "Fail to set guest offload. \n"); + return -EINVAL; + } + + return 0; +} + +static int virtnet_clear_guest_offloads(struct virtnet_info *vi) +{ + u64 offloads = 0; + + if (!vi->guest_offloads) + return 0; + + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) + offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; + + return virtnet_set_guest_offloads(vi, offloads); +} + +static int virtnet_restore_...
2017 Jul 19
0
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...TIO_NET_CTRL_GUEST_OFFLOADS, >> + VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, &sg)) { >> + dev_warn(&vi->dev->dev, "Fail to set guest offload. \n"); >> + return -EINVAL; >> + } >> + >> + return 0; >> +} >> + >> +static int virtnet_clear_guest_offloads(struct virtnet_info *vi) >> +{ >> + u64 offloads = 0; >> + >> + if (!vi->guest_offloads) >> + return 0; >> + >> + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) >> + offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; >> + &gt...
2017 Jul 19
9
[PATCH net-next V2 0/5] Refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Changes from V1: - Various tweaks on commit logs and comments - Use virtnet_napi_enable() when enabling NAPI on XDP set - Copy the small buffer packet only if xdp_headroom is smaller than required Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as
2017 Jul 19
9
[PATCH net-next V2 0/5] Refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Changes from V1: - Various tweaks on commit logs and comments - Use virtnet_napi_enable() when enabling NAPI on XDP set - Copy the small buffer packet only if xdp_headroom is smaller than required Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as
2019 Dec 22
1
[PATCH net] virtio-net: Skip set_features on non-cvq devices
...t that's another (pair of) flag(s), of course if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6)) dev->features |= NETIF_F_LRO; I wonder if this bug is then also triggered when enabling XDP, through virtnet_clear_guest_offloads. That predates LRO, so would deserve another Fixes tag. > > Workloads may now depend on LRO for cycle efficiency. Reverting to > > behavior before this patch (though now displaying the offload state > > correctly) is more conservative in that regard. > > Do you see a probl...
2018 May 02
0
[PATCH V2 net-next 1/6] virtio: Add support for SCTP checksum offloading
...| 6 ++++++ include/uapi/linux/virtio_net.h | 5 +++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7b187ec..34af280 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2148,6 +2148,8 @@ static int virtnet_clear_guest_offloads(struct virtnet_info *vi) if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_SCTP_CSUM)) + offloads |= 1ULL << VIRTIO_NET_F_GUEST_SCTP_CSUM; return virtnet_set_gue...
2018 May 02
10
[PATCH V2 net-next 0/6] 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 May 02
10
[PATCH V2 net-next 0/6] 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 May 02
0
[PATCH V2 net-next 1/6] virtio: Add support for SCTP checksum offloading
...s(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > > index 7b187ec..34af280 100644 > > > --- a/drivers/net/virtio_net.c > > > +++ b/drivers/net/virtio_net.c > > > @@ -2148,6 +2148,8 @@ static int virtnet_clear_guest_offloads(struct virtnet_info *vi) > > > > > > if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > > > offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; > > > + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_SCTP_CSUM)) > > > + offloads...
2017 Jul 17
13
[PATCH net-next 0/5] refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as the ctx virtio-net: pack headroom into ctx for mergeable buffer virtio-net: switch to use new ctx API for small buffer virtio-net: do not reset during XDP set virtio-net: switch off offloads
2017 Jul 17
13
[PATCH net-next 0/5] refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as the ctx virtio-net: pack headroom into ctx for mergeable buffer virtio-net: switch to use new ctx API for small buffer virtio-net: do not reset during XDP set virtio-net: switch off offloads
2018 Nov 22
4
[PATCH net 1/2] virtio-net: disable guest csum during XDP set
...tio_net.c @@ -70,7 +70,8 @@ static const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, VIRTIO_NET_F_GUEST_ECN, - VIRTIO_NET_F_GUEST_UFO + VIRTIO_NET_F_GUEST_UFO, + VIRTIO_NET_F_GUEST_CSUM }; struct virtnet_stat_desc { @@ -2334,9 +2335,6 @@ static int virtnet_clear_guest_offloads(struct virtnet_info *vi) if (!vi->guest_offloads) return 0; - if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) - offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; - return virtnet_set_guest_offloads(vi, offloads); } @@ -2346,8 +2344,6 @@ static int virtnet_restore_gues...
2018 Nov 22
4
[PATCH net 1/2] virtio-net: disable guest csum during XDP set
...tio_net.c @@ -70,7 +70,8 @@ static const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, VIRTIO_NET_F_GUEST_ECN, - VIRTIO_NET_F_GUEST_UFO + VIRTIO_NET_F_GUEST_UFO, + VIRTIO_NET_F_GUEST_CSUM }; struct virtnet_stat_desc { @@ -2334,9 +2335,6 @@ static int virtnet_clear_guest_offloads(struct virtnet_info *vi) if (!vi->guest_offloads) return 0; - if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) - offloads = 1ULL << VIRTIO_NET_F_GUEST_CSUM; - return virtnet_set_guest_offloads(vi, offloads); } @@ -2346,8 +2344,6 @@ static int virtnet_restore_gues...
2019 Dec 22
2
[PATCH net] virtio-net: Skip set_features on non-cvq devices
On Sun, Dec 22, 2019 at 9:57 AM Michael S. Tsirkin <mst at redhat.com> wrote: > > On Sun, Dec 22, 2019 at 09:21:43AM -0500, Willem de Bruijn wrote: > > On Sun, Dec 22, 2019 at 8:11 AM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > > > On Fri, Dec 20, 2019 at 10:08:41PM -0500, Willem de Bruijn wrote: > > > > On Fri, Dec 20, 2019 at 4:22
2019 Dec 22
2
[PATCH net] virtio-net: Skip set_features on non-cvq devices
On Sun, Dec 22, 2019 at 9:57 AM Michael S. Tsirkin <mst at redhat.com> wrote: > > On Sun, Dec 22, 2019 at 09:21:43AM -0500, Willem de Bruijn wrote: > > On Sun, Dec 22, 2019 at 8:11 AM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > > > On Fri, Dec 20, 2019 at 10:08:41PM -0500, Willem de Bruijn wrote: > > > > On Fri, Dec 20, 2019 at 4:22