Rfc,04/18 R8168: Remove Tbi Mode Support Needed For Mac
This experimental series separates drivers for PCI / PCIE NIC's and adds initial phylib support to the separated r8168 driver.
- Rfc 04/18 R8168: Remove Tbi Mode Support Needed For Macbook Pro
- Rfc 04/18 R8168: Remove Tbi Mode Support Needed For Mac Download
- Rfc 04/18 R8168: Remove Tbi Mode Support Needed For Mac Free
You can subscribe to this list. Peter Anvin wrote: gPXE is not compliant with the HTTP/1.1 specification (RFC 2616)since it lacks support for 'Transfer-Encoding: chunked'. GPXE ishowever, compliant with the HTTP/1.0 specification (RFC 1945), which does not require 'Transfer-Encoding: chunked' to be supported. The only HTTP/1.1 feature that gPXE uses is the 'Host:' header, but servers universally accept that one from HTTP/1.0 clients as an optional extension (it is obligatory for HTTP/1.1). GPXE does notfor example, appear to support connection caching. Advertising as a HTTP/1.0 client will typically make the server close the connection immediately upon sending the last data, which is actually beneficial if we aren't going to keep the connection alive anyway.
GPXE is not compliant with the HTTP/1.1 specification (RFC 2616), since it lacks support for 'Transfer-Encoding: chunked'. GPXE is, however, compliant with the HTTP/1.0 specification (RFC 1945), which does not require 'Transfer-Encoding: chunked' to be supported. The only HTTP/1.1 feature that gPXE uses is the 'Host:' header, but servers universally accept that one from HTTP/1.0 clients as an optional extension (it is obligatory for HTTP/1.1). GPXE does not, for example, appear to support connection caching. Advertising as a HTTP/1.0 client will typically make the server close the connection immediately upon sending the last data, which is actually beneficial if we aren't going to keep the connection alive anyway. src/net/tcp/http.c 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff -git a/src/net/tcp/http.c b/src/net/tcp/http.c index db92e9e.4dc1ab7 100644 - a/src/net/tcp/http.c b/src/net/tcp/http.c @@ -393,7 +393,7 @@ static void httpstep ( struct process.process ) if ( xferwindow ( &http-socket ) ) processdel ( &http-process ); if ( ( rc = xferprintf ( &http-socket, - 'GET%s%s%s HTTP/1.1 r n' + 'GET%s%s%s HTTP/1.0 r n' 'User-Agent: gPXE/' VERSION ' r n' 'Host:%s r n' ' r n', - 1.5.4.1. Michael - excellent work!
I will test and let you know of any issues. I saw hpa released a first cut at a 'merged' syslinux that includes gpxe functionality. Can I ask what your plans are with that, are you guys going to formally merge your work or will there still be a separate gpxe/syslinux? - Original Message - From: Michael Brown To: Jason Robertson Cc: etherboot-developers@. Sent: Thursday, March 27, 2008 9:56:29 AM Subject: Re: Etherboot-developers Any changes re: ProxyDHCP in main branch? On Wed, 19 Mar 2008, Jason Robertson wrote: I did a little more digging.

