Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
886d7f44
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
886d7f44
编写于
1月 14, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6
上级
b7e2041e
5b874e25
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
14 deletion
+14
-14
drivers/net/sfc/efx.c
drivers/net/sfc/efx.c
+6
-12
drivers/net/sfc/net_driver.h
drivers/net/sfc/net_driver.h
+8
-2
未找到文件。
drivers/net/sfc/efx.c
浏览文件 @
886d7f44
...
...
@@ -1153,6 +1153,9 @@ static int efx_wanted_channels(void)
int
count
;
int
cpu
;
if
(
rss_cpus
)
return
rss_cpus
;
if
(
unlikely
(
!
zalloc_cpumask_var
(
&
core_mask
,
GFP_KERNEL
)))
{
printk
(
KERN_WARNING
"sfc: RSS disabled due to allocation failure
\n
"
);
...
...
@@ -1266,27 +1269,18 @@ static void efx_remove_interrupts(struct efx_nic *efx)
efx
->
legacy_irq
=
0
;
}
struct
efx_tx_queue
*
efx_get_tx_queue
(
struct
efx_nic
*
efx
,
unsigned
index
,
unsigned
type
)
{
unsigned
tx_channel_offset
=
separate_tx_channels
?
efx
->
n_channels
-
efx
->
n_tx_channels
:
0
;
EFX_BUG_ON_PARANOID
(
index
>=
efx
->
n_tx_channels
||
type
>=
EFX_TXQ_TYPES
);
return
&
efx
->
channel
[
tx_channel_offset
+
index
]
->
tx_queue
[
type
];
}
static
void
efx_set_channels
(
struct
efx_nic
*
efx
)
{
struct
efx_channel
*
channel
;
struct
efx_tx_queue
*
tx_queue
;
unsigned
tx_channel_offset
=
efx
->
tx_channel_offset
=
separate_tx_channels
?
efx
->
n_channels
-
efx
->
n_tx_channels
:
0
;
/* Channel pointers were set in efx_init_struct() but we now
* need to clear them for TX queues in any RX-only channels. */
efx_for_each_channel
(
channel
,
efx
)
{
if
(
channel
->
channel
-
tx_channel_offset
>=
if
(
channel
->
channel
-
efx
->
tx_channel_offset
>=
efx
->
n_tx_channels
)
{
efx_for_each_channel_tx_queue
(
tx_queue
,
channel
)
tx_queue
->
channel
=
NULL
;
...
...
drivers/net/sfc/net_driver.h
浏览文件 @
886d7f44
...
...
@@ -735,6 +735,7 @@ struct efx_nic {
unsigned
next_buffer_table
;
unsigned
n_channels
;
unsigned
n_rx_channels
;
unsigned
tx_channel_offset
;
unsigned
n_tx_channels
;
unsigned
int
rx_buffer_len
;
unsigned
int
rx_buffer_order
;
...
...
@@ -929,8 +930,13 @@ efx_get_channel(struct efx_nic *efx, unsigned index)
_channel = (_channel->channel + 1 < (_efx)->n_channels) ? \
(_efx)->channel[_channel->channel + 1] : NULL)
extern
struct
efx_tx_queue
*
efx_get_tx_queue
(
struct
efx_nic
*
efx
,
unsigned
index
,
unsigned
type
);
static
inline
struct
efx_tx_queue
*
efx_get_tx_queue
(
struct
efx_nic
*
efx
,
unsigned
index
,
unsigned
type
)
{
EFX_BUG_ON_PARANOID
(
index
>=
efx
->
n_tx_channels
||
type
>=
EFX_TXQ_TYPES
);
return
&
efx
->
channel
[
efx
->
tx_channel_offset
+
index
]
->
tx_queue
[
type
];
}
static
inline
struct
efx_tx_queue
*
efx_channel_get_tx_queue
(
struct
efx_channel
*
channel
,
unsigned
type
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录