search for: netclientstate

Displaying 20 results from an estimated 47 matches for "netclientstate".

2023 Mar 06
0
[PATCH v4 01/15] vdpa net: move iova tree creation from init to start
...a/net/vhost-vdpa.c b/net/vhost-vdpa.c > > >>> index de5ed8ff22..b89c99066a 100644 > > >>> --- a/net/vhost-vdpa.c > > >>> +++ b/net/vhost-vdpa.c > > >>> @@ -178,13 +178,9 @@ err_init: > > >>> static void vhost_vdpa_cleanup(NetClientState *nc) > > >>> { > > >>> VhostVDPAState *s = DO_UPCAST(VhostVDPAState, nc, nc); > > >>> - struct vhost_dev *dev = &s->vhost_net->dev; > > >>> > > >>> qemu_vfree(s->cvq_cmd_out_buffer); > &gt...
2015 May 06
9
[PATCH RFC 0/7] vhost: cross-endian support (vhost-net only)
Hi, This series allows QEMU to use vhost with legacy virtio devices when host and target don't have the same endianness. Only network devices are covered for the moment. I had already posted a series some monthes ago but it never got reviewed. Moreover, the underlying kernel support was entirely re-written and is still waiting to be applied by Michael. I hence post as RFC. The corresponding
2015 May 06
9
[PATCH RFC 0/7] vhost: cross-endian support (vhost-net only)
Hi, This series allows QEMU to use vhost with legacy virtio devices when host and target don't have the same endianness. Only network devices are covered for the moment. I had already posted a series some monthes ago but it never got reviewed. Moreover, the underlying kernel support was entirely re-written and is still waiting to be applied by Michael. I hence post as RFC. The corresponding
2023 Feb 22
0
[PATCH v2 07/13] vdpa: add vdpa net migration state notifier
..."standard-headers/linux/virtio_net.h" > #include "monitor/monitor.h" > +#include "migration/misc.h" > #include "hw/virtio/vhost.h" > > /* Todo:need to add the multiqueue support here */ > typedef struct VhostVDPAState { > NetClientState nc; > struct vhost_vdpa vhost_vdpa; > + Notifier migration_state; > VHostNetState *vhost_net; > > /* Control commands shadow buffers */ > @@ -241,10 +243,79 @@ static VhostVDPAState *vhost_vdpa_net_first_nc_vdpa(VhostVDPAState *s) > return DO_UPCAS...
2023 Mar 06
0
[PATCH v4 12/15] vdpa: block migration if device has unsupported features
...t;> > > >>>> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c > > >>>> index 4f983df000..094dc1c2d0 100644 > > >>>> --- a/net/vhost-vdpa.c > > >>>> +++ b/net/vhost-vdpa.c > > >>>> @@ -795,7 +795,8 @@ static NetClientState *net_vhost_vdpa_init(NetClientState *peer, > > >>>> int nvqs, > > >>>> bool is_datapath, > > >>>> bool svq, > > &...
2014 Dec 12
2
[PATCH RFC v6 05/20] virtio: support more feature bits
...} > > -static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) > +static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features) > { > VirtIONet *n = VIRTIO_NET(vdev); > int i; > @@ -1036,7 +1036,7 @@ static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t > return -1; > error_report("virtio-net unexpected empty queue: " > "i %zd mergeable %d offset %zd, size %zd, " > - "guest hdr len %zd, host hdr len %zd guest f...
2014 Dec 12
2
[PATCH RFC v6 05/20] virtio: support more feature bits
...} > > -static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) > +static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features) > { > VirtIONet *n = VIRTIO_NET(vdev); > int i; > @@ -1036,7 +1036,7 @@ static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t > return -1; > error_report("virtio-net unexpected empty queue: " > "i %zd mergeable %d offset %zd, size %zd, " > - "guest hdr len %zd, host hdr len %zd guest f...
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...n features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1e214b5..fcfc95f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && !get_vhost_net(nc->peer)) { + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) { return features; } -- 1.7.9.5
2014 Nov 26
0
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 1e214b5..fcfc95f 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, > VirtIONet *n = VIRTIO_NET(vdev); > NetClientState *nc = qemu_get_queue(n->nic); > > + if (index == 1 && !get_vhost_net(nc->peer)) { > + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); > + } > + > if (index > 0) { > return features; > } > -- > 1.7.9.5
2014 Dec 11
0
[PATCH RFC v6 16/20] virtio-net: support longer header
...static int peer_has_ufo(VirtIONet *n) return n->has_ufo; } -static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs) +static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs, + int version_1) { int i; NetClientState *nc; n->mergeable_rx_bufs = mergeable_rx_bufs; - n->guest_hdr_len = n->mergeable_rx_bufs ? - sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); + if (version_1) { + n->guest_hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + } else...
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...n features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1e214b5..fcfc95f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && !get_vhost_net(nc->peer)) { + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) { return features; } -- 1.7.9.5
2014 Dec 11
0
[PATCH RFC v6 16/20] virtio-net: support longer header
...static int peer_has_ufo(VirtIONet *n) return n->has_ufo; } -static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs) +static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs, + int version_1) { int i; NetClientState *nc; n->mergeable_rx_bufs = mergeable_rx_bufs; - n->guest_hdr_len = n->mergeable_rx_bufs ? - sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); + if (version_1) { + n->guest_hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + } else...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...rn features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 67f91c0..4b75105 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && get_vhost_net(nc->peer)) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 80efe88...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...rn features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 67f91c0..4b75105 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && get_vhost_net(nc->peer)) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 80efe88...
2014 Dec 12
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...oth > > host and guest features to 64, which should suffice for a while. > > > > vhost and migration have been ignored for now. > > > > Signed-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> > > @@ -1036,7 +1036,7 @@ static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t > > return -1; > > error_report("virtio-net unexpected empty queue: " > > "i %zd mergeable %d offset %zd, size %zd, " > > - "guest hdr len %zd, host...
2014 Dec 12
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...oth > > host and guest features to 64, which should suffice for a while. > > > > vhost and migration have been ignored for now. > > > > Signed-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> > > @@ -1036,7 +1036,7 @@ static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t > > return -1; > > error_report("virtio-net unexpected empty queue: " > > "i %zd mergeable %d offset %zd, size %zd, " > > - "guest hdr len %zd, host...
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); @@ -305,7 +305,7 @@ static RxFilterInfo *virtio_net_query_rxfilter(NetClientState *nc) info->multicast_table = str_list; info->vlan_table = get_vlan_table(n); - if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features)) { + if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features[0])) { info->vlan = RX_STATE_ALL;...
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); @@ -305,7 +305,7 @@ static RxFilterInfo *virtio_net_query_rxfilter(NetClientState *nc) info->multicast_table = str_list; info->vlan_table = get_vlan_table(n); - if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features)) { + if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features[0])) { info->vlan = RX_STATE_ALL;...
2014 Nov 27
1
[PATCH RFC v4 03/16] virtio: support more feature bits
...] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); @@ -305,7 +305,7 @@ static RxFilterInfo *virtio_net_query_rxfilter(NetClientState *nc) info->multicast_table = str_list; info->vlan_table = get_vlan_table(n); - if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features)) { + if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features[0])) { info->vlan = RX_STATE_ALL;...
2014 Nov 27
1
[PATCH RFC v4 03/16] virtio: support more feature bits
...] >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); @@ -305,7 +305,7 @@ static RxFilterInfo *virtio_net_query_rxfilter(NetClientState *nc) info->multicast_table = str_list; info->vlan_table = get_vlan_table(n); - if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features)) { + if (!((1 << VIRTIO_NET_F_CTRL_VLAN) & vdev->guest_features[0])) { info->vlan = RX_STATE_ALL;...