Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
9b152d53
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9b152d53
编写于
11月 18, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
上级
62ae144f
eabc7793
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
31 addition
and
26 deletion
+31
-26
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/user_mad.c
+1
-1
drivers/infiniband/hw/mthca/mthca_qp.c
drivers/infiniband/hw/mthca/mthca_qp.c
+18
-19
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.c
+11
-6
drivers/infiniband/ulp/srp/ib_srp.h
drivers/infiniband/ulp/srp/ib_srp.h
+1
-0
未找到文件。
drivers/infiniband/core/user_mad.c
浏览文件 @
9b152d53
...
...
@@ -312,7 +312,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
int
ret
,
length
,
hdr_len
,
copy_offset
;
int
rmpp_active
=
0
;
if
(
count
<
sizeof
(
struct
ib_user_mad
))
if
(
count
<
sizeof
(
struct
ib_user_mad
)
+
IB_MGMT_RMPP_HDR
)
return
-
EINVAL
;
length
=
count
-
sizeof
(
struct
ib_user_mad
);
...
...
drivers/infiniband/hw/mthca/mthca_qp.c
浏览文件 @
9b152d53
...
...
@@ -730,14 +730,15 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
}
if
(
attr_mask
&
IB_QP_ACCESS_FLAGS
)
{
qp_context
->
params2
|=
cpu_to_be32
(
attr
->
qp_access_flags
&
IB_ACCESS_REMOTE_WRITE
?
MTHCA_QP_BIT_RWE
:
0
);
/*
* Only enable RDMA
/atomics if we have responder
* resources set to a non-zero value.
* Only enable RDMA
reads and atomics if we have
* res
ponder res
ources set to a non-zero value.
*/
if
(
qp
->
resp_depth
)
{
qp_context
->
params2
|=
cpu_to_be32
(
attr
->
qp_access_flags
&
IB_ACCESS_REMOTE_WRITE
?
MTHCA_QP_BIT_RWE
:
0
);
qp_context
->
params2
|=
cpu_to_be32
(
attr
->
qp_access_flags
&
IB_ACCESS_REMOTE_READ
?
MTHCA_QP_BIT_RRE
:
0
);
...
...
@@ -759,22 +760,19 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
if
(
qp
->
resp_depth
&&
!
attr
->
max_dest_rd_atomic
)
{
/*
* Lowering our responder resources to zero.
* Turn off
RDMA/
atomics as responder.
* (R
WE/R
RE/RAE in params2 already zero)
* Turn off
reads RDMA and
atomics as responder.
* (RRE/RAE in params2 already zero)
*/
qp_param
->
opt_param_mask
|=
cpu_to_be32
(
MTHCA_QP_OPTPAR_RWE
|
MTHCA_QP_OPTPAR_RRE
|
qp_param
->
opt_param_mask
|=
cpu_to_be32
(
MTHCA_QP_OPTPAR_RRE
|
MTHCA_QP_OPTPAR_RAE
);
}
if
(
!
qp
->
resp_depth
&&
attr
->
max_dest_rd_atomic
)
{
/*
* Increasing our responder resources from
* zero. Turn on RDMA/atomics as appropriate.
* zero. Turn on RDMA reads and atomics as
* appropriate.
*/
qp_context
->
params2
|=
cpu_to_be32
(
qp
->
atomic_rd_en
&
IB_ACCESS_REMOTE_WRITE
?
MTHCA_QP_BIT_RWE
:
0
);
qp_context
->
params2
|=
cpu_to_be32
(
qp
->
atomic_rd_en
&
IB_ACCESS_REMOTE_READ
?
MTHCA_QP_BIT_RRE
:
0
);
...
...
@@ -782,8 +780,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
cpu_to_be32
(
qp
->
atomic_rd_en
&
IB_ACCESS_REMOTE_ATOMIC
?
MTHCA_QP_BIT_RAE
:
0
);
qp_param
->
opt_param_mask
|=
cpu_to_be32
(
MTHCA_QP_OPTPAR_RWE
|
MTHCA_QP_OPTPAR_RRE
|
qp_param
->
opt_param_mask
|=
cpu_to_be32
(
MTHCA_QP_OPTPAR_RRE
|
MTHCA_QP_OPTPAR_RAE
);
}
...
...
@@ -921,10 +918,12 @@ static void mthca_adjust_qp_caps(struct mthca_dev *dev,
else
qp
->
max_inline_data
=
max_data_size
-
MTHCA_INLINE_HEADER_SIZE
;
qp
->
sq
.
max_gs
=
max_data_size
/
sizeof
(
struct
mthca_data_seg
);
qp
->
rq
.
max_gs
=
(
min
(
dev
->
limits
.
max_desc_sz
,
1
<<
qp
->
rq
.
wqe_shift
)
-
sizeof
(
struct
mthca_next_seg
))
/
sizeof
(
struct
mthca_data_seg
);
qp
->
sq
.
max_gs
=
min_t
(
int
,
dev
->
limits
.
max_sg
,
max_data_size
/
sizeof
(
struct
mthca_data_seg
));
qp
->
rq
.
max_gs
=
min_t
(
int
,
dev
->
limits
.
max_sg
,
(
min
(
dev
->
limits
.
max_desc_sz
,
1
<<
qp
->
rq
.
wqe_shift
)
-
sizeof
(
struct
mthca_next_seg
))
/
sizeof
(
struct
mthca_data_seg
));
}
/*
...
...
drivers/infiniband/ulp/srp/ib_srp.c
浏览文件 @
9b152d53
...
...
@@ -802,13 +802,21 @@ static int srp_post_recv(struct srp_target_port *target)
/*
* Must be called with target->scsi_host->host_lock held to protect
* req_lim and tx_head.
* req_lim and tx_head. Lock cannot be dropped between call here and
* call to __srp_post_send().
*/
static
struct
srp_iu
*
__srp_get_tx_iu
(
struct
srp_target_port
*
target
)
{
if
(
target
->
tx_head
-
target
->
tx_tail
>=
SRP_SQ_SIZE
)
return
NULL
;
if
(
unlikely
(
target
->
req_lim
<
1
))
{
if
(
printk_ratelimit
())
printk
(
KERN_DEBUG
PFX
"Target has req_lim %d
\n
"
,
target
->
req_lim
);
return
NULL
;
}
return
target
->
tx_ring
[
target
->
tx_head
&
SRP_SQ_SIZE
];
}
...
...
@@ -823,11 +831,6 @@ static int __srp_post_send(struct srp_target_port *target,
struct
ib_send_wr
wr
,
*
bad_wr
;
int
ret
=
0
;
if
(
target
->
req_lim
<
1
)
{
printk
(
KERN_ERR
PFX
"Target has req_lim %d
\n
"
,
target
->
req_lim
);
return
-
EAGAIN
;
}
list
.
addr
=
iu
->
dma
;
list
.
length
=
len
;
list
.
lkey
=
target
->
srp_host
->
mr
->
lkey
;
...
...
@@ -1417,6 +1420,8 @@ static ssize_t srp_create_target(struct class_device *class_dev,
if
(
!
target_host
)
return
-
ENOMEM
;
target_host
->
max_lun
=
SRP_MAX_LUN
;
target
=
host_to_target
(
target_host
);
memset
(
target
,
0
,
sizeof
*
target
);
...
...
drivers/infiniband/ulp/srp/ib_srp.h
浏览文件 @
9b152d53
...
...
@@ -54,6 +54,7 @@ enum {
SRP_PORT_REDIRECT
=
1
,
SRP_DLID_REDIRECT
=
2
,
SRP_MAX_LUN
=
512
,
SRP_MAX_IU_LEN
=
256
,
SRP_RQ_SHIFT
=
6
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录