Page MenuHomeFreeBSD

Fix an off-by-one error, d_unit starts at 0.
AbandonedPublic

Authored by andrew on Feb 20 2016, 5:33 PM.

Details

Summary

This fixes netbooting on ThunderX. I haven't tested it anywhere else.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 2587
Build 2604: arc lint + arc unit

Event Timeline

andrew updated this revision to Diff 13546.Feb 20 2016, 5:33 PM
andrew retitled this revision from to Fix an off-by-one error, d_unit starts at 0..
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
emaste added a reviewer: smh.Feb 20 2016, 6:24 PM
smh requested changes to this revision.Feb 20 2016, 7:42 PM
smh edited edge metadata.
smh added inline comments.
sys/boot/efi/libefi/efinet.c
104

Its very hard for someone to make this mistake, so even though this seems right, it would be good understand why it was like this.

314

This reverts r295210 which will cause an issue.

This revision now requires changes to proceed.Feb 20 2016, 7:42 PM
andrew added inline comments.Feb 21 2016, 6:45 PM
sys/boot/efi/libefi/efinet.c
104

It was added in rS277943. Based on the commit message I still think it's wrong.

314

In the report that led to rS295210 there was only an issue on interface 1 and 2, not interface 0. I suspect the above will fix the issue. The reported is listed as a reviewer on this patch so it can be tested before being committed.

From my reading of the grub efi network driver code It looks like it depends on the exclusive flag so I would expect it to just be an issue where we were trying to use the wrong handle.

This current diff doesn't change netbooting for me, it's even worse because as it can't open the network device in exclusive mode it cannot netboot.
Andrew sent me this patch to test instead : http://www.pastebin.ca/3379018
This works for netbooting my HP laptop and definitly increase the speed.

emaste added inline comments.Mar 29 2016, 6:38 PM
sys/boot/efi/libefi/efinet.c
104

Indeed, PR 202097 reports that rS277943 broke PXE booting.

emaste requested changes to this revision.Mar 29 2016, 8:02 PM
emaste edited edge metadata.

@andrew has an updated patch in progress

andrew abandoned this revision.Jun 2 2016, 12:13 PM
andrew added a subscriber: jhb.

Not needed, @jhb fixed this in rS300810