I think the only reason the general dev release worked was because we had a custom WDS provider that behaved a little differently from what the stock WDS provider does, so I don't think it's anything that changed with gpxe like I first thought. I saw some old threads about WDS, has anyone done any more work on this? It appears that what WDS expects (and what BIOS PXE impls do) is that when PXE client sees an offer with option 60 PXEClient, it sends another DHCPRequest back (unicast to port 4011) and sets the appropriate requested fields values. Then WDS responds with a packet that sets the boot server/file. I looked through the code and tried to figure out how to do this but quickly became befuddled.
Any plans to work on this part of the PXE spec? I've just pushed a set of changes to implement the ProxyDHCP portion of the convoluted mess that is a PXE DHCP request. I haven't implemented anything relating to Boot Server discovery etc.; it's bad enough adding just ProxyDHCP. If gPXE receives a DHCPOFFER (with or without an IP address) containing option 60 set to 'PXEClient', then it will perform an additional ProxyDHCPREQUEST phase after the usual DHCP protocol has completed. In the ProxyDHCPREQUEST phase, a DHCPREQUEST will be unicast to the ProxyDHCP server (i.e. The DHCP server ID specified in the DHCPOFFER that contained 'PXEClient') on port 4011.
The ProxyDHCP server has two seconds to respond before we give up, assume ProxyDHCP is broken, and report a successful (though ProxyDHCPless) acquisition. Bug reports welcome, preferably accompanied by a copy of the output obtained from a build with DEBUG=dhcp. Michael Looking for last minute shopping deals?
Find them fast with Yahoo! On Wed, 19 Mar 2008, Jason Robertson wrote: I did a little more digging. I think the only reason the general dev release worked was because we had a custom WDS provider that behaved a little differently from what the stock WDS provider does, so I don't think it's anything that changed with gpxe like I first thought. I saw some old threads about WDS, has anyone done any more work on this? It appears that what WDS expects (and what BIOS PXE impls do) is that when PXE client sees an offer with option 60 PXEClient, it sends another DHCPRequest back (unicast to port 4011) and sets the appropriate requested fields values. Then WDS responds with a packet that sets the boot server/file. I looked through the code and tried to figure out how to do this but quickly became befuddled.
Rfc 04/18 R8168: Remove Tbi Mode Support Needed For Macbook Pro
Any plans to work on this part of the PXE spec? I've just pushed a set of changes to implement the ProxyDHCP portion of the convoluted mess that is a PXE DHCP request. I haven't implemented anything relating to Boot Server discovery etc.; it's bad enough adding just ProxyDHCP.
If gPXE receives a DHCPOFFER (with or without an IP address) containing option 60 set to 'PXEClient', then it will perform an additional ProxyDHCPREQUEST phase after the usual DHCP protocol has completed. In the ProxyDHCPREQUEST phase, a DHCPREQUEST will be unicast to the ProxyDHCP server (i.e. The DHCP server ID specified in the DHCPOFFER that contained 'PXEClient') on port 4011.

