Date: Tue, 16 Oct 2018 19:26:04 +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: r339389 - stable/11/sys/dev/cxgbe/iw_cxgbe Message-ID: <201810161926.w9GJQ4f1089091@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Tue Oct 16 19:26:04 2018 New Revision: 339389 URL: https://svnweb.freebsd.org/changeset/base/339389 Log: MFC r327254, r327904, and r328994. r327254: cxgbe/iw_cxgbe: Fix iWARP over VLANs (catch up with r326169). r327904: cxgbe/iw_cxgbe: Remove duplicates to fix compilation with recent gcc. r328994: iw_cxgbe: Remove declaration of a function that no longer exists. 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 18:47:13 2018 (r339388) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Oct 16 19:26:04 2018 (r339389) @@ -337,24 +337,28 @@ find_real_listen_ep(struct c4iw_listen_ep *master_lep, { struct adapter *adap = NULL; struct c4iw_listen_ep *lep = NULL; - struct sockaddr_storage remote = { 0 }; - struct ifnet *new_conn_ifp = NULL; + struct ifnet *ifp = NULL, *hw_ifp = NULL; struct listen_port_info *port_info = NULL; - int err = 0, i = 0, - found_portinfo = 0, found_lep = 0; + int i = 0, found_portinfo = 0, found_lep = 0; uint16_t port; - /* STEP 1: get 'ifnet' based on socket's remote address */ - GET_REMOTE_ADDR(&remote, so); + /* + * STEP 1: Figure out 'ifp' of the physical interface, not pseudo + * interfaces like vlan, lagg, etc.. + * TBD: lagg support, lagg + vlan support. + */ + ifp = TOEPCB(so)->l2te->ifp; + if (ifp->if_type == IFT_L2VLAN) { + hw_ifp = VLAN_TRUNKDEV(ifp); + if (hw_ifp == NULL) { + CTR4(KTR_IW_CXGBE, "%s: Failed to get parent ifnet of " + "vlan ifnet %p, sock %p, master_lep %p", + __func__, ifp, so, master_lep); + return (NULL); + } + } else + hw_ifp = ifp; - err = get_ifnet_from_raddr(&remote, &new_conn_ifp); - if (err) { - CTR4(KTR_IW_CXGBE, "%s: Failed to get ifnet, sock %p, " - "master_lep %p err %d", - __func__, so, master_lep, err); - return (NULL); - } - /* STEP 2: Find 'port_info' with listener local port address. */ port = (master_lep->com.local_addr.ss_family == AF_INET) ? ((struct sockaddr_in *)&master_lep->com.local_addr)->sin_port : @@ -377,7 +381,7 @@ find_real_listen_ep(struct c4iw_listen_ep *master_lep, list_for_each_entry(lep, &port_info->lep_list, listen_ep_list) { adap = lep->com.dev->rdev.adap; for_each_port(adap, i) { - if (new_conn_ifp == adap->port[i]->vi[0].ifp) { + if (hw_ifp == adap->port[i]->vi[0].ifp) { found_lep =1; goto out; } Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Tue Oct 16 18:47:13 2018 (r339388) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Tue Oct 16 19:26:04 2018 (r339389) @@ -897,8 +897,6 @@ typedef int (*c4iw_handler_func)(struct c4iw_dev *dev, int c4iw_ep_redirect(void *ctx, struct dst_entry *old, struct dst_entry *new, struct l2t_entry *l2t); -void c4iw_put_qpid(struct c4iw_rdev *rdev, u32 qpid, - struct c4iw_dev_ucontext *uctx); u32 c4iw_get_resource(struct c4iw_id_table *id_table); void c4iw_put_resource(struct c4iw_id_table *id_table, u32 entry); int c4iw_init_resource(struct c4iw_rdev *rdev, u32 nr_tpt, u32 nr_pdid); @@ -964,7 +962,6 @@ void c4iw_pblpool_free(struct c4iw_rdev *rdev, u32 add int c4iw_ofld_send(struct c4iw_rdev *rdev, struct mbuf *m); void c4iw_flush_hw_cq(struct c4iw_cq *cq); void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count); -void c4iw_count_scqes(struct t4_cq *cq, struct t4_wq *wq, int *count); int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, gfp_t gfp); int __c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, gfp_t gfp); int c4iw_flush_rq(struct t4_wq *wq, struct t4_cq *cq, int count); @@ -984,7 +981,6 @@ void __iomem *c4iw_bar2_addrs(struct c4iw_rdev *rdev, unsigned int *pbar2_qid, u64 *pbar2_pa); extern struct cxgb4_client t4c_client; extern c4iw_handler_func c4iw_handlers[NUM_CPL_CMDS]; -extern int c4iw_max_read_depth; #if defined(__i386__) || defined(__amd64__) #define L1_CACHE_BYTES 128
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810161926.w9GJQ4f1089091>