Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
20952cdd
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
20952cdd
编写于
6月 06, 2012
作者:
R
Roland Dreier
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'cxgb4', 'mlx4' and 'ocrdma' into for-linus
上级
71b43fd5
fc2d0044
7ad5e449
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
35 addition
and
41 deletion
+35
-41
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/main.c
+8
-13
drivers/infiniband/hw/mlx4/mlx4_ib.h
drivers/infiniband/hw/mlx4/mlx4_ib.h
+8
-0
drivers/infiniband/hw/mlx4/qp.c
drivers/infiniband/hw/mlx4/qp.c
+15
-6
drivers/infiniband/hw/ocrdma/ocrdma.h
drivers/infiniband/hw/ocrdma/ocrdma.h
+0
-1
drivers/infiniband/hw/ocrdma/ocrdma_abi.h
drivers/infiniband/hw/ocrdma/ocrdma_abi.h
+1
-4
drivers/infiniband/hw/ocrdma/ocrdma_hw.c
drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+1
-8
drivers/infiniband/hw/ocrdma/ocrdma_main.c
drivers/infiniband/hw/ocrdma/ocrdma_main.c
+0
-1
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+0
-5
drivers/infiniband/hw/ocrdma/ocrdma_verbs.h
drivers/infiniband/hw/ocrdma/ocrdma_verbs.h
+0
-1
drivers/net/ethernet/mellanox/mlx4/port.c
drivers/net/ethernet/mellanox/mlx4/port.c
+2
-2
未找到文件。
drivers/infiniband/hw/mlx4/main.c
浏览文件 @
20952cdd
...
...
@@ -140,7 +140,7 @@ static int mlx4_ib_query_device(struct ib_device *ibdev,
props
->
max_mr_size
=
~
0ull
;
props
->
page_size_cap
=
dev
->
dev
->
caps
.
page_size_cap
;
props
->
max_qp
=
dev
->
dev
->
caps
.
num_qps
-
dev
->
dev
->
caps
.
reserved_qps
;
props
->
max_qp_wr
=
dev
->
dev
->
caps
.
max_wqes
;
props
->
max_qp_wr
=
dev
->
dev
->
caps
.
max_wqes
-
MLX4_IB_SQ_MAX_SPARE
;
props
->
max_sge
=
min
(
dev
->
dev
->
caps
.
max_sq_sg
,
dev
->
dev
->
caps
.
max_rq_sg
);
props
->
max_cq
=
dev
->
dev
->
caps
.
num_cqs
-
dev
->
dev
->
caps
.
reserved_cqs
;
...
...
@@ -1084,12 +1084,9 @@ static void mlx4_ib_alloc_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
int
total_eqs
=
0
;
int
i
,
j
,
eq
;
/* Init eq table */
ibdev
->
eq_table
=
NULL
;
ibdev
->
eq_added
=
0
;
/* Legacy mode? */
if
(
dev
->
caps
.
comp_pool
==
0
)
/* Legacy mode or comp_pool is not large enough */
if
(
dev
->
caps
.
comp_pool
==
0
||
dev
->
caps
.
num_ports
>
dev
->
caps
.
comp_pool
)
return
;
eq_per_port
=
rounddown_pow_of_two
(
dev
->
caps
.
comp_pool
/
...
...
@@ -1135,7 +1132,10 @@ static void mlx4_ib_alloc_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
static
void
mlx4_ib_free_eqs
(
struct
mlx4_dev
*
dev
,
struct
mlx4_ib_dev
*
ibdev
)
{
int
i
;
int
total_eqs
;
/* no additional eqs were added */
if
(
!
ibdev
->
eq_table
)
return
;
/* Reset the advertised EQ number */
ibdev
->
ib_dev
.
num_comp_vectors
=
dev
->
caps
.
num_comp_vectors
;
...
...
@@ -1148,12 +1148,7 @@ static void mlx4_ib_free_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
mlx4_release_eq
(
dev
,
ibdev
->
eq_table
[
i
]);
}
total_eqs
=
dev
->
caps
.
num_comp_vectors
+
ibdev
->
eq_added
;
memset
(
ibdev
->
eq_table
,
0
,
total_eqs
*
sizeof
(
int
));
kfree
(
ibdev
->
eq_table
);
ibdev
->
eq_table
=
NULL
;
ibdev
->
eq_added
=
0
;
}
static
void
*
mlx4_ib_add
(
struct
mlx4_dev
*
dev
)
...
...
drivers/infiniband/hw/mlx4/mlx4_ib.h
浏览文件 @
20952cdd
...
...
@@ -44,6 +44,14 @@
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
enum
{
MLX4_IB_SQ_MIN_WQE_SHIFT
=
6
,
MLX4_IB_MAX_HEADROOM
=
2048
};
#define MLX4_IB_SQ_HEADROOM(shift) ((MLX4_IB_MAX_HEADROOM >> (shift)) + 1)
#define MLX4_IB_SQ_MAX_SPARE (MLX4_IB_SQ_HEADROOM(MLX4_IB_SQ_MIN_WQE_SHIFT))
struct
mlx4_ib_ucontext
{
struct
ib_ucontext
ibucontext
;
struct
mlx4_uar
uar
;
...
...
drivers/infiniband/hw/mlx4/qp.c
浏览文件 @
20952cdd
...
...
@@ -310,8 +310,8 @@ static int set_rq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
int
is_user
,
int
has_rq
,
struct
mlx4_ib_qp
*
qp
)
{
/* Sanity check RQ size before proceeding */
if
(
cap
->
max_recv_wr
>
dev
->
dev
->
caps
.
max_wqes
||
cap
->
max_recv_sge
>
dev
->
dev
->
caps
.
max_rq_sg
)
if
(
cap
->
max_recv_wr
>
dev
->
dev
->
caps
.
max_wqes
-
MLX4_IB_SQ_MAX_SPARE
||
cap
->
max_recv_sge
>
min
(
dev
->
dev
->
caps
.
max_sq_sg
,
dev
->
dev
->
caps
.
max_rq_sg
)
)
return
-
EINVAL
;
if
(
!
has_rq
)
{
...
...
@@ -329,8 +329,17 @@ static int set_rq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
qp
->
rq
.
wqe_shift
=
ilog2
(
qp
->
rq
.
max_gs
*
sizeof
(
struct
mlx4_wqe_data_seg
));
}
cap
->
max_recv_wr
=
qp
->
rq
.
max_post
=
qp
->
rq
.
wqe_cnt
;
cap
->
max_recv_sge
=
qp
->
rq
.
max_gs
;
/* leave userspace return values as they were, so as not to break ABI */
if
(
is_user
)
{
cap
->
max_recv_wr
=
qp
->
rq
.
max_post
=
qp
->
rq
.
wqe_cnt
;
cap
->
max_recv_sge
=
qp
->
rq
.
max_gs
;
}
else
{
cap
->
max_recv_wr
=
qp
->
rq
.
max_post
=
min
(
dev
->
dev
->
caps
.
max_wqes
-
MLX4_IB_SQ_MAX_SPARE
,
qp
->
rq
.
wqe_cnt
);
cap
->
max_recv_sge
=
min
(
qp
->
rq
.
max_gs
,
min
(
dev
->
dev
->
caps
.
max_sq_sg
,
dev
->
dev
->
caps
.
max_rq_sg
));
}
return
0
;
}
...
...
@@ -341,8 +350,8 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
int
s
;
/* Sanity check SQ size before proceeding */
if
(
cap
->
max_send_wr
>
dev
->
dev
->
caps
.
max_wqes
||
cap
->
max_send_sge
>
dev
->
dev
->
caps
.
max_sq_sg
||
if
(
cap
->
max_send_wr
>
(
dev
->
dev
->
caps
.
max_wqes
-
MLX4_IB_SQ_MAX_SPARE
)
||
cap
->
max_send_sge
>
min
(
dev
->
dev
->
caps
.
max_sq_sg
,
dev
->
dev
->
caps
.
max_rq_sg
)
||
cap
->
max_inline_data
+
send_wqe_overhead
(
type
,
qp
->
flags
)
+
sizeof
(
struct
mlx4_wqe_inline_seg
)
>
dev
->
dev
->
caps
.
max_sq_desc_sz
)
return
-
EINVAL
;
...
...
drivers/infiniband/hw/ocrdma/ocrdma.h
浏览文件 @
20952cdd
...
...
@@ -231,7 +231,6 @@ struct ocrdma_qp_hwq_info {
u32
entry_size
;
u32
max_cnt
;
u32
max_wqe_idx
;
u32
free_delta
;
u16
dbid
;
/* qid, where to ring the doorbell. */
u32
len
;
dma_addr_t
pa
;
...
...
drivers/infiniband/hw/ocrdma/ocrdma_abi.h
浏览文件 @
20952cdd
...
...
@@ -101,8 +101,6 @@ struct ocrdma_create_qp_uresp {
u32
rsvd1
;
u32
num_wqe_allocated
;
u32
num_rqe_allocated
;
u32
free_wqe_delta
;
u32
free_rqe_delta
;
u32
db_sq_offset
;
u32
db_rq_offset
;
u32
db_shift
;
...
...
@@ -126,8 +124,7 @@ struct ocrdma_create_srq_uresp {
u32
db_rq_offset
;
u32
db_shift
;
u32
free_rqe_delta
;
u32
rsvd2
;
u64
rsvd2
;
u64
rsvd3
;
}
__packed
;
...
...
drivers/infiniband/hw/ocrdma/ocrdma_hw.c
浏览文件 @
20952cdd
...
...
@@ -732,7 +732,7 @@ static void ocrdma_dispatch_ibevent(struct ocrdma_dev *dev,
break
;
case
OCRDMA_SRQ_LIMIT_EVENT
:
ib_evt
.
element
.
srq
=
&
qp
->
srq
->
ibsrq
;
ib_evt
.
event
=
IB_EVENT_
QP_LAST_WQE
_REACHED
;
ib_evt
.
event
=
IB_EVENT_
SRQ_LIMIT
_REACHED
;
srq_event
=
1
;
qp_event
=
0
;
break
;
...
...
@@ -1990,19 +1990,12 @@ static void ocrdma_get_create_qp_rsp(struct ocrdma_create_qp_rsp *rsp,
max_wqe_allocated
=
1
<<
max_wqe_allocated
;
max_rqe_allocated
=
1
<<
((
u16
)
rsp
->
max_wqe_rqe
);
if
(
qp
->
dev
->
nic_info
.
dev_family
==
OCRDMA_GEN2_FAMILY
)
{
qp
->
sq
.
free_delta
=
0
;
qp
->
rq
.
free_delta
=
1
;
}
else
qp
->
sq
.
free_delta
=
1
;
qp
->
sq
.
max_cnt
=
max_wqe_allocated
;
qp
->
sq
.
max_wqe_idx
=
max_wqe_allocated
-
1
;
if
(
!
attrs
->
srq
)
{
qp
->
rq
.
max_cnt
=
max_rqe_allocated
;
qp
->
rq
.
max_wqe_idx
=
max_rqe_allocated
-
1
;
qp
->
rq
.
free_delta
=
1
;
}
}
...
...
drivers/infiniband/hw/ocrdma/ocrdma_main.c
浏览文件 @
20952cdd
...
...
@@ -26,7 +26,6 @@
*******************************************************************/
#include <linux/module.h>
#include <linux/version.h>
#include <linux/idr.h>
#include <rdma/ib_verbs.h>
#include <rdma/ib_user_verbs.h>
...
...
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
浏览文件 @
20952cdd
...
...
@@ -940,8 +940,6 @@ static int ocrdma_copy_qp_uresp(struct ocrdma_qp *qp,
uresp
.
db_rq_offset
=
OCRDMA_DB_RQ_OFFSET
;
uresp
.
db_shift
=
16
;
}
uresp
.
free_wqe_delta
=
qp
->
sq
.
free_delta
;
uresp
.
free_rqe_delta
=
qp
->
rq
.
free_delta
;
if
(
qp
->
dpp_enabled
)
{
uresp
.
dpp_credit
=
dpp_credit_lmt
;
...
...
@@ -1307,8 +1305,6 @@ static int ocrdma_hwq_free_cnt(struct ocrdma_qp_hwq_info *q)
free_cnt
=
(
q
->
max_cnt
-
q
->
head
)
+
q
->
tail
;
else
free_cnt
=
q
->
tail
-
q
->
head
;
if
(
q
->
free_delta
)
free_cnt
-=
q
->
free_delta
;
return
free_cnt
;
}
...
...
@@ -1501,7 +1497,6 @@ static int ocrdma_copy_srq_uresp(struct ocrdma_srq *srq, struct ib_udata *udata)
(
srq
->
pd
->
id
*
srq
->
dev
->
nic_info
.
db_page_size
);
uresp
.
db_page_size
=
srq
->
dev
->
nic_info
.
db_page_size
;
uresp
.
num_rqe_allocated
=
srq
->
rq
.
max_cnt
;
uresp
.
free_rqe_delta
=
1
;
if
(
srq
->
dev
->
nic_info
.
dev_family
==
OCRDMA_GEN2_FAMILY
)
{
uresp
.
db_rq_offset
=
OCRDMA_DB_GEN2_RQ1_OFFSET
;
uresp
.
db_shift
=
24
;
...
...
drivers/infiniband/hw/ocrdma/ocrdma_verbs.h
浏览文件 @
20952cdd
...
...
@@ -28,7 +28,6 @@
#ifndef __OCRDMA_VERBS_H__
#define __OCRDMA_VERBS_H__
#include <linux/version.h>
int
ocrdma_post_send
(
struct
ib_qp
*
,
struct
ib_send_wr
*
,
struct
ib_send_wr
**
bad_wr
);
int
ocrdma_post_recv
(
struct
ib_qp
*
,
struct
ib_recv_wr
*
,
...
...
drivers/net/ethernet/mellanox/mlx4/port.c
浏览文件 @
20952cdd
...
...
@@ -697,10 +697,10 @@ static int mlx4_common_set_port(struct mlx4_dev *dev, int slave, u32 in_mod,
if
(
slave
!=
dev
->
caps
.
function
)
memset
(
inbox
->
buf
,
0
,
256
);
if
(
dev
->
flags
&
MLX4_FLAG_OLD_PORT_CMDS
)
{
*
(
u8
*
)
inbox
->
buf
=
!!
reset_qkey_viols
<<
6
;
*
(
u8
*
)
inbox
->
buf
|
=
!!
reset_qkey_viols
<<
6
;
((
__be32
*
)
inbox
->
buf
)[
2
]
=
agg_cap_mask
;
}
else
{
((
u8
*
)
inbox
->
buf
)[
3
]
=
!!
reset_qkey_viols
;
((
u8
*
)
inbox
->
buf
)[
3
]
|
=
!!
reset_qkey_viols
;
((
__be32
*
)
inbox
->
buf
)[
1
]
=
agg_cap_mask
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录