Page MenuHomeFreeBSD

bnxt: Add support for Flow control setting using sysctl
ClosedPublic

Authored by bhargava.marreddy_broadcom.com on Oct 6 2017, 6:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 9:09 PM
Unknown Object (File)
Mar 19 2024, 2:45 PM
Unknown Object (File)
Mar 19 2024, 2:45 PM
Unknown Object (File)
Mar 19 2024, 4:41 AM
Unknown Object (File)
Mar 19 2024, 2:37 AM
Unknown Object (File)
Feb 8 2024, 10:03 PM
Unknown Object (File)
Dec 24 2023, 2:00 PM
Unknown Object (File)
Dec 24 2023, 1:56 PM
Subscribers

Details

Summary

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

Description:-
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

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?

Thanks

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

Minor changes.

sys/dev/bnxt/bnxt.h
214

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

298

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

sys/dev/bnxt/bnxt_sysctl.c
1328

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?

sys/dev/bnxt/if_bnxt.c
2089

Why the extra blank line?

This revision now requires changes to proceed.Oct 23 2017, 5:08 PM
bhargava.marreddy_broadcom.com added inline comments.
sys/dev/bnxt/bnxt.h
214

Taken care.

298

Taken care.

sys/dev/bnxt/bnxt_sysctl.c
1328

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.

sys/dev/bnxt/if_bnxt.c
2089

Taken care.

bhargava.marreddy_broadcom.com marked 4 inline comments as done.
bhargava.marreddy_broadcom.com 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.