search for: qemu_format_nic_info_str

Displaying 20 results from an estimated 45 matches for "qemu_format_nic_info_str".

2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...; n->mac_table.first_multi = 0; > n->mac_table.multi_overflow = 0; > n->mac_table.uni_overflow = 0; > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > memset(n->vlans, 0, MAX_VLAN >> 3); > } > > So device seems to lose all state, you have to re-program it. Oh, indeed! The guest does not reset its state, so it might be out of sync with the host after the operation. Was this not an...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...; n->mac_table.first_multi = 0; > n->mac_table.multi_overflow = 0; > n->mac_table.uni_overflow = 0; > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > memset(n->vlans, 0, MAX_VLAN >> 3); > } > > So device seems to lose all state, you have to re-program it. Oh, indeed! The guest does not reset its state, so it might be out of sync with the host after the operation. Was this not an...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...t; > n->mac_table.multi_overflow = 0; >> > n->mac_table.uni_overflow = 0; >> > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >> > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >> > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >> > memset(n->vlans, 0, MAX_VLAN >> 3); >> > } >> > >> > So device seems to lose all state, you have to re-program it. >> >> Oh, indeed! The guest does not reset its state, so it might >> be o...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...t; > n->mac_table.multi_overflow = 0; >> > n->mac_table.uni_overflow = 0; >> > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >> > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >> > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >> > memset(n->vlans, 0, MAX_VLAN >> 3); >> > } >> > >> > So device seems to lose all state, you have to re-program it. >> >> Oh, indeed! The guest does not reset its state, so it might >> be o...
2013 Jan 17
1
[QEMU PATCH v3] virtio-net: introduce a new macaddr control
...cpy(&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)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(&n->nic->nc, n->mac); } @@ -349,6 +350,13 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; + if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET && elem->out_num == 2 && + elem->out_sg[1].iov_len == E...
2013 Jan 17
1
[QEMU PATCH v3] virtio-net: introduce a new macaddr control
...cpy(&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)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(&n->nic->nc, n->mac); } @@ -349,6 +350,13 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; + if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET && elem->out_num == 2 && + elem->out_sg[1].iov_len == E...
2017 Oct 17
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...> > > > > n->mac_table.uni_overflow = 0; > > > > > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > > > > > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > > > > > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > > > > > memset(n->vlans, 0, MAX_VLAN >> 3); > > > > > } > > > > > > > > > > So device seems to lose all state, you have to re-program it. > > > > Oh, indeed! The guest doe...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
>> +static int virtnet_reset(struct virtnet_info *vi) >> +{ >> + struct virtio_device *dev = vi->vdev; >> + int ret; >> + >> + virtio_config_disable(dev); >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED; >> + virtnet_freeze_down(dev, true); >> + remove_vq_common(vi); >> +
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
>> +static int virtnet_reset(struct virtnet_info *vi) >> +{ >> + struct virtio_device *dev = vi->vdev; >> + int ret; >> + >> + virtio_config_disable(dev); >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED; >> + virtnet_freeze_down(dev, true); >> + remove_vq_common(vi); >> +
2017 Oct 16
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...gt;mac_table.in_use = 0; n->mac_table.first_multi = 0; n->mac_table.multi_overflow = 0; n->mac_table.uni_overflow = 0; memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); memset(n->vlans, 0, MAX_VLAN >> 3); } So device seems to lose all state, you have to re-program it. > > Also, it seems that LINK_ANNOUNCE requests will get ignored > > even if they got set before the reset, leading to downtime. >...
2014 Dec 11
0
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
...emcpy(&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)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); -- 1.7.9.5
2014 Dec 11
0
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
...emcpy(&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)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); -- 1.7.9.5
2017 Oct 17
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...t;mac_table.multi_overflow = 0; >>>> n->mac_table.uni_overflow = 0; >>>> memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >>>> memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >>>> qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >>>> memset(n->vlans, 0, MAX_VLAN >> 3); >>>> } >>>> >>>> So device seems to lose all state, you have to re-program it. >>> Oh, indeed! The guest does not reset its state, so it might >&...
2017 Oct 16
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...st_multi = 0; > > n->mac_table.multi_overflow = 0; > > n->mac_table.uni_overflow = 0; > > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > > memset(n->vlans, 0, MAX_VLAN >> 3); > > } > > > > So device seems to lose all state, you have to re-program it. > > Oh, indeed! The guest does not reset its state, so it might > be out of sync with the host af...
2017 Dec 28
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...t; > > n->mac_table.uni_overflow = 0; >> > > > > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >> > > > > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >> > > > > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >> > > > > memset(n->vlans, 0, MAX_VLAN >> 3); >> > > > > } >> > > > > >> > > > > So device seems to lose all state, you have to re-program it. >> > > > Oh, in...
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
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
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
..., 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->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)) { +...