mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
Merge r7472 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7725 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -221,6 +221,18 @@ extraclean: clean
|
||||
kernel/isert-scst/*.orig kernel/isert-scst/*.rej
|
||||
rm -rf conftest/*/*.rej conftest/*/*.orig
|
||||
|
||||
conftest/bad_wr_mod/result-$(KVER).txt: \
|
||||
conftest/bad_wr_mod/bad_wr_mod.c \
|
||||
conftest/bad_wr_mod/Makefile
|
||||
echo "$(call run_conftest,bad_wr_mod, \
|
||||
-DBAD_WR_MODIFIER=const,-DBAD_WR_MODIFIER=)" >"$@"
|
||||
|
||||
conftest/cm_event_mod/result-$(KVER).txt: \
|
||||
conftest/cm_event_mod/cm_event_mod.c \
|
||||
conftest/cm_event_mod/Makefile
|
||||
echo "$(call run_conftest,cm_event_mod, \
|
||||
-DCM_HANDLER_EVENT_MODIFIER=const,-DCM_HANDLER_EVENT_MODIFIER=)" >"$@"
|
||||
|
||||
conftest/cm_listen/result-$(KVER).txt: \
|
||||
conftest/cm_listen/cm_listen.c \
|
||||
conftest/cm_listen/Makefile
|
||||
|
||||
3
iscsi-scst/conftest/bad_wr_mod/Makefile
Normal file
3
iscsi-scst/conftest/bad_wr_mod/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE)
|
||||
|
||||
obj-m += bad_wr_mod.o
|
||||
13
iscsi-scst/conftest/bad_wr_mod/bad_wr_mod.c
Normal file
13
iscsi-scst/conftest/bad_wr_mod/bad_wr_mod.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <linux/module.h>
|
||||
#include <rdma/ib_cm.h>
|
||||
|
||||
static int modinit(void)
|
||||
{
|
||||
struct ib_qp *qp = NULL;
|
||||
const struct ib_recv_wr *recv_wr = NULL;
|
||||
const struct ib_recv_wr **bad_recv_wr = NULL;
|
||||
|
||||
return ib_post_recv(qp, recv_wr, bad_recv_wr);
|
||||
}
|
||||
|
||||
module_init(modinit);
|
||||
3
iscsi-scst/conftest/cm_event_mod/Makefile
Normal file
3
iscsi-scst/conftest/cm_event_mod/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE)
|
||||
|
||||
obj-m += cm_event_mod.o
|
||||
14
iscsi-scst/conftest/cm_event_mod/cm_event_mod.c
Normal file
14
iscsi-scst/conftest/cm_event_mod/cm_event_mod.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <linux/module.h>
|
||||
#include <rdma/ib_cm.h>
|
||||
|
||||
static int h(struct ib_cm_id *cm_id, const struct ib_cm_event *event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int modinit(void)
|
||||
{
|
||||
return ib_create_cm_id(NULL, h, NULL) != NULL;
|
||||
}
|
||||
|
||||
module_init(modinit);
|
||||
@@ -55,7 +55,7 @@ static DEFINE_MUTEX(dev_list_mutex);
|
||||
static void isert_portal_free(struct isert_portal *portal);
|
||||
|
||||
static int isert_num_recv_posted_on_err(struct ib_recv_wr *first_ib_wr,
|
||||
struct ib_recv_wr *bad_wr)
|
||||
BAD_WR_MODIFIER struct ib_recv_wr *bad_wr)
|
||||
{
|
||||
struct ib_recv_wr *wr;
|
||||
int num_posted = 0;
|
||||
@@ -71,7 +71,7 @@ int isert_post_recv(struct isert_connection *isert_conn,
|
||||
int num_wr)
|
||||
{
|
||||
struct ib_recv_wr *first_ib_wr = &first_wr->recv_wr;
|
||||
struct ib_recv_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_recv_wr *bad_wr;
|
||||
int num_posted;
|
||||
int err;
|
||||
|
||||
@@ -98,7 +98,7 @@ int isert_post_recv(struct isert_connection *isert_conn,
|
||||
}
|
||||
|
||||
static int isert_num_send_posted_on_err(struct ib_send_wr *first_ib_wr,
|
||||
struct ib_send_wr *bad_wr)
|
||||
BAD_WR_MODIFIER struct ib_send_wr *bad_wr)
|
||||
{
|
||||
struct ib_send_wr *wr;
|
||||
int num_posted = 0;
|
||||
@@ -118,7 +118,7 @@ int isert_post_send(struct isert_connection *isert_conn,
|
||||
#else
|
||||
struct ib_send_wr *first_ib_wr = &first_wr->send_wr.wr;
|
||||
#endif
|
||||
struct ib_send_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_send_wr *bad_wr;
|
||||
int num_posted;
|
||||
int err;
|
||||
|
||||
@@ -146,7 +146,7 @@ int isert_post_send(struct isert_connection *isert_conn,
|
||||
|
||||
static void isert_post_drain_sq(struct isert_connection *isert_conn)
|
||||
{
|
||||
struct ib_send_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_send_wr *bad_wr;
|
||||
struct isert_wr *drain_wr_sq = &isert_conn->drain_wr_sq;
|
||||
int err;
|
||||
|
||||
@@ -177,7 +177,7 @@ static void isert_post_drain_sq(struct isert_connection *isert_conn)
|
||||
|
||||
static void isert_post_drain_rq(struct isert_connection *isert_conn)
|
||||
{
|
||||
struct ib_recv_wr *bad_wr;
|
||||
BAD_WR_MODIFIER struct ib_recv_wr *bad_wr;
|
||||
struct isert_wr *drain_wr_rq = &isert_conn->drain_wr_rq;
|
||||
int err;
|
||||
|
||||
@@ -1292,7 +1292,11 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id,
|
||||
* In mem-free devices, RC QPs can be created with a maximum of
|
||||
* (max_sge - 3) entries only.
|
||||
*/
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
|
||||
isert_conn->max_sge = isert_dev->device_attr.max_sge - 3;
|
||||
#else
|
||||
isert_conn->max_sge = isert_dev->device_attr.max_recv_sge - 3;
|
||||
#endif
|
||||
|
||||
WARN_ON(isert_conn->max_sge < 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user