Files
src/sys/modules/bnxt/bnxt_en/Makefile
T
Chandrakanth Patil f2f831b2c1 bnxt_en: Add core SR-IOV infrastructure
Introduce the foundational building blocks for SR-IOV Virtual Function
support on Broadcom NetXtreme-C/E adapters.

* Add bnxt_sriov.h: defines the extended bnxt_vf_info structure (per-VF
  firmware FID, MAC addresses, VLAN, flags, DMA command buffers, resource
  counts), the bnxt_resc_map helper, flag macros (BNXT_VF_TRUST,
  BNXT_VF_SPOOFCHK, etc.), and prototypes for all SR-IOV functions.

* Add bnxt_sriov.c: implements the SR-IOV attachment sequence
  (bnxt_sriov_attach), the iflib IOV callbacks (bnxt_iov_init,
  bnxt_iov_uninit, bnxt_iov_vf_add), VF resource allocation and
  firmware configuration helpers (bnxt_alloc_vf_resources,
  bnxt_cfg_hw_sriov, bnxt_hwrm_func_vf_resc_cfg, bnxt_hwrm_func_buf_rgtr,
  bnxt_hwrm_func_vf_resource_free), and the per-VF parameter helper.

* Extend bnxt.h: include bnxt_sriov.h; extend bnxt_pf_info with VF-
  tracking fields (vf array, firmware FID/MAC, resource-reservation
  strategy, DMA page management, sysctl context); replace the upstream
  bnxt_vf_info stub with the full definition from bnxt_sriov.h; extend
  bnxt_func_qcfg with allocation counters required by the VF resource
  configuration path; add vf_resc_cfg_input and sriov_lock to bnxt_softc.

* Update Makefile to build bnxt_sriov.c and include bnxt_sriov.h.

* Wire up PCI-IOV device methods (pci_iov_init / pci_iov_uninit /
  pci_iov_add_vf) and iflib IOV callbacks (ifdi_iov_init / ifdi_iov_uninit
  / ifdi_iov_vf_add) in if_bnxt.c; call bnxt_sriov_attach() from
  bnxt_attach_post() on P5+ Physical Functions.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56197
2026-04-28 06:16:16 +00:00

21 lines
539 B
Makefile

.PATH: ${SRCTOP}/sys/dev/bnxt/bnxt_en
KMOD = if_bnxt
SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h ifdi_if.h
SRCS += opt_inet.h opt_inet6.h opt_rss.h
SRCS += bnxt_txrx.c if_bnxt.c
SRCS += bnxt_hwrm.c
SRCS += bnxt_sysctl.c
SRCS += bnxt_mgmt.c
SRCS += bnxt_dcb.c bnxt_dcb.h
SRCS += bnxt_auxbus_compat.c bnxt_auxbus_compat.h
SRCS += bnxt_sriov.c bnxt_sriov.h
SRCS += bnxt_ulp.c bnxt_ulp.h
SRCS += ${LINUXKPI_GENSRCS}
CFLAGS+= -DIFLIB
CFLAGS+= -I${SRCTOP}/sys/ofed/include
CFLAGS+= ${LINUXKPI_INCLUDES}
.include <bsd.kmod.mk>