search for: virtio_net_f_mac

Displaying 20 results from an estimated 293 matches for "virtio_net_f_mac".

2014 Nov 27
2
[PATCH v6 34/46] virtio_net: disable mac write for virtio 1.0
...a72d3..9ab3c50 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1030,7 +1030,8 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p) "Failed to set mac address by vq command.\n"); return -EINVAL; } - } else if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { + } else if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC) && + !virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { unsigned int i; /* Naturally, this has an atomicity problem. */ -- MST
2014 Nov 27
2
[PATCH v6 34/46] virtio_net: disable mac write for virtio 1.0
...a72d3..9ab3c50 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1030,7 +1030,8 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p) "Failed to set mac address by vq command.\n"); return -EINVAL; } - } else if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { + } else if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC) && + !virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { unsigned int i; /* Naturally, this has an atomicity problem. */ -- MST
2014 Dec 11
0
[PATCH RFC v6 03/20] virtio: feature bit manipulation helpers
...e574bd4..f1aa100 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -446,23 +446,23 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); - features |= (1 << VIRTIO_NET_F_MAC); + virtio_add_feature(&features, VIRTIO_NET_F_MAC); if (!peer_has_vnet_hdr(n)) { - features &= ~(0x1 << VIRTIO_NET_F_CSUM); - features &= ~(0x1 << VIRTIO_NET_F_HOST_TSO4); - features &= ~(0x1 << VIRTIO_NET_F_HOST_TSO6); - feat...
2014 Dec 11
0
[PATCH RFC v6 03/20] virtio: feature bit manipulation helpers
...e574bd4..f1aa100 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -446,23 +446,23 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); - features |= (1 << VIRTIO_NET_F_MAC); + virtio_add_feature(&features, VIRTIO_NET_F_MAC); if (!peer_has_vnet_hdr(n)) { - features &= ~(0x1 << VIRTIO_NET_F_CSUM); - features &= ~(0x1 << VIRTIO_NET_F_HOST_TSO4); - features &= ~(0x1 << VIRTIO_NET_F_HOST_TSO6); - feat...
2023 Jan 27
2
[PATCH v3 0/2] virtio_net: vdpa: update MAC address when it is generated by virtio-net
...case of error, and a future patch from Jason adds an ASSERT_RTNL() in virtnet_send_command() ("virtio-net: convert rx mode setting to use workqueue") - add a patch to disable F_STANDBY if F_MAC is not set v2: - remove vdpa_sim related fixes - check virtio_has_feature(vdev, VIRTIO_NET_F_MAC) rather than addr_assign_type Laurent Vivier (2): virtio_net: disable VIRTIO_NET_F_STANDBY if VIRTIO_NET_F_MAC is not set virtio_net: notify MAC address change on device initialization drivers/net/virtio_net.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) -- 2.3...
2023 Jun 30
4
[PATCH virtio 0/4] pds_vdpa: mac, reset, and irq updates
...fixes for device providing a MAC address, for allocating irq resources later to support vhost use, and for properly cleaning vq info on reset. Allen Hubbe (2): pds_vdpa: reset to vdpa specified mac pds_vdpa: alloc irq vectors on DRIVER_OK Shannon Nelson (2): pds_vdpa: always allow offering VIRTIO_NET_F_MAC pds_vdpa: clean and reset vqs entries drivers/vdpa/pds/vdpa_dev.c | 171 +++++++++++++++++++++++++----------- drivers/vdpa/pds/vdpa_dev.h | 1 + 2 files changed, 122 insertions(+), 50 deletions(-) -- 2.17.1
2023 Jun 30
4
[PATCH virtio 0/4] pds_vdpa: mac, reset, and irq updates
...fixes for device providing a MAC address, for allocating irq resources later to support vhost use, and for properly cleaning vq info on reset. Allen Hubbe (2): pds_vdpa: reset to vdpa specified mac pds_vdpa: alloc irq vectors on DRIVER_OK Shannon Nelson (2): pds_vdpa: always allow offering VIRTIO_NET_F_MAC pds_vdpa: clean and reset vqs entries drivers/vdpa/pds/vdpa_dev.c | 171 +++++++++++++++++++++++++----------- drivers/vdpa/pds/vdpa_dev.h | 1 + 2 files changed, 122 insertions(+), 50 deletions(-) -- 2.17.1
2023 Jan 27
1
[PATCH v2 1/1] virtio_net: notify MAC address change on device initialization
...virtio_device *vdev) > > > pr_debug("virtnet: registered device %s with %d RX and TX vq's\n", > > > dev->name, max_queue_pairs); > > > + /* a random MAC address has been assigned, notify the device */ > > > + if (!virtio_has_feature(vdev, VIRTIO_NET_F_MAC) && > > > + virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_MAC_ADDR)) { > > > > Maybe add a comment explaining that we don't fail probe if > > VIRTIO_NET_F_CTRL_MAC_ADDR is not there because > > many devices work fine without getting MAC explicit...
2008 Jul 08
1
[PATCH] virtio_net: Set VIRTIO_NET_F_GUEST_CSUM feature
...insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -550,7 +550,8 @@ static struct virtio_device_id id_table[ }; static unsigned int features[] = { - VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC, + VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, + VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC, VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, VIRTIO_NET_F_HOST_ECN, VIRTIO_F_NOTIFY_ON_EMPTY, };
2013 Jan 16
6
[PATCH v2 0/2] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com> Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time. V2: check return of sending command, delay eth_mac_addr() Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new
2013 Jan 16
6
[PATCH v2 0/2] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com> Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time. V2: check return of sending command, delay eth_mac_addr() Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new
2016 Nov 04
3
[PATCH] virtio-net: drop legacy features in virtio 1 mode
.../net/virtio_net.c b/drivers/net/virtio_net.c index 7a00365..b19fb4d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2089,23 +2089,33 @@ static struct virtio_device_id id_table[] = { { 0 }, }; +#define VIRTNET_FEATURES \ + VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, \ + VIRTIO_NET_F_MAC, \ + VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, \ + VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, \ + VIRTIO_NET_F_GUEST_ECN, VIRTIO_NET_F_GUEST_UFO, \ + VIRTIO_NET_F_MRG_RXBUF, VIRTIO_NET_F_STATUS, VIRTIO_NET_F_CTRL_VQ, \ + VIRTIO_NET_F_CTRL_R...
2016 Nov 04
3
[PATCH] virtio-net: drop legacy features in virtio 1 mode
.../net/virtio_net.c b/drivers/net/virtio_net.c index 7a00365..b19fb4d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2089,23 +2089,33 @@ static struct virtio_device_id id_table[] = { { 0 }, }; +#define VIRTNET_FEATURES \ + VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, \ + VIRTIO_NET_F_MAC, \ + VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, \ + VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, \ + VIRTIO_NET_F_GUEST_ECN, VIRTIO_NET_F_GUEST_UFO, \ + VIRTIO_NET_F_MRG_RXBUF, VIRTIO_NET_F_STATUS, VIRTIO_NET_F_CTRL_VQ, \ + VIRTIO_NET_F_CTRL_R...
2018 Apr 11
3
[PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading
...dev->hw_features |= NETIF_F_TSO > @@ -2952,7 +2957,7 @@ static struct virtio_device_id id_table[] = { > }; > > #define VIRTNET_FEATURES \ > - VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, \ > + VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, VIRTIO_NET_F_SCTP_CSUM, \ > VIRTIO_NET_F_MAC, \ > VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, \ > VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, \ > diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h > index f144216..2e7a64a 100644 > --- a/include/linux/...
2018 Apr 11
3
[PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading
...dev->hw_features |= NETIF_F_TSO > @@ -2952,7 +2957,7 @@ static struct virtio_device_id id_table[] = { > }; > > #define VIRTNET_FEATURES \ > - VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, \ > + VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, VIRTIO_NET_F_SCTP_CSUM, \ > VIRTIO_NET_F_MAC, \ > VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, \ > VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, \ > diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h > index f144216..2e7a64a 100644 > --- a/include/linux/...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
..., struct mlx5_vdpa_dev, vdev) #define VALID_FEATURES_MASK \ - (BIT(VIRTIO_NET_F_CSUM) | BIT(VIRTIO_NET_F_GUEST_CSUM) | \ - BIT(VIRTIO_NET_F_CTRL_GUEST_OFFLOADS) | BIT(VIRTIO_NET_F_MTU) | BIT(VIRTIO_NET_F_MAC) | \ - BIT(VIRTIO_NET_F_GUEST_TSO4) | BIT(VIRTIO_NET_F_GUEST_TSO6) | \ - BIT(VIRTIO_NET_F_GUEST_ECN) | BIT(VIRTIO_NET_F_GUEST_UFO) | BIT(VIRTIO_NET_F_HOST_TSO4) | \ - BIT(VIRTIO_NET_F_HOST_TSO6) | BIT(VIRTIO_NET_F_HOST_ECN) | BIT(VIRTIO_NET_F_HOST_UFO) | \ - BIT(...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
..., struct mlx5_vdpa_dev, vdev) #define VALID_FEATURES_MASK \ - (BIT(VIRTIO_NET_F_CSUM) | BIT(VIRTIO_NET_F_GUEST_CSUM) | \ - BIT(VIRTIO_NET_F_CTRL_GUEST_OFFLOADS) | BIT(VIRTIO_NET_F_MTU) | BIT(VIRTIO_NET_F_MAC) | \ - BIT(VIRTIO_NET_F_GUEST_TSO4) | BIT(VIRTIO_NET_F_GUEST_TSO6) | \ - BIT(VIRTIO_NET_F_GUEST_ECN) | BIT(VIRTIO_NET_F_GUEST_UFO) | BIT(VIRTIO_NET_F_HOST_TSO4) | \ - BIT(VIRTIO_NET_F_HOST_TSO6) | BIT(VIRTIO_NET_F_HOST_ECN) | BIT(VIRTIO_NET_F_HOST_UFO) | \ - BIT(...
2023 Jan 30
6
[PATCH 0/6] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to formalize migration compatibility support at the driver level. Thanks, -Siwei [1] [PATCH v3 0/4] vDPA:
2011 Aug 13
2
[PATCH] virtio-net: Read MAC only after initializing MSI-X
...et/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -981,14 +981,6 @@ static int virtnet_probe(struct virtio_device *vdev) /* (!csum && gso) case will be fixed by register_netdev() */ } - /* Configuration may specify what MAC to use. Otherwise random. */ - if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { - vdev->config->get(vdev, - offsetof(struct virtio_net_config, mac), - dev->dev_addr, dev->addr_len); - } else - random_ether_addr(dev->dev_addr); - /* Set up our device-specific information */ vi = netdev_priv(dev); netif_napi_add(dev, &vi->napi, virtnet...
2011 Aug 13
2
[PATCH] virtio-net: Read MAC only after initializing MSI-X
...et/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -981,14 +981,6 @@ static int virtnet_probe(struct virtio_device *vdev) /* (!csum && gso) case will be fixed by register_netdev() */ } - /* Configuration may specify what MAC to use. Otherwise random. */ - if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { - vdev->config->get(vdev, - offsetof(struct virtio_net_config, mac), - dev->dev_addr, dev->addr_len); - } else - random_ether_addr(dev->dev_addr); - /* Set up our device-specific information */ vi = netdev_priv(dev); netif_napi_add(dev, &vi->napi, virtnet...