Deleted Added
full compact
icl.c (265503) icl.c (265505)
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: stable/10/sys/dev/iscsi/icl.c 265503 2014-05-07 07:18:38Z trasz $
29 * $FreeBSD: stable/10/sys/dev/iscsi/icl.c 265505 2014-05-07 07:25:47Z trasz $
30 */
31
32/*
33 * iSCSI Common Layer. It's used by both the initiator and target to send
34 * and receive iSCSI PDUs.
35 */
36
37#include <sys/param.h>

--- 43 unchanged lines hidden (view full) ---

81SYSCTL_INT(_kern_icl, OID_AUTO, recvspace, CTLFLAG_RWTUN,
82 &recvspace, 1048576, "Default receive socket buffer size");
83
84static uma_zone_t icl_conn_zone;
85static uma_zone_t icl_pdu_zone;
86
87static volatile u_int icl_ncons;
88
30 */
31
32/*
33 * iSCSI Common Layer. It's used by both the initiator and target to send
34 * and receive iSCSI PDUs.
35 */
36
37#include <sys/param.h>

--- 43 unchanged lines hidden (view full) ---

81SYSCTL_INT(_kern_icl, OID_AUTO, recvspace, CTLFLAG_RWTUN,
82 &recvspace, 1048576, "Default receive socket buffer size");
83
84static uma_zone_t icl_conn_zone;
85static uma_zone_t icl_pdu_zone;
86
87static volatile u_int icl_ncons;
88
89#define ICL_DEBUG(X, ...) \
90 if (debug > 1) { \
91 printf("%s: " X "\n", __func__, ## __VA_ARGS__);\
89#define ICL_DEBUG(X, ...) \
90 do { \
91 if (debug > 1) \
92 printf("%s: " X "\n", __func__, ## __VA_ARGS__);\
92 } while (0)
93
93 } while (0)
94
94#define ICL_WARN(X, ...) \
95 if (debug > 0) { \
96 printf("WARNING: %s: " X "\n", \
97 __func__, ## __VA_ARGS__); \
95#define ICL_WARN(X, ...) \
96 do { \
97 if (debug > 0) { \
98 printf("WARNING: %s: " X "\n", \
99 __func__, ## __VA_ARGS__); \
100 } \
98 } while (0)
99
100#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock)
101#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock)
102#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED)
103#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED)
104
105STAILQ_HEAD(icl_pdu_stailq, icl_pdu);

--- 1352 unchanged lines hidden ---
101 } while (0)
102
103#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock)
104#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock)
105#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED)
106#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED)
107
108STAILQ_HEAD(icl_pdu_stailq, icl_pdu);

--- 1352 unchanged lines hidden ---