git: d8feb950a6c4 - stable/13 - Move the ICL_CONN_*LOCK* macros to <dev/iscsi/icl.h>.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Nov 2021 23:13:02 UTC
The branch stable/13 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=d8feb950a6c411b1d118b42e1dfb9072cd480585
commit d8feb950a6c411b1d118b42e1dfb9072cd480585
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-11-05 23:38:25 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-11-23 23:11:53 +0000
Move the ICL_CONN_*LOCK* macros to <dev/iscsi/icl.h>.
These macros are not backend-specific but reference a
backend-independent field in struct icl_conn.
Reviewed by: mav
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D32858
(cherry picked from commit e900338c0987603456df8d9a8aeec5c239106d0b)
---
sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 5 -----
sys/dev/iscsi/icl.h | 5 +++++
sys/dev/iscsi/icl_soft.c | 5 -----
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
index cf1032f2a3a2..de8f2547f29a 100644
--- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
@@ -129,11 +129,6 @@ SYSCTL_INT(_kern_icl_cxgbei, OID_AUTO, recvspace, CTLFLAG_RWTUN,
static volatile u_int icl_cxgbei_ncons;
-#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock)
-#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock)
-#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED)
-#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED)
-
static icl_conn_new_pdu_t icl_cxgbei_conn_new_pdu;
static icl_conn_pdu_data_segment_length_t
icl_cxgbei_conn_pdu_data_segment_length;
diff --git a/sys/dev/iscsi/icl.h b/sys/dev/iscsi/icl.h
index 07dcbbf2a0b5..edd43a45ba2e 100644
--- a/sys/dev/iscsi/icl.h
+++ b/sys/dev/iscsi/icl.h
@@ -120,6 +120,11 @@ struct icl_conn {
void *ic_prv0;
};
+#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock)
+#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock)
+#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED)
+#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED)
+
struct icl_drv_limits {
int idl_max_recv_data_segment_length;
int idl_max_send_data_segment_length;
diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c
index 95c4c87dd6f3..37f3911204c4 100644
--- a/sys/dev/iscsi/icl_soft.c
+++ b/sys/dev/iscsi/icl_soft.c
@@ -123,11 +123,6 @@ static uma_zone_t icl_soft_pdu_zone;
static volatile u_int icl_ncons;
-#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock)
-#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock)
-#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED)
-#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED)
-
STAILQ_HEAD(icl_pdu_stailq, icl_pdu);
static icl_conn_new_pdu_t icl_soft_conn_new_pdu;