Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2012 16:37:16 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241642 - head/sys/dev/cxgbe/tom
Message-ID:  <201210171637.q9HGbGOF013655@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Wed Oct 17 16:37:16 2012
New Revision: 241642
URL: http://svn.freebsd.org/changeset/base/241642

Log:
  Always provide sndbuf and MSS values in a flowc command, even when the
  driver is going to abort the connection right after the flowc.
  
  MFC after:	3 days

Modified:
  head/sys/dev/cxgbe/tom/t4_cpl_io.c
  head/sys/dev/cxgbe/tom/t4_listen.c

Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_cpl_io.c	Wed Oct 17 13:04:05 2012	(r241641)
+++ head/sys/dev/cxgbe/tom/t4_cpl_io.c	Wed Oct 17 16:37:16 2012	(r241642)
@@ -75,7 +75,7 @@ send_flowc_wr(struct toepcb *toep, struc
 {
 	struct wrqe *wr;
 	struct fw_flowc_wr *flowc;
-	unsigned int nparams = ftxp ? 8 : 4, flowclen;
+	unsigned int nparams = ftxp ? 8 : 6, flowclen;
 	struct port_info *pi = toep->port;
 	struct adapter *sc = pi->adapter;
 	unsigned int pfvf = G_FW_VIID_PFN(pi->viid) << S_FW_VIID_PFN;
@@ -120,6 +120,11 @@ send_flowc_wr(struct toepcb *toep, struc
 		flowc->mnemval[6].val = htobe32(sndbuf);
 		flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS;
 		flowc->mnemval[7].val = htobe32(ftxp->mss);
+	} else {
+		flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF;
+		flowc->mnemval[4].val = htobe32(512);
+		flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS;
+		flowc->mnemval[5].val = htobe32(512);
 	}
 
 	txsd->tx_credits = howmany(flowclen, 16);

Modified: head/sys/dev/cxgbe/tom/t4_listen.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_listen.c	Wed Oct 17 13:04:05 2012	(r241641)
+++ head/sys/dev/cxgbe/tom/t4_listen.c	Wed Oct 17 16:37:16 2012	(r241642)
@@ -277,7 +277,7 @@ send_reset_synqe(struct toedev *tod, str
 	int txqid, rxqid, flowclen;
 	struct sge_wrq *ofld_txq;
 	struct sge_ofld_rxq *ofld_rxq;
-	const int nparams = 4;
+	const int nparams = 6;
 	unsigned int pfvf = G_FW_VIID_PFN(pi->viid) << S_FW_VIID_PFN;
 
 	INP_WLOCK_ASSERT(synqe->lctx->inp);
@@ -319,6 +319,10 @@ send_reset_synqe(struct toedev *tod, str
 	flowc->mnemval[2].val = htobe32(pi->tx_chan);
 	flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID;
 	flowc->mnemval[3].val = htobe32(ofld_rxq->iq.abs_id);
+ 	flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF;
+ 	flowc->mnemval[4].val = htobe32(512);
+ 	flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS;
+ 	flowc->mnemval[5].val = htobe32(512);
 	synqe->flags |= TPF_FLOWC_WR_SENT;
 
 	/* ... then ABORT request */



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