search for: virtio_net_set_config

Displaying 20 results from an estimated 32 matches for "virtio_net_set_config".

2015 Jan 20
1
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
...ck at de.ibm.com> > --- > hw/net/virtio-net.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index d6d1b98..ebbea60 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -87,6 +87,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) > memcpy(&netcfg, config, n->config_size); > > if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && I don't see VIRTIO_NET_F_CTRL_MAC_ADDR (23) in the VIRTIO 1.0 "5.1.3.1 Legacy Interface: Feature bits&...
2015 Jan 20
1
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
...ck at de.ibm.com> > --- > hw/net/virtio-net.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index d6d1b98..ebbea60 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -87,6 +87,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) > memcpy(&netcfg, config, n->config_size); > > if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && I don't see VIRTIO_NET_F_CTRL_MAC_ADDR (23) in the VIRTIO 1.0 "5.1.3.1 Legacy Interface: Feature bits&...
2014 Dec 11
0
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
...Signed-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index d6d1b98..ebbea60 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -87,6 +87,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && + !virtio_has_feature(vdev, VIRTIO_F_VERSION_1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) {...
2014 Dec 11
0
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
...Signed-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index d6d1b98..ebbea60 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -87,6 +87,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && + !virtio_has_feature(vdev, VIRTIO_F_VERSION_1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) {...
2013 Mar 21
2
[RFC virt-spec PATCH] only writing out the last byte of MAC makes it have effect
The lengcy guests don't have mac programming command, we don't know when it's safe to use MAC. We can change QEMU to make MAC change effect when the last byte of MAC is written to config space. Signed-off-by: Amos Kong <akong at redhat.com> --- virtio-spec.lyx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index
2013 Mar 21
2
[RFC virt-spec PATCH] only writing out the last byte of MAC makes it have effect
The lengcy guests don't have mac programming command, we don't know when it's safe to use MAC. We can change QEMU to make MAC change effect when the last byte of MAC is written to config space. Signed-off-by: Amos Kong <akong at redhat.com> --- virtio-spec.lyx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index
2013 Jan 17
1
[QEMU PATCH v3] virtio-net: introduce a new macaddr control
....property = "ctrl_mac_addr",\ + .value = "off", \ } static QEMUMachine pc_machine_v1_3 = { diff --git a/hw/virtio-net.c b/hw/virtio-net.c index dc7c6d6..941d782 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -93,7 +93,8 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, sizeof(netcfg)); - if (memcmp(netcfg.mac, n->mac, ETH_ALEN)) { + if (!(n->vdev.guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + memcmp(netcfg.mac, n->mac, ETH_ALEN)) {...
2013 Jan 17
1
[QEMU PATCH v3] virtio-net: introduce a new macaddr control
....property = "ctrl_mac_addr",\ + .value = "off", \ } static QEMUMachine pc_machine_v1_3 = { diff --git a/hw/virtio-net.c b/hw/virtio-net.c index dc7c6d6..941d782 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -93,7 +93,8 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, sizeof(netcfg)); - if (memcmp(netcfg.mac, n->mac, ETH_ALEN)) { + if (!(n->vdev.guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + memcmp(netcfg.mac, n->mac, ETH_ALEN)) {...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...TIPORT); + return virtio_has_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT); } static size_t write_to_port(VirtIOSerialPort *port, diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index f1aa100..9f3c58a 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -86,7 +86,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); - if (!(vdev->guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && memcmp(netcfg.mac, n->...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...TIPORT); + return virtio_has_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT); } static size_t write_to_port(VirtIOSerialPort *port, diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index f1aa100..9f3c58a 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -86,7 +86,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); - if (!(vdev->guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && memcmp(netcfg.mac, n->...
2013 Jan 22
5
[QEMU PATCH v5 0/3] virtio-net: fix of ctrl commands
Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout assumptions, trivial rename V5: fix
2013 Jan 22
5
[QEMU PATCH v5 0/3] virtio-net: fix of ctrl commands
Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout assumptions, trivial rename V5: fix
2013 Jan 19
8
[QEMU PATCH v4 0/3] virtio-net: fix of ctrl commands
From: Amos Kong <akong at redhat.com> Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout
2013 Jan 19
8
[QEMU PATCH v4 0/3] virtio-net: fix of ctrl commands
From: Amos Kong <akong at redhat.com> Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...(index > 0) { + return features; + } + vser = VIRTIO_SERIAL(vdev); if (vser->bus.max_nr_ports > 1) { diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 2040eac..67f91c0 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -86,7 +86,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); - if (!(vdev->guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + if (!(vdev->guest_features[0] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcm...
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...(index > 0) { + return features; + } + vser = VIRTIO_SERIAL(vdev); if (vser->bus.max_nr_ports > 1) { diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 2040eac..67f91c0 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -86,7 +86,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); - if (!(vdev->guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + if (!(vdev->guest_features[0] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcm...
2014 Nov 27
1
[PATCH RFC v4 03/16] virtio: support more feature bits
...(index > 0) { + return features; + } + vser = VIRTIO_SERIAL(vdev); if (vser->bus.max_nr_ports > 1) { diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9b88775..1e214b5 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -86,7 +86,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); - if (!(vdev->guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + if (!(vdev->guest_features[0] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcm...
2014 Nov 27
1
[PATCH RFC v4 03/16] virtio: support more feature bits
...(index > 0) { + return features; + } + vser = VIRTIO_SERIAL(vdev); if (vser->bus.max_nr_ports > 1) { diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9b88775..1e214b5 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -86,7 +86,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config) memcpy(&netcfg, config, n->config_size); - if (!(vdev->guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && + if (!(vdev->guest_features[0] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcm...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...); + if (r) { + fprintf(stderr, "Unable to initialize vhost device: %d\n", r); + virtio_cleanup(&n->vdev); + return NULL; + } + } n->vdev.get_config = virtio_net_get_config; n->vdev.set_config = virtio_net_set_config; @@ -838,6 +883,7 @@ VirtIODevice *virtio_net_init(DeviceState *dev) n->vdev.set_features = virtio_net_set_features; n->vdev.bad_features = virtio_net_bad_features; n->vdev.reset = virtio_net_reset; + n->vdev.driver_ok = virtio_net_driver_ok; n->rx_vq = virtio_...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...); + if (r) { + fprintf(stderr, "Unable to initialize vhost device: %d\n", r); + virtio_cleanup(&n->vdev); + return NULL; + } + } n->vdev.get_config = virtio_net_get_config; n->vdev.set_config = virtio_net_set_config; @@ -838,6 +883,7 @@ VirtIODevice *virtio_net_init(DeviceState *dev) n->vdev.set_features = virtio_net_set_features; n->vdev.bad_features = virtio_net_bad_features; n->vdev.reset = virtio_net_reset; + n->vdev.driver_ok = virtio_net_driver_ok; n->rx_vq = virtio_...