sfxge(4): add firmware subvariant aware driver option
FW subvariants allow to tweak NIC global features. For example, if no drivers require checksumming on transmit, it may be disabled in FW to increase packet rate. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18225
This commit is contained in:
parent
6da6b6c758
commit
e0b3c2cc1a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341194
@ -287,6 +287,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, bus_dmamap_t map,
|
||||
|
||||
#define EFSYS_OPT_TUNNEL 0
|
||||
|
||||
#define EFSYS_OPT_FW_SUBVARIANT_AWARE 0
|
||||
|
||||
/* ID */
|
||||
|
||||
typedef struct __efsys_identifier_s efsys_identifier_t;
|
||||
|
@ -377,4 +377,11 @@
|
||||
# endif
|
||||
#endif /* EFSYS_OPT_TUNNEL */
|
||||
|
||||
#if EFSYS_OPT_FW_SUBVARIANT_AWARE
|
||||
/* Advertise that the driver is firmware subvariant aware */
|
||||
# if !(EFSYS_OPT_MEDFORD2)
|
||||
# error "FW_SUBVARIANT_AWARE requires MEDFORD2"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_EFX_CHECK_H */
|
||||
|
@ -1303,7 +1303,9 @@ efx_mcdi_drv_attach(
|
||||
* FULL_FEATURED datapath firmware type first and fall backs to
|
||||
* DONT_CARE datapath firmware type if MC_CMD_DRV_ATTACH fails.
|
||||
*/
|
||||
MCDI_IN_SET_DWORD(req, DRV_ATTACH_IN_NEW_STATE, attach ? 1 : 0);
|
||||
MCDI_IN_POPULATE_DWORD_2(req, DRV_ATTACH_IN_NEW_STATE,
|
||||
DRV_ATTACH_IN_ATTACH, attach ? 1 : 0,
|
||||
DRV_ATTACH_IN_SUBVARIANT_AWARE, EFSYS_OPT_FW_SUBVARIANT_AWARE);
|
||||
MCDI_IN_SET_DWORD(req, DRV_ATTACH_IN_UPDATE, 1);
|
||||
MCDI_IN_SET_DWORD(req, DRV_ATTACH_IN_FIRMWARE_ID, enp->efv);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user