Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4dc6ec26
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看板
提交
4dc6ec26
编写于
13年前
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'batman-adv/next' of
git://git.open-mesh.org/ecsv/linux-merge
上级
7be799a7
ca06c6eb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
6 deletion
+27
-6
net/batman-adv/aggregation.c
net/batman-adv/aggregation.c
+11
-3
net/batman-adv/send.c
net/batman-adv/send.c
+16
-3
未找到文件。
net/batman-adv/aggregation.c
浏览文件 @
4dc6ec26
...
...
@@ -23,6 +23,7 @@
#include "aggregation.h"
#include "send.h"
#include "routing.h"
#include "hard-interface.h"
/* calculate the size of the tt information for a given packet */
static
int
tt_len
(
struct
batman_packet
*
batman_packet
)
...
...
@@ -105,12 +106,15 @@ static void new_aggregated_packet(unsigned char *packet_buff, int packet_len,
struct
forw_packet
*
forw_packet_aggr
;
unsigned
char
*
skb_buff
;
if
(
!
atomic_inc_not_zero
(
&
if_incoming
->
refcount
))
return
;
/* own packet should always be scheduled */
if
(
!
own_packet
)
{
if
(
!
atomic_dec_not_zero
(
&
bat_priv
->
batman_queue_left
))
{
bat_dbg
(
DBG_BATMAN
,
bat_priv
,
"batman packet queue full
\n
"
);
return
;
goto
out
;
}
}
...
...
@@ -118,7 +122,7 @@ static void new_aggregated_packet(unsigned char *packet_buff, int packet_len,
if
(
!
forw_packet_aggr
)
{
if
(
!
own_packet
)
atomic_inc
(
&
bat_priv
->
batman_queue_left
);
return
;
goto
out
;
}
if
((
atomic_read
(
&
bat_priv
->
aggregated_ogms
))
&&
...
...
@@ -133,7 +137,7 @@ static void new_aggregated_packet(unsigned char *packet_buff, int packet_len,
if
(
!
own_packet
)
atomic_inc
(
&
bat_priv
->
batman_queue_left
);
kfree
(
forw_packet_aggr
);
return
;
goto
out
;
}
skb_reserve
(
forw_packet_aggr
->
skb
,
sizeof
(
struct
ethhdr
));
...
...
@@ -164,6 +168,10 @@ static void new_aggregated_packet(unsigned char *packet_buff, int packet_len,
queue_delayed_work
(
bat_event_workqueue
,
&
forw_packet_aggr
->
delayed_work
,
send_time
-
jiffies
);
return
;
out:
hardif_free_ref
(
if_incoming
);
}
/* aggregate a new packet into the existing aggregation */
...
...
This diff is collapsed.
Click to expand it.
net/batman-adv/send.c
浏览文件 @
4dc6ec26
...
...
@@ -377,6 +377,8 @@ static void forw_packet_free(struct forw_packet *forw_packet)
{
if
(
forw_packet
->
skb
)
kfree_skb
(
forw_packet
->
skb
);
if
(
forw_packet
->
if_incoming
)
hardif_free_ref
(
forw_packet
->
if_incoming
);
kfree
(
forw_packet
);
}
...
...
@@ -419,7 +421,7 @@ int add_bcast_packet_to_list(struct bat_priv *bat_priv, struct sk_buff *skb)
primary_if
=
primary_if_get_selected
(
bat_priv
);
if
(
!
primary_if
)
goto
out
;
goto
out
_and_inc
;
forw_packet
=
kmalloc
(
sizeof
(
struct
forw_packet
),
GFP_ATOMIC
);
...
...
@@ -539,6 +541,7 @@ void purge_outstanding_packets(struct bat_priv *bat_priv,
{
struct
forw_packet
*
forw_packet
;
struct
hlist_node
*
tmp_node
,
*
safe_tmp_node
;
bool
pending
;
if
(
hard_iface
)
bat_dbg
(
DBG_BATMAN
,
bat_priv
,
...
...
@@ -567,8 +570,13 @@ void purge_outstanding_packets(struct bat_priv *bat_priv,
* send_outstanding_bcast_packet() will lock the list to
* delete the item from the list
*/
cancel_delayed_work_sync
(
&
forw_packet
->
delayed_work
);
pending
=
cancel_delayed_work_sync
(
&
forw_packet
->
delayed_work
);
spin_lock_bh
(
&
bat_priv
->
forw_bcast_list_lock
);
if
(
pending
)
{
hlist_del
(
&
forw_packet
->
list
);
forw_packet_free
(
forw_packet
);
}
}
spin_unlock_bh
(
&
bat_priv
->
forw_bcast_list_lock
);
...
...
@@ -591,8 +599,13 @@ void purge_outstanding_packets(struct bat_priv *bat_priv,
* send_outstanding_bat_packet() will lock the list to
* delete the item from the list
*/
cancel_delayed_work_sync
(
&
forw_packet
->
delayed_work
);
pending
=
cancel_delayed_work_sync
(
&
forw_packet
->
delayed_work
);
spin_lock_bh
(
&
bat_priv
->
forw_bat_list_lock
);
if
(
pending
)
{
hlist_del
(
&
forw_packet
->
list
);
forw_packet_free
(
forw_packet
);
}
}
spin_unlock_bh
(
&
bat_priv
->
forw_bat_list_lock
);
}
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部