search for: netif_f_rxcsum

Displaying 20 results from an estimated 56 matches for "netif_f_rxcsum".

2023 Mar 01
1
[PATCH v3] virtio-net: Fix probe of virtio-net on kvmtool
...e virtio-net > control queue. kvmtool however does not have a control queue that supports > offload changing (VIRTIO_NET_F_CTRL_GUEST_OFFLOADS is not advertised) > > The netdev features have changed due to validation checks in > netdev_fix_features(): > > if (!(features & NETIF_F_RXCSUM)) { > /* NETIF_F_GRO_HW implies doing RXCSUM since every packet > * successfully merged by hardware must also have the > * checksum verified by hardware. If the user does not > * want to enable RXCSUM, logically, we should disable GRO_HW. > */ > if (features & NETIF...
2020 Sep 28
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...apable & > - ~GUEST_OFFLOAD_LRO_MASK; > + offloads &= ~GUEST_OFFLOAD_LRO_MASK; > + } > > - err = virtnet_set_guest_offloads(vi, offloads); > - if (err) > - return err; > - vi->guest_offloads = offloads; > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > + if (features & NETIF_F_RXCSUM) > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > + else > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; > } > > + if (offloads == (vi->guest_offloads & > + vi->guest_offloads_capable)) > + return 0; Hmm, what exac...
2020 Sep 28
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...apable & > - ~GUEST_OFFLOAD_LRO_MASK; > + offloads &= ~GUEST_OFFLOAD_LRO_MASK; > + } > > - err = virtnet_set_guest_offloads(vi, offloads); > - if (err) > - return err; > - vi->guest_offloads = offloads; > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > + if (features & NETIF_F_RXCSUM) > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > + else > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; > } > > + if (offloads == (vi->guest_offloads & > + vi->guest_offloads_capable)) > + return 0; Hmm, what exac...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...; > > > > > - err = virtnet_set_guest_offloads(vi, offloads); > > > - if (err) > > > - return err; > > > - vi->guest_offloads = offloads; > > > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > > > + if (features & NETIF_F_RXCSUM) > > > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > > > + else > > > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; > > > } > > > > &g...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...; > > > > > - err = virtnet_set_guest_offloads(vi, offloads); > > > - if (err) > > > - return err; > > > - vi->guest_offloads = offloads; > > > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > > > + if (features & NETIF_F_RXCSUM) > > > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > > > + else > > > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; > > > } > > > > &g...
2013 Aug 27
2
[PATCH] virtio-net: Set RXCSUM feature if GUEST_CSUM is available
If the VIRTIO_NET_F_GUEST_CSUM virtio feature is available, the guest does not have to calculate the checksums on all received packets. This is pretty much the same feature as RX checksum offloading on real network cards, so the virtio-net driver should report this by setting the NETIF_F_RXCSUM flag. When the user now runs "ethtool -k", he or she can see whether the virtio-net interface has to calculate RX checksums or not. Signed-off-by: Thomas Huth <thuth at linux.vnet.ibm.com> --- drivers/net/virtio_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/n...
2013 Aug 27
2
[PATCH] virtio-net: Set RXCSUM feature if GUEST_CSUM is available
If the VIRTIO_NET_F_GUEST_CSUM virtio feature is available, the guest does not have to calculate the checksums on all received packets. This is pretty much the same feature as RX checksum offloading on real network cards, so the virtio-net driver should report this by setting the NETIF_F_RXCSUM flag. When the user now runs "ethtool -k", he or she can see whether the virtio-net interface has to calculate RX checksums or not. Signed-off-by: Thomas Huth <thuth at linux.vnet.ibm.com> --- drivers/net/virtio_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/n...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...err = virtnet_set_guest_offloads(vi, offloads); > > > > > - if (err) > > > > > - return err; > > > > > - vi->guest_offloads = offloads; > > > > > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > > > > > + if (features & NETIF_F_RXCSUM) > > > > > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > > > > > + else > > > > > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; >...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...err = virtnet_set_guest_offloads(vi, offloads); > > > > > - if (err) > > > > > - return err; > > > > > - vi->guest_offloads = offloads; > > > > > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > > > > > + if (features & NETIF_F_RXCSUM) > > > > > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > > > > > + else > > > > > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; >...
2020 Sep 28
1
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...&= ~GUEST_OFFLOAD_LRO_MASK; > + } > > - err = virtnet_set_guest_offloads(vi, offloads); > - if (err) > - return err; > - vi->guest_offloads = offloads; > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > + if (features & NETIF_F_RXCSUM) > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > + else > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; > } LRO requires receive checksum offload: packets must have thei...
2020 Sep 28
7
[PATCH 1/2] virtio-net: don't disable guest csum when disable LRO
From: Tonghao Zhang <xiangxia.m.yue at gmail.com> Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: e59ff2c49ae1 ("virtio-net: disable guest csum during XDP set") Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason
2020 Sep 28
7
[PATCH 1/2] virtio-net: don't disable guest csum when disable LRO
From: Tonghao Zhang <xiangxia.m.yue at gmail.com> Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: e59ff2c49ae1 ("virtio-net: disable guest csum during XDP set") Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason
2020 Sep 28
0
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...else - offloads = vi->guest_offloads_capable & - ~GUEST_OFFLOAD_LRO_MASK; + offloads &= ~GUEST_OFFLOAD_LRO_MASK; + } - err = virtnet_set_guest_offloads(vi, offloads); - if (err) - return err; - vi->guest_offloads = offloads; + if ((dev->features ^ features) & NETIF_F_RXCSUM) { + if (features & NETIF_F_RXCSUM) + offloads |= GUEST_OFFLOAD_CSUM_MASK; + else + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; } + if (offloads == (vi->guest_offloads & + vi->guest_offloads_capable)) + return 0; + + err = virtnet_set_guest_offloads(vi, offloads); + if (er...
2020 Sep 29
0
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...RO_MASK; > > + } > > > > - err = virtnet_set_guest_offloads(vi, offloads); > > - if (err) > > - return err; > > - vi->guest_offloads = offloads; > > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > > + if (features & NETIF_F_RXCSUM) > > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > > + else > > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; > > } > > > > + if (offloads == (vi-&...
2020 Sep 29
0
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...; > - err = virtnet_set_guest_offloads(vi, offloads); > > > > - if (err) > > > > - return err; > > > > - vi->guest_offloads = offloads; > > > > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > > > > + if (features & NETIF_F_RXCSUM) > > > > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > > > > + else > > > > + offloads &= ~GUEST_OFFLOAD_CSUM_MASK; > > > >...
2020 Sep 29
0
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...uest_offloads(vi, offloads); > > > > > > - if (err) > > > > > > - return err; > > > > > > - vi->guest_offloads = offloads; > > > > > > + if ((dev->features ^ features) & NETIF_F_RXCSUM) { > > > > > > + if (features & NETIF_F_RXCSUM) > > > > > > + offloads |= GUEST_OFFLOAD_CSUM_MASK; > > > > > > + else > > > > > > + offloads &= ~GUEST_OFFL...
2018 May 02
2
[PATCH V2 net-next 5/6] macvlan/macvtap: Add support for SCTP checksum offload.
...FFLOADS | NETIF_F_LLTX) > > @@ -842,7 +842,8 @@ static struct lock_class_key macvlan_netdev_addr_lock_key; > (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ > NETIF_F_GSO | NETIF_F_TSO | NETIF_F_LRO | \ > NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_GRO | NETIF_F_RXCSUM | \ > - NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER) > + NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER | \ > + NETIF_F_SCTP_CRC) > > #define MACVLAN_STATE_MASK \ > ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT)) > diff --g...
2018 May 02
2
[PATCH V2 net-next 5/6] macvlan/macvtap: Add support for SCTP checksum offload.
...FFLOADS | NETIF_F_LLTX) > > @@ -842,7 +842,8 @@ static struct lock_class_key macvlan_netdev_addr_lock_key; > (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ > NETIF_F_GSO | NETIF_F_TSO | NETIF_F_LRO | \ > NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_GRO | NETIF_F_RXCSUM | \ > - NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER) > + NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER | \ > + NETIF_F_SCTP_CRC) > > #define MACVLAN_STATE_MASK \ > ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT)) > diff --g...
2023 Feb 24
1
[PATCH v2] virtio-net: Fix probe of virtio-net on kvmtool
...d..f8341d1a4ccd 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -3780,10 +3780,9 @@ static int virtnet_probe(struct virtio_device *vdev) > } > if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_CSUM)) > dev->features |= NETIF_F_RXCSUM; > - if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || > - virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6)) > - dev->features |= NETIF_F_GRO_HW; > - if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS)) > + if ((virtio_h...
2023 Feb 24
1
[PATCH v2] virtio-net: Fix probe of virtio-net on kvmtool
....c > index 61e33e4dd0cd..f8341d1a4ccd 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -3780,10 +3780,9 @@ static int virtnet_probe(struct virtio_device *vdev) > } > if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_CSUM)) > dev->features |= NETIF_F_RXCSUM; > - if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || > - virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6)) > - dev->features |= NETIF_F_GRO_HW; > - if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS)) > + if ((virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_T...