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.
Tags
None
Referenced Files
F81920161: D10293.diff
Tue, Dec 3, 11:23 PM
Unknown Object (File)
Mon, Nov 18, 2:23 PM
Unknown Object (File)
Sat, Nov 16, 7:21 PM
Unknown Object (File)
Sat, Nov 16, 7:18 PM
Unknown Object (File)
Fri, Nov 15, 9:01 PM
Unknown Object (File)
Fri, Nov 15, 4:03 PM
Unknown Object (File)
Fri, Nov 15, 12:07 PM
Unknown Object (File)
Fri, Nov 15, 3:08 AM
Subscribers

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 Passed
Unit
No Test Coverage
Build Status
Buildable 9123
Build 9546: 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
49

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);
129

Bracing issue, I would expect this to be:

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

Bracing issue

174

excessive bracing

187

Bracing

195

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?

235

bracing

254

As above

273

Should this be earlier?

277

bracing

296

As above

319

bracing

338

as above

361

bracing

380

as above

402

bracing

422

as above

457

bracing

515

bracing

565

bracing

619

IXGBE_ERR_INVALID_ARGUMENT is used above should they be the same?

622

0 as the value is not bool

sys/dev/ixgbe/if_fdir.c
60

0

sys/dev/ixgbe/if_ixv.c
290
== NULL
308

Long line

343

== NULL

350

formatting

392

I thought the kernel free checked this already? Same above

394

Move above free.

432

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

560

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

571

brace return

603

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

853

Indentation

889–893

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

1224–1225

brace

1328

what is the 3, need a constant?

1335

!= 0

1413

!= 0

1414

Long line.

1420

!= 0 or == 1?

1421

Long line

1650

As this always return 0 should it be a void?

1897

return not needed

sys/dev/ixgbe/if_sriov.c
282

break not needed

452

== 0

596

== 0

751

== 0

847

always returns 0, should it be a void

sys/dev/ixgbe/ix_txrx.c
90

!= 0

316

!= 0

368

Commented out code

371

!= 0

419

!= 0

sys/dev/ixgbe/ixgbe_api.c
1706

!= NULL

sys/dev/ixgbe/ixgbe_common.c
424

bracing

433

!= 0

446

bracing

1194

bracing more below.

sys/dev/ixgbe/ixgbe_x550.c
2809

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.