svn commit: r341194 - head/sys/dev/sfxge/common

Andrew Rybchenko arybchik at FreeBSD.org
Thu Nov 29 06:43:39 UTC 2018


Author: arybchik
Date: Thu Nov 29 06:43:34 2018
New Revision: 341194
URL: https://svnweb.freebsd.org/changeset/base/341194

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

Modified:
  head/sys/dev/sfxge/common/efsys.h
  head/sys/dev/sfxge/common/efx_check.h
  head/sys/dev/sfxge/common/efx_mcdi.c

Modified: head/sys/dev/sfxge/common/efsys.h
==============================================================================
--- head/sys/dev/sfxge/common/efsys.h	Thu Nov 29 06:43:23 2018	(r341193)
+++ head/sys/dev/sfxge/common/efsys.h	Thu Nov 29 06:43:34 2018	(r341194)
@@ -287,6 +287,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, bus_dmamap_t ma
 
 #define	EFSYS_OPT_TUNNEL 0
 
+#define	EFSYS_OPT_FW_SUBVARIANT_AWARE 0
+
 /* ID */
 
 typedef struct __efsys_identifier_s	efsys_identifier_t;

Modified: head/sys/dev/sfxge/common/efx_check.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_check.h	Thu Nov 29 06:43:23 2018	(r341193)
+++ head/sys/dev/sfxge/common/efx_check.h	Thu Nov 29 06:43:34 2018	(r341194)
@@ -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 */

Modified: head/sys/dev/sfxge/common/efx_mcdi.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_mcdi.c	Thu Nov 29 06:43:23 2018	(r341193)
+++ head/sys/dev/sfxge/common/efx_mcdi.c	Thu Nov 29 06:43:34 2018	(r341194)
@@ -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);
 


More information about the svn-src-head mailing list