Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Nov 2016 20:38:26 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r308313 - in stable/10/sys/dev/cxgbe: . firmware
Message-ID:  <201611042038.uA4KcQXC015511@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Nov  4 20:38:26 2016
New Revision: 308313
URL: https://svnweb.freebsd.org/changeset/base/308313

Log:
  MFC 296950,296951: Configuration updates.
  
  296950:
  cxgbe(4): Update some register settings in the default configuration
  files to match the "uwire" configuration.
  
  296951:
  cxgbe(4): Enable additional capabilities in the default configuration
  files.  All features with FreeBSD drivers of some kind are now in the
  default configuration.
  
  Sponsored by:	Chelsio Communications

Modified:
  stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt
  stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt
  stable/10/sys/dev/cxgbe/t4_main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt
==============================================================================
--- stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt	Fri Nov  4 20:32:49 2016	(r308312)
+++ stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt	Fri Nov  4 20:38:26 2016	(r308313)
@@ -10,7 +10,7 @@
 
 [global]
 	rss_glb_config_mode = basicvirtual
-	rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp
+	rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp
 
 	sge_timer_value = 1, 5, 10, 50, 100, 200	# usecs
 
@@ -20,28 +20,29 @@
 	# disable TP_PARA_REG3.RxFragEn
 	reg[0x7d6c] = 0x00000000/0x00007000
 
-	# TP_SHIFT_CNT
-	reg[0x7dc0] = 0x62f8849
+	reg[0x7dc0] = 0x0e2f8849		# TP_SHIFT_CNT
 
 	filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
 	filterMask = protocol, fcoe
 
-	# TP rx and tx channels (0 = auto).
+	tp_pmrx = 36, 512
+	tp_pmrx_pagesize = 64K
+
+	# TP number of RX channels (0 = auto)
 	tp_nrxch = 0
-	tp_ntxch = 0
 
-	# TP rx and tx payload memory (% of the total EDRAM + DDR3).
-	tp_pmrx = 38, 512
-	tp_pmtx = 60, 512
-	tp_pmrx_pagesize = 64K
+	tp_pmtx = 46, 512
 	tp_pmtx_pagesize = 64K
 
-	# cluster, lan, or wan.
-	tp_tcptuning = lan
+	# TP number of TX channels (0 = auto)
+	tp_ntxch = 0
 
 	# TP OFLD MTUs
 	tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 4096, 4352, 8192, 9000, 9600
 
+	# cluster, lan, or wan.
+	tp_tcptuning = lan
+
 # PFs 0-3.  These get 8 MSI/8 MSI-X vectors each.  VFs are supported by
 # these 4 PFs only.  Not used here at all.
 [function "0"]
@@ -91,10 +92,14 @@
 	pmask = all
 
 	# driver will mask off features it won't use
-	protocol = ofld
+	protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu
 
 	tp_l2t = 4096
 	tp_ddp = 2
+	tp_ddp_iscsi = 2
+	tp_stag = 2
+	tp_pbl = 5
+	tp_rq = 7
 
 	# TCAM has 8K cells; each region must start at a multiple of 128 cell.
 	# Each entry in these categories takes 4 cells each.  nhash will use the
@@ -166,7 +171,7 @@
 
 [fini]
 	version = 0x1
-	checksum = 0x98210e18
+	checksum = 0x76b034e0
 #
 # $FreeBSD$
 #

Modified: stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt
==============================================================================
--- stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt	Fri Nov  4 20:32:49 2016	(r308312)
+++ stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt	Fri Nov  4 20:38:26 2016	(r308313)
@@ -10,12 +10,33 @@
 
 [global]
 	rss_glb_config_mode = basicvirtual
-	rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp
+	rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp
 
 	# PL_TIMEOUT register
-	pl_timeout_value = 200		# the timeout value in units of us
+	pl_timeout_value = 10000	# the timeout value in units of us
 
-	sge_timer_value = 1, 5, 10, 50, 100, 200	# usecs
+	# SGE_THROTTLE_CONTROL
+	bar2throttlecount = 500		# bar2throttlecount in us
+
+	sge_timer_value = 1, 5, 10, 50, 100, 200	# SGE_TIMER_VALUE* in usecs
+
+	reg[0x1124] = 0x00000400/0x00000400 # SGE_CONTROL2, enable VFIFO; if
+					# SGE_VFIFO_SIZE is not set, then
+					# firmware will set it up in function
+					# of number of egress queues used
+
+	reg[0x1130] = 0x00d5ffeb	# SGE_DBP_FETCH_THRESHOLD, fetch
+					# threshold set to queue depth
+					# minus 128-entries for FL and HP
+					# queues, and 0xfff for LP which
+					# prompts the firmware to set it up
+					# in function of egress queues
+					# used
+
+	reg[0x113c] = 0x0002ffc0	# SGE_VFIFO_SIZE, set to 0x2ffc0 which
+					# prompts the firmware to set it up in
+					# function of number of egress queues
+					# used 
 
 	# enable TP_OUT_CONFIG.IPIDSPLITMODE
 	reg[0x7d04] = 0x00010000/0x00010000
@@ -26,34 +47,38 @@
 	# enable TP_PARA_REG6.EnableCSnd
 	reg[0x7d78] = 0x00000400/0x00000000
 
-	# TP_SHIFT_CNT
-	reg[0x7dc0] = 0x62f8849
-
-	# TP_GLOBAL_CONFIG
-	reg[0x7d08] = 0x00000800/0x00000800 # set IssFromCplEnable
-
-	# TP_PARA_REG0
-	reg[0x7d60] = 0x06000000/0x07000000 # set InitCWND to 6
+	reg[0x7dc0] = 0x0e2f8849	# TP_SHIFT_CNT
 
 	filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
 	filterMask = protocol, fcoe
 
