From owner-svn-src-all@freebsd.org Tue May 17 07:56:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A78B4B3EC74; Tue, 17 May 2016 07:56:46 +0000 (UTC) (envelope-from trasz@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 mx1.freebsd.org (Postfix) with ESMTPS id 7C16719CF; Tue, 17 May 2016 07:56:46 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4H7ujf4043640; Tue, 17 May 2016 07:56:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4H7ujRN043638; Tue, 17 May 2016 07:56:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201605170756.u4H7ujRN043638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 17 May 2016 07:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300025 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2016 07:56:46 -0000 Author: trasz Date: Tue May 17 07:56:45 2016 New Revision: 300025 URL: https://svnweb.freebsd.org/changeset/base/300025 Log: Make ICL_KERNEL_PROXY compilable. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl.h head/sys/dev/iscsi/icl_proxy.c Modified: head/sys/dev/iscsi/icl.h ============================================================================== --- head/sys/dev/iscsi/icl.h Tue May 17 07:56:05 2016 (r300024) +++ head/sys/dev/iscsi/icl.h Tue May 17 07:56:45 2016 (r300025) @@ -138,22 +138,6 @@ int icl_unregister(const char *offload) struct sockaddr; struct icl_listen; -struct icl_listen_sock { - TAILQ_ENTRY(icl_listen_sock) ils_next; - struct icl_listen *ils_listen; - struct socket *ils_socket; - bool ils_running; - bool ils_disconnecting; - int ils_id; -}; - -struct icl_listen { - TAILQ_HEAD(, icl_listen_sock) il_sockets; - struct sx il_lock; - void (*il_accept)(struct socket *, - struct sockaddr *, int); -}; - /* * Initiator part. */ @@ -177,5 +161,4 @@ int icl_listen_remove(struct icl_liste int icl_conn_handoff_sock(struct icl_conn *ic, struct socket *so); #endif /* ICL_KERNEL_PROXY */ - #endif /* !ICL_H */ Modified: head/sys/dev/iscsi/icl_proxy.c ============================================================================== --- head/sys/dev/iscsi/icl_proxy.c Tue May 17 07:56:05 2016 (r300024) +++ head/sys/dev/iscsi/icl_proxy.c Tue May 17 07:56:45 2016 (r300025) @@ -84,33 +84,27 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include -static int debug = 1; - -#define ICL_DEBUG(X, ...) \ - if (debug > 1) { \ - printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ - } while (0) - -#define ICL_WARN(X, ...) \ - if (debug > 0) { \ - printf("WARNING: %s: " X "\n", \ - __func__, ## __VA_ARGS__); \ - } while (0) +struct icl_listen_sock { + TAILQ_ENTRY(icl_listen_sock) ils_next; + struct icl_listen *ils_listen; + struct socket *ils_socket; + bool ils_running; + bool ils_disconnecting; + int ils_id; +}; + +struct icl_listen { + TAILQ_HEAD(, icl_listen_sock) il_sockets; + struct sx il_lock; + void (*il_accept)(struct socket *, + struct sockaddr *, int); +}; static MALLOC_DEFINE(M_ICL_PROXY, "ICL_PROXY", "iSCSI common layer proxy"); -#ifdef ICL_RDMA -static int icl_conn_connect_rdma(struct icl_conn *ic, int domain, int socktype, - int protocol, struct sockaddr *from_sa, struct sockaddr *to_sa); -static int icl_listen_add_rdma(struct icl_listen *il, int domain, int socktype, int protocol, - struct sockaddr *sa); -#endif /* ICL_RDMA */ - static int icl_conn_connect_tcp(struct icl_conn *ic, int domain, int socktype, int protocol, struct sockaddr *from_sa, struct sockaddr *to_sa) @@ -172,12 +166,8 @@ icl_conn_connect(struct icl_conn *ic, bo { if (rdma) { -#ifdef ICL_RDMA - return (icl_conn_connect_rdma(ic, domain, socktype, protocol, from_sa, to_sa)); -#else ICL_DEBUG("RDMA not supported"); return (EOPNOTSUPP); -#endif } return (icl_conn_connect_tcp(ic, domain, socktype, protocol, from_sa, to_sa)); @@ -375,13 +365,8 @@ icl_listen_add(struct icl_listen *il, bo { if (rdma) { -#ifndef ICL_RDMA ICL_DEBUG("RDMA not supported"); return (EOPNOTSUPP); -#else - return (icl_listen_add_rdma(il, domain, socktype, protocol, - sa, portal_id)); -#endif }