Page MenuHomeFreeBSD

bnxt: Add support for Flow control setting using sysctl

Authored by on Oct 6 2017, 6:27 AM.



Created sysctl node dev.bnxt.0.fc with following options.

A. dev.bnxt.0.fc.autoneg
B. dev.bnxt.0.fc.rx
C. dev.bnxt.0.fc.tx

dev.bnxt.0.fc: flow ctrl
dev.bnxt.0.fc.autoneg: Enable or Disable Autoneg Flow Ctrl: 0 / 1
dev.bnxt.0.fc.rx: Enable or Disable Tx Flow Ctrl: 0 / 1
dev.bnxt.0.fc.tx: Enable or Disable Tx Flow Ctrl: 0 / 1

Test Plan

Verified using Stratus 100G NIC, able to verify pause_rx, pause_tx & pause_autoneg by turning on / off individually.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fixed issue of double notification (in the kernel logs) after changing flow control setting in case of pause_autoneg.

Sean, Stephen,

Can you please review the patch and commit if no changes required?


shurd requested changes to this revision.Oct 23 2017, 5:08 PM

Minor changes.

214 ↗(On Diff #33736)

Why not put the 'A' in the macro name? ie: BNXT_IS_FLOW_CTRL_CHANGED()

298 ↗(On Diff #33736)

Why are these uint16_t? It seems they are all used as bools.

1328 ↗(On Diff #33736)

Is the word "pause" required in these names? If so, perhaps it should be in the partent oid name since it's a prefix to all values under it?

2089 ↗(On Diff #33736)

Why the extra blank line?

This revision now requires changes to proceed.Oct 23 2017, 5:08 PM added inline comments.
214 ↗(On Diff #33736)

Taken care.

298 ↗(On Diff #33736)

Taken care.

1328 ↗(On Diff #33736)

Taken care by removing prefix pause_.
But not added it in parent oid as it is defined as "fc". hope this should be fine. Please let me know.

2089 ↗(On Diff #33736)

Taken care. marked 4 inline comments as done. edited the summary of this revision. (Show Details)

Taken care of review comments.

This revision is now accepted and ready to land.Oct 24 2017, 7:31 PM
This revision was automatically updated to reflect the committed changes.