Date: Wed, 17 Oct 2018 00:27:21 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> 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 Message-ID: <201810170027.w9H0RLZ3044253@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <linux/inetdevice.h> #include <linux/if_vlan.h> #include <net/netevent.h> +#include <rdma/rdma_cm.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810170027.w9H0RLZ3044253>