The ProxyDHCP server has two seconds to respond before we give up, assume ProxyDHCP is broken, and report a successful (though ProxyDHCPless) acquisition. Bug reports welcome, preferably accompanied by a copy of the output obtained from a build with DEBUG=dhcp.
I have produced a first cut of integrating gPXE with PXELINUX. This builds, in addition to the usual pxelinux.0, an image called gpxelinux.0 which includes the gPXE network stack.
The result is that one can now download images via (almost) any network protocol supported by gPXE, including http. This lets one do fun things like using a CGI or PHP script for the configuration file. SAN booting (iSCSI or AoE), which is supported by gPXE, can be invoked via a small (not yet written) comboot module, which is only necessary in order to pass the appropriate command down to gPXE. Note that currently chainloading other NBPs from gpxelinux.0 is broken. This will be fixed.
In order to invoke the new functionality, you need a filename or filename prefix which is a URL, identified by the character sequence. In my test setup, I simply use DHCP option 209 (pxelinux.pathprefix) to redirect loading to my http server. Please test it out and holler when (not if) it breaks. A huge amount of effort has gotten into this, and I would like to thank specially Michael Brown of the Etherboot/gPXE project, without whom this never would have been possible.
Hi Bill, Thanks for the patches to e1000. I am in the process of updating the e1000 driver using the sourceforge e1000 project as a basis.
The SourceForge code is what the Linux kernel driver is derived from. When I have completed updating the e1000 I hope you will test it to see if it works for you. Thanks again, Marty Bill wrote: Here are some fixes for the e1000 driver that I have found necessary and tested with an 82573. The 82573 does not use E1000TXDCMDRPS for the transmit descriptor, it needs E1000TXDCMDRPS for it to set the completion bit in the descriptor which is then checked by e1000poll. If you look at the current e1000 intel driver for Linux, you will see a similar comparion to what I have added.
For the 82573, I have found that the first packet will not be transmitted 7 times in 10 when running gigabit. This drops to 3 in 10 for 100Mbit. I have found that the 82573 needs a little extra time to get up and running and have added an mdelay(400) in e1000open. This seems to fix the problem for me.
I am using gpxe to send WOL packets to a server, and found more often that not theWOL packet were not sent. I have also found in the standard gpxe config that the first DHCP packet would not be sent also.
This problem may be unique to the 82573 but I have no way to test. Agreed 0.4s is a long time, but it is only at startup. I could not figure out what the problem is. The controller would tell me it had transmitted the packet (via the done bit in the transmit descriptor), but the packet would not actually be transmitted. I suspect a problem with the startup of the PHY or something, perhaps it resets itself or something.
The problem may be specific to the 82573. Oops typo in my original message, 82543 controllers and greater use the E1000TXDCMDRS bit not the E1000TXDCMDRPS. This is documented in the Intel SDK document for the ethernet controller. In fact, the bit normally used for RPS in the older controllers is reserved in the newer ones. This is a necessary change for e1000poll to work with newer controllers.
Original Message - From: 'Michael Brown' To: 'Bill' Cc: Sent: Tuesday, March 18, 2008 12:34 AM Subject: Re: Etherboot-developers e1000 driver fixes On Mon, 17 Mar 2008, Bill wrote: Here are some fixes for the e1000 driver that I have found necessary and tested with an 82573. The 82573 does not use E1000TXDCMDRPS for the transmit descriptor, it needs E1000TXDCMDRPS for it to set the completion bit in the descriptor which is then checked by e1000poll. If you look at the current e1000 intel driver for Linux, you will see a similar comparion to what I have added. I know you weren't necessarily using the same descriptor format as the Linux driver; ought we to need this check? For the 82573, I have found that the first packet will not be transmitted 7 times in 10 when running gigabit.
This drops to 3 in 10 for 100Mbit. I have found that the 82573 needs a little extra time to get up and running and have added an mdelay(400) in e1000open. This seems to fix the problem for me. I am using gpxe to send WOL packets to a server, and found more often that not theWOL packet were not sent. I have also found in the standard gpxe config that the first DHCP packet would not be sent also.
This problem may be unique to the 82573 but I have no way to test. 0.4s is a very long delay, and Ethernet networks are not meant to be lossless; I think that losing the initial packet some of the time is acceptable.
Your setup needs to be able to survive a single lost packet anyway, so I don't think it's worth adding a large delay here just to hide the problem (which is that you're sending only a single WoL packet with no check that it has been received). Marty - any comments? On Tue, 18 Mar 2008, Jason Robertson wrote: Hi - I decided to check out the main branch from the git tree and something seems to have changed with regard to handling the PXE spec. Namely, we have a stock DHCP server and also a WDS server.

With the current dev-release it looks like gpxe basically gets the DHCP replygets the WDS reply, merges them, and happily loads the right boot file as given out by WDS. With the latest code from git, it seems to be ignoring the DHCPOffer from WDS. So it gets IP address, but no boot file. I know this is a development branch, so maybe this is just temporary or a known issue but if not does anyone know what changed?
I'm willing to look into it but don't want to waste time if someone already knows. Nothing should have changed in that area that I'm aware of. Could you build with DEBUG=dhcp and post the output? Thanks, Michael.
Hi - I decided to check out the main branch from the git tree and something seems to have changed with regard to handling the PXE spec. Namely, we have a stock DHCP server and also a WDS server. With the current dev-release it looks like gpxe basically gets the DHCP reply, gets the WDS reply, merges them, and happily loads the right boot file as given out by WDS. With the latest code from git, it seems to be ignoring the DHCPOffer from WDS. So it gets IP address, but no boot file.
Rfc 04/18 R8168: Remove Tbi Mode Support Needed For Mac Download
I know this is a development branch, so maybe this is just temporary or a known issue but if not does anyone know what changed? I'm willing to look into it but don't want to waste time if someone already knows. Thanks, Jason Be a better friend, newshound, and know-it-all with Yahoo!
Am Dienstag, den, 04:25 +0000 schrieb Michael Brown: On Mon, 17 Mar 2008, Bill wrote: Attached is a WOL routine that can be used to wake a remote server from gpxe. I put wol.c in src/usr and wol.h in src/include/usr. This is really in improved replacement of that in contrib wakeonlan wakeserver.patch. This version will no longer work since the ethtransmit routine no longer works with the newer driver arhitecture such as the e1000 driver. Please consider adding it to gpxe preferrably in the main src directory or in the contrib directory. I'm not sure I see the point of adding this to gPXE directly; there are better ways to trigger WoL (e.g.
The 'wol' command under Linux). What is the motivation for wanting this ability as part of gPXE?
Hi Michael, the first answer to this that comes to my mind is that you can trigger a server start from a client machine. Imagine a classroom of thin clients and a server that will only consume power when it is really needed. Shutting the server down automatically when no clients are powered on is easy. Preferably 'standby' (as opposed to hibernation or complete shutdown) should be used, so that the server is up in a blink. Of course that requires WOL before DHCP (or a DHCP-less solution), except when you have a separate DHCP server. In that case I admit 'wol' running from there seems a more powerful solution.
Best regards, Anselm. On Mon, 17 Mar 2008, Bill wrote: Here are some fixes for the e1000 driver that I have found necessary and tested with an 82573. The 82573 does not use E1000TXDCMDRPS for the transmit descriptor, it needs E1000TXDCMDRPS for it to set the completion bit in the descriptor which is then checked by e1000poll. If you look at the current e1000 intel driver for Linux, you will see a similar comparion to what I have added. I know you weren't necessarily using the same descriptor format as the Linux driver; ought we to need this check?
For the 82573, I have found that the first packet will not be transmitted 7 times in 10 when running gigabit. This drops to 3 in 10 for 100Mbit. I have found that the 82573 needs a little extra time to get up and running and have added an mdelay(400) in e1000open. This seems to fix the problem for me. I am using gpxe to send WOL packets to a server, and found more often that not theWOL packet were not sent. I have also found in the standard gpxe config that the first DHCP packet would not be sent also. This problem may be unique to the 82573 but I have no way to test.
0.4s is a very long delay, and Ethernet networks are not meant to be lossless; I think that losing the initial packet some of the time is acceptable. Your setup needs to be able to survive a single lost packet anyway, so I don't think it's worth adding a large delay here just to hide the problem (which is that you're sending only a single WoL packet with no check that it has been received). Marty - any comments?
On Mon, 17 Mar 2008, Bill wrote: Attached is a WOL routine that can be used to wake a remote server from gpxe. I put wol.c in src/usr and wol.h in src/include/usr. This is really in improved replacement of that in contrib wakeonlan wakeserver.patch. This version will no longer work since the ethtransmit routine no longer works with the newer driver arhitecture such as the e1000 driver. Please consider adding it to gpxe preferrably in the main src directory or in the contrib directory.
I'm not sure I see the point of adding this to gPXE directly; there are better ways to trigger WoL (e.g. The 'wol' command under Linux). What is the motivation for wanting this ability as part of gPXE?
Here are some fixes for the e1000 driver that I have found necessary and tested with an 82573. The 82573 does not use E1000TXDCMDRPS for the transmit descriptor, it needs E1000TXDCMDRPS for it to set the completion bit in the descriptor which is then checked by e1000poll. If you look at the current e1000 intel driver for Linux, you will see a similar comparion to what I have added. For the 82573, I have found that the first packet will not be transmitted 7 times in 10 when running gigabit. This drops to 3 in 10 for 100Mbit. I have found that the 82573 needs a little extra time to get up and running and have added an mdelay(400) in e1000open. This seems to fix the problem for me.
I am using gpxe to send WOL packets to a server, and found more often that not theWOL packet were not sent. I have also found in the standard gpxe config that the first DHCP packet would not be sent also. This problem may be unique to the 82573 but I have no way to test. On Mon, 17 Mar 2008, Jason Robertson wrote: 2) Is there interest in a patch (cleaned up from hack I have now) to do this? I'd prefer a more general solution, e.g. The ability to substitute in arbitrary configuration values into any command, rather than just the ability to substitute in a MAC address into a URI. OK, that would be better.
I'm rusty on my C and not all too familiar with the code, but here's what I'm thinking for a first pass. Create some kind of lookup table where you can globally register key/value pairs 2. Insert hooks in a few places to register values (maybe just MAC at first, maybe architecture, whatever, then maybe other dhcp option values later) a.) I'm not clear on best place for this. My first instinct was to just set the MAC value (for later expansion) after a successful DHCP call, but ideally it would use the same mechanism to get the 'current' interface that the rest of the code uses I guess? Modify either the system or execv call to do variable expansion in the argv list based on keys registered in lookup table Does that make any sense?
On 2a) I'm not sure how the code knows what interface to use. In autoboot, for example, I see: return bootfilename. There's no interface specified so there must be some way to get the 'current' interface without passing it around but it's not clear to me. There is already some support for named settings in core/settings.c.
Rfc 04/18 R8168: Remove Tbi Mode Support Needed For Mac Free
This allows you do something like char buf256; shownamedsetting ( &context, 'hostname', buf, sizeof ( buf ) ); and have the buffer filled with the current value of the 'hostname' setting, which will be the DHCP-supplied hostname. This code is currently used only to manipulate options stored in non-volatile options blocks (with the UI being the 'set' and 'show' commands), but the intention was always that it would become a more general mechanism. In particular, I've promised Marty that I'll make it possible to avoid DHCP altogether by typing something like: set ip 192.168.0.3 set subnet-mask 255.255.255.0 set domain-name-servers 192.168.0.1 kernel boot at the gPXE command line.
This functionality will involve some sprucing up of core/settings.c. I've just pushed a change to core/settings.c which will make adding settings expansion to system easier. Shownamedsetting will now return the length of the expanded setting, even if the buffer wasn't large enough (i.e. It does what snprintf does in terms of return values). You can therefore call len = shownamedsetting ( &context, 'hostname', NULL, 0 ); to find out the length of the hostname, prior to allocating a buffer to hold the expanded version. I'd suggest that the best starting point is to add the expansion code to system in core/exec.c, using shownamedsetting to expand any setting name found between%.% markers. That won't immediately give you what you want, but it will be a major part of the work.
On Fri, 14 Mar 2008, Marty Connor wrote: jvrobert@. Wrote: #!gpxe imgfetch -name next% imgload next imgexec next So: 1) Is there a better way to do this with stock gpxe build Yes, if you have control over your DHCP server. If so, you can use a dhcpf.conf evaluation to construct the URI based on any information available to the DHCP server (including the MAC address). The dhcp-eval manpage is a good reference here. This might be an option, but we may need to interact with various dhcp servers and corporate servers we don't have much control over. 2) Is there interest in a patch (cleaned up from hack I have now) to do this?
I'd prefer a more general solution, e.g. The ability to substitute in arbitrary configuration values into any command, rather than just the ability to substitute in a MAC address into a URI. OK, that would be better. I'm rusty on my C and not all too familiar with the code, but here's what I'm thinking for a first pass. Create some kind of lookup table where you can globally register key/value pairs 2.
Insert hooks in a few places to register values (maybe just MAC at first, maybe architecture, whatever, then maybe other dhcp option values later) a.) I'm not clear on best place for this. My first instinct was to just set the MAC value (for later expansion) after a successful DHCP call, but ideally it would use the same mechanism to get the 'current' interface that the rest of the code uses I guess?
Modify either the system or execv call to do variable expansion in the argv list based on keys registered in lookup table Does that make any sense? On 2a) I'm not sure how the code knows what interface to use. In autoboot, for example, I see: return bootfilename. There's no interface specified so there must be some way to get the 'current' interface without passing it around but it's not clear to me. Never miss a thing. Make Yahoo your home page.
On Sat, 15 Mar 2008, Geert Stappers wrote: 1) Is there a better way to do this with stock gpxe build? 2) Is there interest in a patch (cleaned up from hack I have now) to do this? For both questions: Yes, there is interest for the patch. That is the way to get it in the stock gPXE build.
Excellent projectfrom what little I?ve looked through the code it?s very clean and well written. :-) You are welcome to make it even more better. Geert, I'd appreciate it if you would refrain from speaking as though on behalf of the project when it comes to decisions on what code will be added to the stock gPXE build, since you simply do not have standing to do so.
(I am also slightly irritated that you seem to have developed a recent habit of taking credit for the gPXE codebase, when your contributions to date amount to only a handful of lines of code.) Now, if you'd like to contribute a substantial amount of code, we'd be more than happy to review and hopefully accept it!