9601 Divide by zero in i40e_get_available_resources()

Review Request #1116 - Created June 19, 2018 and updated

Information
Marcel Telka
illumos-gate
master
9601
a42f565...
Reviewers
general
This fixes the num_ports calculation in the i40e driver.  Without this fix we
sometimes (at least with the hardware where I tested this on) found more
ethernet ports than we actually have (four instead of two) and this lead to
panic later in the driver.
I tested this on a hardware where the original driver paniced.  With the fix
the driver does not panic and it works properly.
Robert Mustacchi

I think this seems reasonable, but we should add a README to the main i40e directory noting our differences to the Intel common code ala uts/common/io/e1000api/README.illumos otherwise we're likely to have someone accidentally clobber this in an update. I'll see if I can follow up with Intel to update this fact.

Ken Mays
Ship It!
Simon Klinkert
Ship It!
Ken Mays
Ship It!
Loading...