[gPXE] Patch to gPXE-1.0.1 UNDI code for Interrupt Vs Polling

Muralidhar.Appalla at emulex.com Muralidhar.Appalla at emulex.com
Thu Nov 18 15:03:31 EST 2010


Hi,

Problem Description:
We have noticed that gPXE UNDI code is always expecting interrupt(s) to be generated by the underlying NIC HW to process the receive path in undinet_poll() routine. This is causing problem on some of the PCI NIC controllers where though the NIC device supports IRQ and able to generate interrupts,  during PXE UNDI code some devices do not enable interrupts on their device and run in polling mode. Those devices expect upper layer UNDI drivers to poll for the receive packets instead of waiting for interrupt from the device. But in undinet_poll() routine the code checks for ISR triggered or not if not it just returns. [(please check "if (undinet_isr_triggered)" statement ) in undinet_poll()]

Solution Description:
I have attached a patch here to take care of this so that gPXE UNDI code will work on both types of devices (interrupt & polling supported devices). The patch is to check whether the device supports IRQ or not in "ServiceFlags" returned by  the API call PXENV_UNDI_GET_IFACE_INFO in undinet_probe() routine. If the underlying device supports IRQ  then enable the newly introduced flag "irq_supported" in undi_nic structure.
Later in  undinet_open() & undinet_close() routines check this flag (irq_supported) to decide to hook the interrupts or to unhook the interrupts. Also in undinet_poll() routine check whether interrupt got generated or not, only if the device supports interrupts otherwise get the packet from underlying UNDI NIC drivers by calling PXENV_UNDI_ISR using FuncFlag PXEENV_UNDI_ISR_GET_NEXT.

I am attaching here the patch for review and acceptance.

Muralidhar Appalla
Engineer Principal
2560 N.First Street
Sanjose,CA
Emulex Corporation
(408)678-3472 (work)

[cid:image001.gif at 01CB867A.2F6F8180]<http://www.emulex.com/>
[cid:image002.gif at 01CB867A.2F6F8180]<http://www.twitter.com/emulex>[cid:image003.gif at 01CB867A.2F6F8180]<http://www.friendfeed.com/emulex>[cid:image004.gif at 01CB867A.2F6F8180]<http://www.google.com/reader/shared/emulexinc>[cid:image005.gif at 01CB867A.2F6F8180]<http://www.facebook.com/pages/Emulex-Corporation/116933412473>[cid:image006.gif at 01CB867A.2F6F8180]<http://www.slideshare.net/emulex>[cid:image007.gif at 01CB867A.2F6F8180]<http://www.emulex.com/rss.xml>[cid:image008.gif at 01CB867A.2F6F8180]<http://www.youtube.com/EmulexVideo>[cid:image009.gif at 01CB867A.2F6F8180]<http://www.emulex.com/resources/blogs.html>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1720 bytes
Desc: image001.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0009.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 986 bytes
Desc: image002.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0010.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 1095 bytes
Desc: image003.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0011.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 984 bytes
Desc: image004.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0012.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.gif
Type: image/gif
Size: 952 bytes
Desc: image005.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0013.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.gif
Type: image/gif
Size: 863 bytes
Desc: image006.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0014.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.gif
Type: image/gif
Size: 1097 bytes
Desc: image007.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0015.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.gif
Type: image/gif
Size: 992 bytes
Desc: image008.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0016.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.gif
Type: image/gif
Size: 1020 bytes
Desc: image009.gif
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0017.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpxe-1.0.1.undi_intr.patch
Type: application/octet-stream
Size: 1984 bytes
Desc: gpxe-1.0.1.undi_intr.patch
Url : http://etherboot.org/pipermail/gpxe/attachments/20101118/1be52a7f/attachment-0001.obj 


More information about the gPXE mailing list