From owner-svn-src-head@FreeBSD.ORG Tue Jun 11 21:20:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DE986345; Tue, 11 Jun 2013 21:20:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C14AE1D9C; Tue, 11 Jun 2013 21:20:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5BLKOti098038; Tue, 11 Jun 2013 21:20:24 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5BLKOLR098035; Tue, 11 Jun 2013 21:20:24 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201306112120.r5BLKOLR098035@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 11 Jun 2013 21:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251638 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2013 21:20:25 -0000 Author: np Date: Tue Jun 11 21:20:23 2013 New Revision: 251638 URL: http://svnweb.freebsd.org/changeset/base/251638 Log: cxgbe/tom: Allow caller to select the queue (control or data) used to send the CPL_SET_TCB_FIELD request in t4_set_tcb_field(). MFC after: 1 week Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 11 20:00:49 2013 (r251637) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 11 21:20:23 2013 (r251638) @@ -1410,13 +1410,13 @@ do_set_tcb_rpl(struct sge_iq *iq, const } void -t4_set_tcb_field(struct adapter *sc, struct toepcb *toep, uint16_t word, - uint64_t mask, uint64_t val) +t4_set_tcb_field(struct adapter *sc, struct toepcb *toep, int ctrl, + uint16_t word, uint64_t mask, uint64_t val) { struct wrqe *wr; struct cpl_set_tcb_field *req; - wr = alloc_wrqe(sizeof(*req), toep->ctrlq); + wr = alloc_wrqe(sizeof(*req), ctrl ? toep->ctrlq : toep->ofld_txq); if (wr == NULL) { /* XXX */ panic("%s: allocation failure.", __func__); Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Tue Jun 11 20:00:49 2013 (r251637) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Tue Jun 11 21:20:23 2013 (r251638) @@ -541,12 +541,12 @@ enable_ddp(struct adapter *sc, struct to __func__, toep->tid, time_uptime); toep->ddp_flags |= DDP_SC_REQ; - t4_set_tcb_field(sc, toep, W_TCB_RX_DDP_FLAGS, + t4_set_tcb_field(sc, toep, 1, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | V_TF_DDP_INDICATE_OUT(1) | V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1) | V_TF_DDP_BUF0_VALID(1) | V_TF_DDP_BUF1_VALID(1), V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1)); - t4_set_tcb_field(sc, toep, W_TCB_T_FLAGS, + t4_set_tcb_field(sc, toep, 1, W_TCB_T_FLAGS, V_TF_RCV_COALESCE_ENABLE(1), 0); } @@ -562,9 +562,9 @@ disable_ddp(struct adapter *sc, struct t __func__, toep->tid, time_uptime); toep->ddp_flags |= DDP_SC_REQ; - t4_set_tcb_field(sc, toep, W_TCB_T_FLAGS, + t4_set_tcb_field(sc, toep, 1, W_TCB_T_FLAGS, V_TF_RCV_COALESCE_ENABLE(1), V_TF_RCV_COALESCE_ENABLE(1)); - t4_set_tcb_field(sc, toep, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1), + t4_set_tcb_field(sc, toep, 1, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1), V_TF_DDP_OFF(1)); } Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Tue Jun 11 20:00:49 2013 (r251637) +++ head/sys/dev/cxgbe/tom/t4_tom.h Tue Jun 11 21:20:23 2013 (r251638) @@ -269,8 +269,8 @@ void t4_rcvd(struct toedev *, struct tcp int t4_tod_output(struct toedev *, struct tcpcb *); int t4_send_fin(struct toedev *, struct tcpcb *); int t4_send_rst(struct toedev *, struct tcpcb *); -void t4_set_tcb_field(struct adapter *, struct toepcb *, uint16_t, uint64_t, - uint64_t); +void t4_set_tcb_field(struct adapter *, struct toepcb *, int, uint16_t, + uint64_t, uint64_t); /* t4_ddp.c */ void t4_init_ddp(struct adapter *, struct tom_data *);