From owner-svn-src-stable@freebsd.org Wed Oct 17 00:27:22 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A916A10E604B; Wed, 17 Oct 2018 00:27:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EC8488269; Wed, 17 Oct 2018 00:27:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43DA723FC8; Wed, 17 Oct 2018 00:27:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9H0RMFp044255; Wed, 17 Oct 2018 00:27:22 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9H0RLZ3044253; Wed, 17 Oct 2018 00:27:21 GMT (envelope-from np@FreeBSD.org) Message-Id: <201810170027.w9H0RLZ3044253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 17 Oct 2018 00:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339395 - stable/11/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 339395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2018 00:27:22 -0000 Author: np Date: Wed Oct 17 00:27:21 2018 New Revision: 339395 URL: https://svnweb.freebsd.org/changeset/base/339395 Log: MFC r320419, r337679, r338366, and r338652. r320419: cxgbe/iw_cxgbe: Disable debug output by default. The help text for the sysctl already says that the default is 0. r337679: Remove unused stuff from iw_cxgbe.h r338366: cxgbe/iw_cxgbe: Fix iWARP RDMA + VIMAGE operation by setting the VNET properly in a couple of places in the driver. r338652: cxgbe/iw_cxgbe: Fix reported build breakage when the kernel configuration has "device cxgbe' but no VIMAGE. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Oct 16 22:13:05 2018 (r339394) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Oct 17 00:27:21 2018 (r339395) @@ -74,6 +74,7 @@ struct cpl_set_tcb_rpl; #include #include #include +#include static spinlock_t req_lock; static TAILQ_HEAD(c4iw_ep_list, c4iw_ep_common) req_list; @@ -1195,7 +1196,7 @@ static int enable_tcp_window_scaling = 1; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, enable_tcp_window_scaling, CTLFLAG_RWTUN, &enable_tcp_window_scaling, 0, "Enable tcp window scaling (default = 1)"); -int c4iw_debug = 1; +int c4iw_debug = 0; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, c4iw_debug, CTLFLAG_RWTUN, &c4iw_debug, 0, "Enable debug logging (default = 0)"); @@ -2514,6 +2515,10 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ struct c4iw_dev *dev = to_c4iw_dev(cm_id->device); struct c4iw_ep *ep = NULL; struct ifnet *nh_ifp; /* Logical egress interface */ +#ifdef VIMAGE + struct rdma_cm_id *rdma_id = (struct rdma_cm_id*)cm_id->context; + struct vnet *vnet = rdma_id->route.addr.dev_addr.net; +#endif CTR2(KTR_IW_CXGBE, "%s:ccB %p", __func__, cm_id); @@ -2559,7 +2564,10 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ ref_qp(ep); ep->com.thread = curthread; + CURVNET_SET(vnet); err = get_ifnet_from_raddr(&cm_id->remote_addr, &nh_ifp); + CURVNET_RESTORE(); + if (err) { CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); @@ -2802,7 +2810,10 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, if (!ep->parent_ep) ep->com.state = MORIBUND; + + CURVNET_SET(ep->com.so->so_vnet); sodisconnect(ep->com.so); + CURVNET_RESTORE(); } } Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Tue Oct 16 22:13:05 2018 (r339394) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Oct 17 00:27:21 2018 (r339395) @@ -976,20 +976,4 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_ void c4iw_put_qpid(struct c4iw_rdev *rdev, u32 qid, struct c4iw_dev_ucontext *uctx); void c4iw_ev_dispatch(struct c4iw_dev *dev, struct t4_cqe *err_cqe); -void __iomem *c4iw_bar2_addrs(struct c4iw_rdev *rdev, unsigned int qid, - enum t4_bar2_qtype qtype, - unsigned int *pbar2_qid, u64 *pbar2_pa); -extern struct cxgb4_client t4c_client; -extern c4iw_handler_func c4iw_handlers[NUM_CPL_CMDS]; - -#if defined(__i386__) || defined(__amd64__) -#define L1_CACHE_BYTES 128 -#else -#define L1_CACHE_BYTES 32 -#endif - -void your_reg_device(struct c4iw_dev *dev); - -#define SGE_CTRLQ_NUM 0 - #endif