svn commit: r241898 - stable/9/sys/dev/cxgbe/tom

Navdeep Parhar np at FreeBSD.org
Mon Oct 22 17:56:16 UTC 2012


Author: np
Date: Mon Oct 22 17:56:15 2012
New Revision: 241898
URL: http://svn.freebsd.org/changeset/base/241898

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

Modified:
  stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c
  stable/9/sys/dev/cxgbe/tom/t4_listen.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c	Mon Oct 22 17:54:32 2012	(r241897)
+++ stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c	Mon Oct 22 17:56:15 2012	(r241898)
@@ -73,9 +73,9 @@ VNET_DECLARE(int, tcp_autorcvbuf_max);
 void
 send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp)
 {
-        struct wrqe *wr;
-        struct fw_flowc_wr *flowc;
-	unsigned int nparams = ftxp ? 8 : 4, flowclen;
+	struct wrqe *wr;
+	struct fw_flowc_wr *flowc;
+	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;
@@ -102,13 +102,13 @@ send_flowc_wr(struct toepcb *toep, struc
 	    V_FW_WR_FLOWID(toep->tid));
 
 	flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN;
-        flowc->mnemval[0].val = htobe32(pfvf);
-        flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH;
-        flowc->mnemval[1].val = htobe32(pi->tx_chan);
-        flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT;
-        flowc->mnemval[2].val = htobe32(pi->tx_chan);
-        flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID;
-        flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id);
+	flowc->mnemval[0].val = htobe32(pfvf);
+	flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH;
+	flowc->mnemval[1].val = htobe32(pi->tx_chan);
+	flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT;
+	flowc->mnemval[2].val = htobe32(pi->tx_chan);
+	flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID;
+	flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id);
 	if (ftxp) {
 		uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf);
 
@@ -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: stable/9/sys/dev/cxgbe/tom/t4_listen.c
==============================================================================
--- stable/9/sys/dev/cxgbe/tom/t4_listen.c	Mon Oct 22 17:54:32 2012	(r241897)
+++ stable/9/sys/dev/cxgbe/tom/t4_listen.c	Mon Oct 22 17:56:15 2012	(r241898)
@@ -271,13 +271,13 @@ send_reset_synqe(struct toedev *tod, str
 	struct ifnet *ifp = m->m_pkthdr.rcvif;
 	struct port_info *pi = ifp->if_softc;
 	struct l2t_entry *e = &sc->l2t->l2tab[synqe->l2e_idx];
-        struct wrqe *wr;
-        struct fw_flowc_wr *flowc;
+	struct wrqe *wr;
+	struct fw_flowc_wr *flowc;
 	struct cpl_abort_req *req;
 	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);
@@ -312,13 +312,17 @@ send_reset_synqe(struct toedev *tod, str
 	flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) |
 	    V_FW_WR_FLOWID(synqe->tid));
 	flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN;
-        flowc->mnemval[0].val = htobe32(pfvf);
-        flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH;
-        flowc->mnemval[1].val = htobe32(pi->tx_chan);
-        flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT;
-        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[0].val = htobe32(pfvf);
+	flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH;
+	flowc->mnemval[1].val = htobe32(pi->tx_chan);
+	flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT;
+	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 */


More information about the svn-src-stable-9 mailing list