Page MenuHomeFreeBSD

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

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



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

Diff Detail

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

Event Timeline

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)
smh requested changes to this revision.Feb 20 2016, 7:42 PM
smh edited edge metadata.
smh added inline comments.

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.


This reverts r295210 which will cause an issue.

This revision now requires changes to proceed.Feb 20 2016, 7:42 PM

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


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 :
This works for netbooting my HP laptop and definitly increase the speed.


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 added a subscriber: jhb.

Not needed, @jhb fixed this in rS300810