netkvm: BZ#1351089: Control queue should be acked before MAC address
configuration is attempted
VIRTIO_NET_F_CTRL_MAC_ADDR feature depends on control queue availability.
Before the fix control queue was acked after MAC address was initialized.
The behaviour caused the driver to always use MAC configuration through
virtio configuration space (VIRTIO_NET_F_MAC).
@@ -712,6 +712,7 @@ NDIS_STATUS ParaNdis_InitializeContext(
pContext->bGuestAnnounceSupported = AckFeature(pContext, VIRTIO_NET_F_GUEST_ANNOUNCE);
}
+ pContext->bControlQueueSupported = AckFeature(pContext, VIRTIO_NET_F_CTRL_VQ);
InitializeMAC(pContext, CurrentMAC);
InitializeMaxMTUConfig(pContext);
@@ -738,8 +739,6 @@ NDIS_STATUS ParaNdis_InitializeContext(
if (pContext->ulPriorityVlanSetting)
pContext->MaxPacketSize.nMaxFullSizeHwTx = pContext->MaxPacketSize.nMaxFullSizeOS + ETH_PRIORITY_HEADER_SIZE;
- pContext->bControlQueueSupported = AckFeature(pContext, VIRTIO_NET_F_CTRL_VQ);
-
pContext->bMultiQueue = pContext->bControlQueueSupported && AckFeature(pContext, VIRTIO_NET_F_MQ);
if (pContext->bMultiQueue)
{