-	# TP rx and tx channels (0 = auto).
+	tp_pmrx = 36, 512
+	tp_pmrx_pagesize = 64K
+
+	# TP number of RX channels (0 = auto)
 	tp_nrxch = 0
-	tp_ntxch = 0
 
-	# TP rx and tx payload memory (% of the total EDRAM + DDR3).
-	tp_pmrx = 38, 512
-	tp_pmtx = 60, 512
-	tp_pmrx_pagesize = 64K
+	tp_pmtx = 46, 512
 	tp_pmtx_pagesize = 64K
 
-	# cluster, lan, or wan.
-	tp_tcptuning = lan
+	# TP number of TX channels (0 = auto)
+	tp_ntxch = 0
 
 	# TP OFLD MTUs
 	tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 4096, 4352, 8192, 9000, 9600
 
+	# TP_GLOBAL_CONFIG
+	reg[0x7d08] = 0x00000800/0x00000800 # set IssFromCplEnable
+
+	# TP_PC_CONFIG
+	reg[0x7d48] = 0x00000000/0x00000400 # clear EnableFLMError
+
+	# TP_PARA_REG0
+	reg[0x7d60] = 0x06000000/0x07000000 # set InitCWND to 6
+
+	# cluster, lan, or wan.
+	tp_tcptuning = lan
+
 	# MC configuration
 	mc_mode_brc[0] = 1		# mc0 - 1: enable BRC, 0: enable RBC
 	mc_mode_brc[1] = 1		# mc1 - 1: enable BRC, 0: enable RBC
@@ -111,10 +136,14 @@
 	pmask = all
 
 	# driver will mask off features it won't use
-	protocol = ofld
+	protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif
 
 	tp_l2t = 4096
 	tp_ddp = 2
+	tp_ddp_iscsi = 2
+	tp_stag = 2
+	tp_pbl = 5
+	tp_rq = 7
 
 	# TCAM has 8K cells; each region must start at a multiple of 128 cell.
 	# Each entry in these categories takes 4 cells each.  nhash will use the
@@ -186,7 +215,7 @@
 
 [fini]
 	version = 0x1
-	checksum = 0x7044b7fd
+	checksum = 0xebb87494
 #
 # $FreeBSD$
 #

Modified: stable/10/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/10/sys/dev/cxgbe/t4_main.c	Fri Nov  4 20:32:49 2016	(r308312)
+++ stable/10/sys/dev/cxgbe/t4_main.c	Fri Nov  4 20:38:26 2016	(r308313)
@@ -343,7 +343,8 @@ TUNABLE_INT("hw.cxgbe.nbmcaps_allowed", 
 static int t4_linkcaps_allowed = 0;	/* No DCBX, PPP, etc. by default */
 TUNABLE_INT("hw.cxgbe.linkcaps_allowed", &t4_linkcaps_allowed);
 
-static int t4_switchcaps_allowed = 0;
+static int t4_switchcaps_allowed = FW_CAPS_CONFIG_SWITCH_INGRESS |
+    FW_CAPS_CONFIG_SWITCH_EGRESS;
 TUNABLE_INT("hw.cxgbe.switchcaps_allowed", &t4_switchcaps_allowed);
 
 static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC;
@@ -352,13 +353,13 @@ TUNABLE_INT("hw.cxgbe.niccaps_allowed", 
 static int t4_toecaps_allowed = -1;
 TUNABLE_INT("hw.cxgbe.toecaps_allowed", &t4_toecaps_allowed);
 
-static int t4_rdmacaps_allowed = 0;
+static int t4_rdmacaps_allowed = -1;
 TUNABLE_INT("hw.cxgbe.rdmacaps_allowed", &t4_rdmacaps_allowed);
 
 static int t4_tlscaps_allowed = 0;
 TUNABLE_INT("hw.cxgbe.tlscaps_allowed", &t4_tlscaps_allowed);
 
-static int t4_iscsicaps_allowed = 0;
+static int t4_iscsicaps_allowed = -1;
 TUNABLE_INT("hw.cxgbe.iscsicaps_allowed", &t4_iscsicaps_allowed);
 
 static int t4_fcoecaps_allowed = 0;
@@ -9041,9 +9042,26 @@ tweak_tunables(void)
 
 	if (t4_toecaps_allowed == -1)
 		t4_toecaps_allowed = FW_CAPS_CONFIG_TOE;
+
+	if (t4_rdmacaps_allowed == -1) {
+		t4_rdmacaps_allowed = FW_CAPS_CONFIG_RDMA_RDDP |
+		    FW_CAPS_CONFIG_RDMA_RDMAC;
+	}
+
+	if (t4_iscsicaps_allowed == -1) {
+		t4_iscsicaps_allowed = FW_CAPS_CONFIG_ISCSI_INITIATOR_PDU |
+		    FW_CAPS_CONFIG_ISCSI_TARGET_PDU |
+		    FW_CAPS_CONFIG_ISCSI_T10DIF;
+	}
 #else
 	if (t4_toecaps_allowed == -1)
 		t4_toecaps_allowed = 0;
+
+	if (t4_rdmacaps_allowed == -1)
+		t4_rdmacaps_allowed = 0;
+
+	if (t4_iscsicaps_allowed == -1)
+		t4_iscsicaps_allowed = 0;
 #endif
 
 #ifdef DEV_NETMAP



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611042038.uA4KcQXC015511>