Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
cce28794
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
cce28794
编写于
10月 02, 2013
作者:
J
Jon Cooper
提交者:
Ben Hutchings
12月 12, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sfc: Make initial fill of RX descriptors synchronous
Signed-off-by:
N
Ben Hutchings
<
bhutchings@solarflare.com
>
上级
92a04168
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
9 deletion
+12
-9
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/ef10.c
+1
-1
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.c
+4
-2
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/efx.h
+1
-1
drivers/net/ethernet/sfc/farch.c
drivers/net/ethernet/sfc/farch.c
+1
-1
drivers/net/ethernet/sfc/rx.c
drivers/net/ethernet/sfc/rx.c
+5
-4
未找到文件。
drivers/net/ethernet/sfc/ef10.c
浏览文件 @
cce28794
...
...
@@ -1907,7 +1907,7 @@ static void efx_ef10_handle_driver_generated_event(struct efx_channel *channel,
* events, so efx_process_channel() won't refill the
* queue. Refill it here
*/
efx_fast_push_rx_descriptors
(
&
channel
->
rx_queue
);
efx_fast_push_rx_descriptors
(
&
channel
->
rx_queue
,
true
);
break
;
default:
netif_err
(
efx
,
hw
,
efx
->
net_dev
,
...
...
drivers/net/ethernet/sfc/efx.c
浏览文件 @
cce28794
...
...
@@ -253,7 +253,7 @@ static int efx_process_channel(struct efx_channel *channel, int budget)
efx_channel_get_rx_queue
(
channel
);
efx_rx_flush_packet
(
channel
);
efx_fast_push_rx_descriptors
(
rx_queue
);
efx_fast_push_rx_descriptors
(
rx_queue
,
true
);
}
return
spent
;
...
...
@@ -646,7 +646,9 @@ static void efx_start_datapath(struct efx_nic *efx)
efx_for_each_channel_rx_queue
(
rx_queue
,
channel
)
{
efx_init_rx_queue
(
rx_queue
);
atomic_inc
(
&
efx
->
active_queues
);
efx_nic_generate_fill_event
(
rx_queue
);
efx_stop_eventq
(
channel
);
efx_fast_push_rx_descriptors
(
rx_queue
,
false
);
efx_start_eventq
(
channel
);
}
WARN_ON
(
channel
->
rx_pkt_n_frags
);
...
...
drivers/net/ethernet/sfc/efx.h
浏览文件 @
cce28794
...
...
@@ -37,7 +37,7 @@ int efx_probe_rx_queue(struct efx_rx_queue *rx_queue);
void
efx_remove_rx_queue
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_init_rx_queue
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_fini_rx_queue
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
,
bool
atomic
);
void
efx_rx_slow_fill
(
unsigned
long
context
);
void
__efx_rx_packet
(
struct
efx_channel
*
channel
);
void
efx_rx_packet
(
struct
efx_rx_queue
*
rx_queue
,
unsigned
int
index
,
...
...
drivers/net/ethernet/sfc/farch.c
浏览文件 @
cce28794
...
...
@@ -1147,7 +1147,7 @@ static void efx_farch_handle_generated_event(struct efx_channel *channel,
/* The queue must be empty, so we won't receive any rx
* events, so efx_process_channel() won't refill the
* queue. Refill it here */
efx_fast_push_rx_descriptors
(
rx_queue
);
efx_fast_push_rx_descriptors
(
rx_queue
,
true
);
}
else
if
(
rx_queue
&&
magic
==
EFX_CHANNEL_MAGIC_RX_DRAIN
(
rx_queue
))
{
efx_farch_handle_drain_event
(
channel
);
}
else
if
(
code
==
_EFX_CHANNEL_MAGIC_TX_DRAIN
)
{
...
...
drivers/net/ethernet/sfc/rx.c
浏览文件 @
cce28794
...
...
@@ -149,7 +149,7 @@ static struct page *efx_reuse_page(struct efx_rx_queue *rx_queue)
* 0 on success. If a single page can be used for multiple buffers,
* then the page will either be inserted fully, or not at all.
*/
static
int
efx_init_rx_buffers
(
struct
efx_rx_queue
*
rx_queue
)
static
int
efx_init_rx_buffers
(
struct
efx_rx_queue
*
rx_queue
,
bool
atomic
)
{
struct
efx_nic
*
efx
=
rx_queue
->
efx
;
struct
efx_rx_buffer
*
rx_buf
;
...
...
@@ -163,7 +163,8 @@ static int efx_init_rx_buffers(struct efx_rx_queue *rx_queue)
do
{
page
=
efx_reuse_page
(
rx_queue
);
if
(
page
==
NULL
)
{
page
=
alloc_pages
(
__GFP_COLD
|
__GFP_COMP
|
GFP_ATOMIC
,
page
=
alloc_pages
(
__GFP_COLD
|
__GFP_COMP
|
(
atomic
?
GFP_ATOMIC
:
GFP_KERNEL
),
efx
->
rx_buffer_order
);
if
(
unlikely
(
page
==
NULL
))
return
-
ENOMEM
;
...
...
@@ -321,7 +322,7 @@ static void efx_discard_rx_packet(struct efx_channel *channel,
* this means this function must run from the NAPI handler, or be called
* when NAPI is disabled.
*/
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
)
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
,
bool
atomic
)
{
struct
efx_nic
*
efx
=
rx_queue
->
efx
;
unsigned
int
fill_level
,
batch_size
;
...
...
@@ -354,7 +355,7 @@ void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue)
do
{
rc
=
efx_init_rx_buffers
(
rx_queue
);
rc
=
efx_init_rx_buffers
(
rx_queue
,
atomic
);
if
(
unlikely
(
rc
))
{
/* Ensure that we don't leave the rx queue empty */
if
(
rx_queue
->
added_count
==
rx_queue
->
removed_count
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录