Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
96b2e73c
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
96b2e73c
编写于
6月 02, 2014
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "net/mlx4_en: Use affinity hint"
This reverts commit
70a640d0
. Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
d64eed1d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
4 addition
and
50 deletion
+4
-50
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/main.c
+1
-1
drivers/net/ethernet/mellanox/mlx4/en_cq.c
drivers/net/ethernet/mellanox/mlx4/en_cq.c
+1
-5
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+0
-30
drivers/net/ethernet/mellanox/mlx4/eq.c
drivers/net/ethernet/mellanox/mlx4/eq.c
+1
-12
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+0
-1
include/linux/mlx4/device.h
include/linux/mlx4/device.h
+1
-1
未找到文件。
drivers/infiniband/hw/mlx4/main.c
浏览文件 @
96b2e73c
...
...
@@ -1897,7 +1897,7 @@ static void mlx4_ib_alloc_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
i
,
j
,
dev
->
pdev
->
bus
->
name
);
/* Set IRQ for specific name (per ring) */
if
(
mlx4_assign_eq
(
dev
,
name
,
NULL
,
&
ibdev
->
eq_table
[
eq
]
,
NULL
))
{
&
ibdev
->
eq_table
[
eq
]))
{
/* Use legacy (same as mlx4_en driver) */
pr_warn
(
"Can't allocate EQ %d; reverting to legacy
\n
"
,
eq
);
ibdev
->
eq_table
[
eq
]
=
...
...
drivers/net/ethernet/mellanox/mlx4/en_cq.c
浏览文件 @
96b2e73c
...
...
@@ -118,15 +118,11 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
if
(
cq
->
is_tx
==
RX
)
{
if
(
mdev
->
dev
->
caps
.
comp_pool
)
{
if
(
!
cq
->
vector
)
{
struct
mlx4_en_rx_ring
*
ring
=
priv
->
rx_ring
[
cq
->
ring
];
sprintf
(
name
,
"%s-%d"
,
priv
->
dev
->
name
,
cq
->
ring
);
/* Set IRQ for specific name (per ring) */
if
(
mlx4_assign_eq
(
mdev
->
dev
,
name
,
rmap
,
&
cq
->
vector
,
ring
->
affinity_mask
))
{
&
cq
->
vector
))
{
cq
->
vector
=
(
cq
->
ring
+
1
+
priv
->
port
)
%
mdev
->
dev
->
caps
.
num_comp_vectors
;
mlx4_warn
(
mdev
,
"Failed assigning an EQ to %s, falling back to legacy EQ's
\n
"
,
...
...
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
浏览文件 @
96b2e73c
...
...
@@ -1526,32 +1526,6 @@ static void mlx4_en_linkstate(struct work_struct *work)
mutex_unlock
(
&
mdev
->
state_lock
);
}
static
void
mlx4_en_init_affinity_hint
(
struct
mlx4_en_priv
*
priv
,
int
ring_idx
)
{
struct
mlx4_en_rx_ring
*
ring
=
priv
->
rx_ring
[
ring_idx
];
int
numa_node
=
priv
->
mdev
->
dev
->
numa_node
;
if
(
numa_node
==
-
1
)
return
;
if
(
!
zalloc_cpumask_var
(
&
ring
->
affinity_mask
,
GFP_KERNEL
))
{
en_err
(
priv
,
"Failed to allocate core mask
\n
"
);
return
;
}
if
(
cpumask_set_cpu_local_first
(
ring_idx
,
numa_node
,
ring
->
affinity_mask
))
{
en_err
(
priv
,
"Failed setting affinity hint
\n
"
);
free_cpumask_var
(
ring
->
affinity_mask
);
ring
->
affinity_mask
=
NULL
;
}
}
static
void
mlx4_en_free_affinity_hint
(
struct
mlx4_en_priv
*
priv
,
int
ring_idx
)
{
free_cpumask_var
(
priv
->
rx_ring
[
ring_idx
]
->
affinity_mask
);
priv
->
rx_ring
[
ring_idx
]
->
affinity_mask
=
NULL
;
}
int
mlx4_en_start_port
(
struct
net_device
*
dev
)
{
...
...
@@ -1593,8 +1567,6 @@ int mlx4_en_start_port(struct net_device *dev)
mlx4_en_cq_init_lock
(
cq
);
mlx4_en_init_affinity_hint
(
priv
,
i
);
err
=
mlx4_en_activate_cq
(
priv
,
cq
,
i
);
if
(
err
)
{
en_err
(
priv
,
"Failed activating Rx CQ
\n
"
);
...
...
@@ -1875,8 +1847,6 @@ void mlx4_en_stop_port(struct net_device *dev, int detach)
msleep
(
1
);
mlx4_en_deactivate_rx_ring
(
priv
,
priv
->
rx_ring
[
i
]);
mlx4_en_deactivate_cq
(
priv
,
cq
);
mlx4_en_free_affinity_hint
(
priv
,
i
);
}
}
...
...
drivers/net/ethernet/mellanox/mlx4/eq.c
浏览文件 @
96b2e73c
...
...
@@ -1376,7 +1376,7 @@ int mlx4_test_interrupts(struct mlx4_dev *dev)
EXPORT_SYMBOL
(
mlx4_test_interrupts
);
int
mlx4_assign_eq
(
struct
mlx4_dev
*
dev
,
char
*
name
,
struct
cpu_rmap
*
rmap
,
int
*
vector
,
cpumask_var_t
cpu_hint_mask
)
int
*
vector
)
{
struct
mlx4_priv
*
priv
=
mlx4_priv
(
dev
);
...
...
@@ -1411,15 +1411,6 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char *name, struct cpu_rmap *rmap,
}
mlx4_assign_irq_notifier
(
priv
,
dev
,
priv
->
eq_table
.
eq
[
vec
].
irq
);
if
(
cpu_hint_mask
)
{
err
=
irq_set_affinity_hint
(
priv
->
eq_table
.
eq
[
vec
].
irq
,
cpu_hint_mask
);
if
(
err
)
{
mlx4_warn
(
dev
,
"Failed setting affinity hint
\n
"
);
/*we dont want to break here*/
}
}
eq_set_ci
(
&
priv
->
eq_table
.
eq
[
vec
],
1
);
}
...
...
@@ -1450,8 +1441,6 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec)
irq_set_affinity_notifier
(
priv
->
eq_table
.
eq
[
vec
].
irq
,
NULL
);
irq_set_affinity_hint
(
priv
->
eq_table
.
eq
[
vec
].
irq
,
NULL
);
free_irq
(
priv
->
eq_table
.
eq
[
vec
].
irq
,
&
priv
->
eq_table
.
eq
[
vec
]);
priv
->
msix_ctl
.
pool_bm
&=
~
(
1ULL
<<
i
);
...
...
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
浏览文件 @
96b2e73c
...
...
@@ -313,7 +313,6 @@ struct mlx4_en_rx_ring {
unsigned
long
csum_ok
;
unsigned
long
csum_none
;
int
hwtstamp_rx_filter
;
cpumask_var_t
affinity_mask
;
};
struct
mlx4_en_cq
{
...
...
include/linux/mlx4/device.h
浏览文件 @
96b2e73c
...
...
@@ -1161,7 +1161,7 @@ int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
int
mlx4_SYNC_TPT
(
struct
mlx4_dev
*
dev
);
int
mlx4_test_interrupts
(
struct
mlx4_dev
*
dev
);
int
mlx4_assign_eq
(
struct
mlx4_dev
*
dev
,
char
*
name
,
struct
cpu_rmap
*
rmap
,
int
*
vector
,
cpumask_t
*
cpu_hint_mask
);
int
*
vector
);
void
mlx4_release_eq
(
struct
mlx4_dev
*
dev
,
int
vec
);
int
mlx4_get_phys_port_id
(
struct
mlx4_dev
*
dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录