Page MenuHomeFreeBSD

bnxt_en: Add core SR-IOV infrastructure
Needs RevisionPublic

Authored by chandrakanth.patil_broadcom.com on Tue, Mar 31, 6:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 18, 7:19 AM
Unknown Object (File)
Sat, Apr 18, 7:18 AM
Unknown Object (File)
Sat, Apr 18, 5:46 AM
Unknown Object (File)
Sat, Apr 18, 5:46 AM
Unknown Object (File)
Sat, Apr 18, 5:45 AM
Unknown Object (File)
Thu, Apr 9, 1:32 PM
Unknown Object (File)
Mon, Apr 6, 10:53 PM
Unknown Object (File)
Sun, Apr 5, 10:17 PM
Subscribers
None

Details

Summary

Lay the foundational groundwork needed to enable SR-IOV Virtual Function
support on Broadcom NetXtreme-C/E adapters.
Introduce dedicated SR-IOV source and header files that define per-VF
firmware state, resource tracking, and DMA command buffers. Extend the
PF/VF data structures to hold VF arrays, firmware identifiers, and
resource reservation state. Implement VF resource allocation, firmware
configuration, and the iflib IOV callbacks so the Physical Function can
create and tear down VFs at runtime. Wire up the PCI-IOV device methods
in if_bnxt.c and update the Makefile to build the new files.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sumit.saxena_broadcom.com added inline comments.
sys/dev/bnxt/bnxt_en/bnxt.h
110

It seems Thor2/P7 based VF IDs, right ? Starting with Thor2/P7 chips, Netxtreme keyword is dropped from product name. So drop NETXTREME string from PCI IDs macro of P7.

sys/dev/bnxt/bnxt_en/bnxt_sriov.c
84

If bnxt_vf_parse_schema() returns success, vf->has_admin_mac is set to true, right ? Is there any other place we check for 'vf->has_admin_mac' ? If not, then you can drop this flag - 'has_admin_mac' and make use of return value of bnxt_vf_parse_schema() to decide if admin mac needs to be set or not.

116

Fix the indentation. At first glance, it looked like one of the parameters passed to dma_free_coherent().

131

It would be good store first and last vf_id in local variables and use them in this loop.

131

It will be good to store first and last VF IDs in the local variables and use those local variables in this loop.

This revision now requires changes to proceed.Tue, Apr 14, 6:52 AM