Try to extract the RFC1048 data from PXE
ClosedPublic

Authored by kczekirda on Mar 1 2017, 5:47 PM.

Details

Summary

Try to extract the RFC1048 data from PXE. If we get enough info we can skip the bootp().
It removes unnecessary DHCP request from pxeloader.

I'm not sure if it should be a default, maybe somebody wants to give a different answer from DHCP, depends on stage of netboot on the same machine.

Initiated by: Matthew Dillon
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=95542+0+archive/2003/freebsd-hackers/20030223.freebsd-hackers
Improved by: oshogbo
Sponsored by: Oktawave

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kczekirda retitled this revision from to Try to extract the RFC1048 data from PXE.Mar 1 2017, 5:47 PM
kczekirda updated this object.
kczekirda edited the test plan for this revision. (Show Details)
kczekirda added reviewers: oshogbo, bapt, tsoome, glebius, network.
gnn accepted this revision.Mar 2 2017, 4:38 PM
gnn added a reviewer: gnn.
This revision is now accepted and ready to land.Mar 2 2017, 4:38 PM
smh requested changes to this revision.Mar 2 2017, 5:14 PM
smh added a reviewer: smh.
smh added a subscriber: smh.
smh added inline comments.
/usr/src/lib/libstand/bootp.h
151 ↗(On Diff #25843)

Is this needed as it looks like its to ensure its only included once by the _BOOTP_H_ should achieve that

/usr/src/sys/boot/i386/libi386/pxe.c
282 ↗(On Diff #25843)

The formatting here is a bit odd, remove the "." ?

299 ↗(On Diff #25843)

Should this only be output under verbose boot or pxe_debug?

This revision now requires changes to proceed.Mar 2 2017, 5:14 PM
kczekirda updated this revision to Diff 25913.Mar 2 2017, 8:40 PM
kczekirda marked 3 inline comments as done.
kczekirda updated this revision to Diff 25914.Mar 2 2017, 8:50 PM
smh requested changes to this revision.Mar 2 2017, 10:02 PM
smh added inline comments.
/usr/src/sys/boot/i386/libi386/pxe.c
300 ↗(On Diff #25914)

You can squash the else and your if here

This revision now requires changes to proceed.Mar 2 2017, 10:02 PM
kczekirda updated this revision to Diff 25915.Mar 2 2017, 10:17 PM
kczekirda updated this revision to Diff 25916.
kczekirda marked an inline comment as done.
smh requested changes to this revision.Mar 2 2017, 10:47 PM
smh added inline comments.
/usr/src/sys/boot/i386/libi386/pxe.c
300 ↗(On Diff #25916)

Looks like you have a brace miss match here now

This revision now requires changes to proceed.Mar 2 2017, 10:47 PM
kczekirda updated this revision to Diff 25917.Mar 2 2017, 11:14 PM
kczekirda marked an inline comment as done.
smh added inline comments.Mar 3 2017, 6:52 AM
/usr/src/sys/boot/i386/libi386/pxe.c
296 ↗(On Diff #25917)

Didn't spot this before but does this need a more explicit test as this method returns and isn't not a book and it's not clear what's the -1 is meant to trigger and how it's dealt with here?

smh added a comment.Mar 3 2017, 6:56 AM

book -> bool

kczekirda updated this revision to Diff 25931.Mar 3 2017, 10:26 AM
oshogbo added a comment.EditedMar 3 2017, 10:34 AM

@smh
Is it work for you now?
I have one more patch from @kczekirda so is it ready for commit?

bapt accepted this revision.Mar 3 2017, 2:33 PM
smh requested changes to this revision.Mar 3 2017, 4:32 PM
smh added inline comments.
/usr/src/sys/boot/i386/libi386/pxe.c
296 ↗(On Diff #25931)

space before the brace

This revision now requires changes to proceed.Mar 3 2017, 4:32 PM
kczekirda updated this revision to Diff 25936.Mar 3 2017, 4:40 PM
kczekirda marked 2 inline comments as done.
smh accepted this revision.Mar 4 2017, 3:55 AM
This revision is now accepted and ready to land.Mar 4 2017, 3:55 AM
This revision was automatically updated to reflect the committed changes.