Page MenuHomeFreeBSD

ixgbe(4): Update HEAD (p2) to 3.2.12-k
AbandonedPublic

Authored by cramerj_intel.com on Apr 6 2017, 4:58 AM.

Details

Reviewers
scottl
sbruno
gnn
adrian
smh
Group Reviewers
Intel Networking
Summary

iflib-enabled ixgbe driver update, including:

  • Initial iflib conversion provided by mmacy & sbruno (D5213)
  • Support for X550EM devices.
  • Support for Bypass adapters.
  • Flow Director code moved to separate files
  • SR-IOV code moved to separate files
Test Plan

Compile-tested with minimal touch-testing for the PF driver (none for VF). Respectfully request waiting for Jeff's team to perform a validation pass before committing.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 9891
Build 10326: arc lint + arc unit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
  • Moved code around to match if_ix.c and/or the OOT driver
  • Wrapped KTR code with ifdef for those using GENERIC-NODEBUG
  • Updated interrupt setup/servicing/detection to match OOT. This fixes the issue of the interface not coming back up after unplugging/re-plugging in the module/cable.
smh requested changes to this revision.Apr 11 2017, 8:47 AM

Wow that's a lot of changes.

Done an initial pass, mostly style nits but would be nice to get them fixed.

sys/dev/ixgbe/if_bypass.c
48

Might be nice to extract the while loop to a little helper so you can do:

atomic_cmpset_int_ensure(&adapter->bypass.low, 0, 1, 3000);
128

Bracing issue, I would expect this to be:

if ((error = hw->mac.ops.bypass_rw(hw, cmd, &version)) != 0)
132

Bracing issue

173

excessive bracing

186

Bracing

194

Why the delay? If ixgbe_bypass_mutex_clear needs time to settle then would it not be better for it to do that instead of the caller?

234

bracing

253

As above

272

Should this be earlier?

276

bracing

295

As above

318

bracing

337

as above

360

bracing

379

as above

401

bracing

421

as above

456

bracing

514

bracing

564

bracing

618

IXGBE_ERR_INVALID_ARGUMENT is used above should they be the same?

621

0 as the value is not bool

sys/dev/ixgbe/if_fdir.c
59

0

sys/dev/ixgbe/if_ixv.c
293
== NULL
311

Long line

376

== NULL

383

formatting

425

I thought the kernel free checked this already? Same above

427

Move above free.

435

does this return a bool or an int if int != 0 check.

566

Given end only does return (error); just do that here and then return (0); at the end as that makes it clearer whats happening

577

brace return

609

return (EINVAL); and then return (0); at the end eliminating the else and error var makes the flow clearer

851

Indentation

887–891

Change to an if and return (0) then followed by the default case to make flow clearer.

1202

no need for return on void func

1230

brace

1355

what is the 3, need a constant?

1362

!= 0

1440

!= 0

1441

Long line.

1447

!= 0 or == 1?

1448

Long line

1664

As this always return 0 should it be a void?

1919

return not needed

sys/dev/ixgbe/if_sriov.c
281

break not needed

451

== 0

595

== 0

750

== 0

846

always returns 0, should it be a void

sys/dev/ixgbe/ix_txrx.c
89

!= 0

315

!= 0

367

Commented out code

370

!= 0

418

!= 0

sys/dev/ixgbe/ixgbe_api.c
1705

!= NULL

sys/dev/ixgbe/ixgbe_common.c
423

bracing

432

!= 0

446

bracing

1193

bracing more below.

sys/dev/ixgbe/ixgbe_x550.c
2808

Return early to avoid all the indentation?

This revision now requires changes to proceed.Apr 11 2017, 8:47 AM
cramerj_intel.com edited edge metadata.
  • Fixed VF driver.
  • Another attempt at fixing 2.5G reporting.
  • Building the drivers fails because of the malloc-type change I performed in a previous commit. Reverting that change.
  • Fixed Report Status accounting not being reset when interface down/up'd.
  • Applied same ring accounting bug fix to ixv as was committed to the PF driver in previous commit.
  • Modified ixv to indicate that we don't support full frame sizes when VLANs are enabled if the hardware is 82599 and jumbo frames is disabled.
  • Fixed some panics when using VF driver. The VF driver still doesn't work, however.
  • Removed code that is already performed in the iflib layer. This should help Tx function in the VF driver.
  • Fixed updating OS stats issue in VF driver.

Another review will be created shortly to fit on top of D11232.