<div dir="ltr"><div>Hi Christian,</div><div><br></div><div>Thank you for the suggestion, I'll try to report this to google.</div><div><br></div><div>I found that the cause of this issue is because GCE's VIRTIO_PCI_QUEUE_NUM is 4096, which is larger than iPXE's MAX_QUEUE_NUM (256).</div><div><br></div><div><a href="https://git.ipxe.org/ipxe.git/blob/26050fd4c87c50503d5bd573b2ec91703676e211:/src/drivers/bus/virtio-pci.c#l43">https://git.ipxe.org/ipxe.git/blob/26050fd4c87c50503d5bd573b2ec91703676e211:/src/drivers/bus/virtio-pci.c#l43</a></div><div><a href="https://git.ipxe.org/ipxe.git/blob/26050fd4c87c50503d5bd573b2ec91703676e211:/src/include/ipxe/virtio-ring.h#l24">https://git.ipxe.org/ipxe.git/blob/26050fd4c87c50503d5bd573b2ec91703676e211:/src/include/ipxe/virtio-ring.h#l24</a></div><div><br></div><div><br></div><div>IIUC this issue will be resolved if GCE supports virtio 1.0, which would allow iPXE to use custom queue num smaller than the virtio device's max value.</div><div><br></div><div>However, it would be great if iPXE can support setting MAX_QUEUE_NUM to 4096 (via `config/general.h`, probably).</div><div><br></div><div>Actually I tried to set MAX_QUEUE_NUM to 4096 and got virtnet_open_legacy() succeeded, but it still doesn't work:</div><div><br></div><div> iPXE> dhcp</div><div> DHCP 0x120e44 entering discovery state</div><div> Configuring (net0 42:01:0a:92:00:0a)...DHCP 0x120e44 DHCPDISCOVER</div><div> DHCP 0x120e44 DHCPOFFER from <a href="http://169.254.169.254:67">169.254.169.254:67</a> for 10.146.0.10</div><div> .DHCP 0x120e44 DHCPDISCOVER</div><div> ..DHCP 0x120e44 entering request state</div><div> DHCP 0x120e44 DHCPREQUEST to <a href="http://169.254.169.254:67">169.254.169.254:67</a> for 10.146.0.10</div><div> DHCP 0x120e44 DHCPREQUEST to <a href="http://169.254.169.254:67">169.254.169.254:67</a> for 10.146.0.10</div><div> .DHCP 0x120e44 DHCPREQUEST to <a href="http://169.254.169.254:67">169.254.169.254:67</a> for 10.146.0.10</div><div> .DHCP 0x120e44 DHCPREQUEST to <a href="http://169.254.169.254:67">169.254.169.254:67</a> for 10.146.0.10</div><div> ...DHCP 0x120e44 DHCPREQUEST to <a href="http://169.254.169.254:67">169.254.169.254:67</a> for 10.146.0.10</div><div> ....... No configuration methods succeeded (<a href="http://ipxe.org/040ee119">http://ipxe.org/040ee119</a>)</div><div> iPXE> </div><div><br></div><div>I haven't captured DHCP packets (because I'm unsure how to do so in GCE's fully managed DHCP server), but I guess DHCPACK is actually sent from the DHCP server but somehow iPXE missed it.</div><div><br></div><div>I'd appreciate if anyone can support me to set MAX_QUEUE_NUM to 4096.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-14 16:19 GMT+09:00 Christian Nilsson <span dir="ltr"><<a href="mailto:nikize@gmail.com" target="_blank">nikize@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You might want to report this to google as well if you haven't already.<br>
<div><div class="h5"><br>
On Wed, Dec 14, 2016 at 7:16 AM, Akihiro Suda <<a href="mailto:suda.kyoto@gmail.com">suda.kyoto@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I tried to boot iPXE on a Google Compute Engine instance, but the virtio<br>
> driver doesn't work because virtnet_open_legacy() fails to find virtqueues.<br>
><br>
> Please let me know what I can do for providing further information to debug<br>
> the issue.<br>
><br>
> The serial console output with "DEBUG=virtio-net" is as follows:<br>
><br>
> iPXE initialising devices...Common virtio capability not found!<br>
> VIRTIO-NET 0xdf584 busaddr=0000:00:04.0 ioaddr=0xc040 irq=11<br>
> VIRTIO-NET 0xdf584 mac=42:01:0a:92:00:0a<br>
> ok<br>
><br>
> iPXE 1.0.0+ (26050) -- Open Source Network Boot Firmware --<br>
> <a href="http://ipxe.org" rel="noreferrer" target="_blank">http://ipxe.org</a><br>
> Features: DNS HTTP iSCSI TFTP SRP AoE ELF MBOOT PXE bzImage Menu PXEXT<br>
> iPXE> ifstat<br>
> net0: 42:01:0a:92:00:0a using virtio-net on 0000:00:04.0 (closed)<br>
> [Link:up, TX:0 TXE:0 RX:0 RXE:0]<br>
> iPXE> dhcp<br>
> VIRTIO-NET 0xdf584 cannot register queue 0<br>
> Could not open net0: No such file or directory<br>
> (<a href="http://ipxe.org/2d5c403b" rel="noreferrer" target="_blank">http://ipxe.org/2d5c403b</a>)<br>
> iPXE><br>
><br>
><br>
> This ENOENT is raised from virtnet_open_legacy():<br>
> <a href="https://git.ipxe.org/ipxe.git/blob/26050fd4c87c50503d5bd573b2ec91703676e211:/src/drivers/net/virtio-net.c#l205" rel="noreferrer" target="_blank">https://git.ipxe.org/ipxe.git/<wbr>blob/<wbr>26050fd4c87c50503d5bd573b2ec91<wbr>703676e211:/src/drivers/net/<wbr>virtio-net.c#l205</a><br>
><br>
><br>
> I also tested some previous commits, but all of them failed, so the issue is<br>
> not a regression in some recent commit:<br>
><br>
> * 26050fd (Dec 8, 2016): the last commit when I tested<br>
> * 7b499f8 (Apr 11, 2016): the last commit without support for virtio 1.0<br>
> * e4419ff (Jul 2, 2010): the first commit with the "native iPXE driver"<br>
> (The commit date is older than 232c208, but actually newer than 232c208)<br>
> * 232c208 (Jul 11, 2010): the last commit without the "native iPXE driver".<br>
> The error message is "ERROR: queue size 4096 > 512", "Cannot register queue<br>
> #0"<br>
><br>
><br>
> Regards,<br>
><br>
> Akihiro Suda<br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> ipxe-devel mailing list<br>
> <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
> <a href="https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel" rel="noreferrer" target="_blank">https://lists.ipxe.org/<wbr>mailman/listinfo.cgi/ipxe-<wbr>devel</a><br>
><br>
</blockquote></div><br></div>