Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
56be1788
Commit
56be1788
authored
Dec 30, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tipc-Dec29-2011' of
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
parents
7f8e3234
f19765f4
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
248 additions
and
237 deletions
+248
-237
net/tipc/bcast.c
net/tipc/bcast.c
+23
-23
net/tipc/bcast.h
net/tipc/bcast.h
+5
-5
net/tipc/bearer.c
net/tipc/bearer.c
+22
-20
net/tipc/bearer.h
net/tipc/bearer.h
+12
-11
net/tipc/discover.c
net/tipc/discover.c
+10
-10
net/tipc/discover.h
net/tipc/discover.h
+4
-4
net/tipc/eth_media.c
net/tipc/eth_media.c
+2
-2
net/tipc/link.c
net/tipc/link.c
+80
-75
net/tipc/link.h
net/tipc/link.h
+27
-25
net/tipc/name_distr.c
net/tipc/name_distr.c
+1
-1
net/tipc/name_table.c
net/tipc/name_table.c
+8
-7
net/tipc/name_table.h
net/tipc/name_table.h
+5
-5
net/tipc/node.c
net/tipc/node.c
+9
-9
net/tipc/node.h
net/tipc/node.h
+6
-6
net/tipc/port.c
net/tipc/port.c
+4
-4
net/tipc/port.h
net/tipc/port.h
+2
-2
net/tipc/subscr.c
net/tipc/subscr.c
+23
-23
net/tipc/subscr.h
net/tipc/subscr.h
+5
-5
No files found.
net/tipc/bcast.c
View file @
56be1788
...
...
@@ -46,7 +46,7 @@
#define BCLINK_WIN_DEFAULT 20
/* bcast link window size (default) */
/**
* struct bcbearer_pair - a pair of bearers used by broadcast link
* struct
tipc_
bcbearer_pair - a pair of bearers used by broadcast link
* @primary: pointer to primary bearer
* @secondary: pointer to secondary bearer
*
...
...
@@ -54,13 +54,13 @@
* to be paired.
*/
struct
bcbearer_pair
{
struct
tipc_
bcbearer_pair
{
struct
tipc_bearer
*
primary
;
struct
tipc_bearer
*
secondary
;
};
/**
* struct bcbearer - bearer used by broadcast link
* struct
tipc_
bcbearer - bearer used by broadcast link
* @bearer: (non-standard) broadcast bearer structure
* @media: (non-standard) broadcast media structure
* @bpairs: array of bearer pairs
...
...
@@ -74,17 +74,17 @@ struct bcbearer_pair {
* prevented through use of the spinlock "bc_lock".
*/
struct
bcbearer
{
struct
tipc_
bcbearer
{
struct
tipc_bearer
bearer
;
struct
media
media
;
struct
bcbearer_pair
bpairs
[
MAX_BEARERS
];
struct
bcbearer_pair
bpairs_temp
[
TIPC_MAX_LINK_PRI
+
1
];
struct
tipc_
media
media
;
struct
tipc_
bcbearer_pair
bpairs
[
MAX_BEARERS
];
struct
tipc_
bcbearer_pair
bpairs_temp
[
TIPC_MAX_LINK_PRI
+
1
];
struct
tipc_node_map
remains
;
struct
tipc_node_map
remains_new
;
};
/**
* struct bclink - link used for broadcast messages
* struct
tipc_
bclink - link used for broadcast messages
* @link: (non-standard) broadcast link structure
* @node: (non-standard) node structure representing b'cast link's peer node
* @bcast_nodes: map of broadcast-capable nodes
...
...
@@ -93,19 +93,19 @@ struct bcbearer {
* Handles sequence numbering, fragmentation, bundling, etc.
*/
struct
bclink
{
struct
link
link
;
struct
tipc_
bclink
{
struct
tipc_
link
link
;
struct
tipc_node
node
;
struct
tipc_node_map
bcast_nodes
;
struct
tipc_node
*
retransmit_to
;
};
static
struct
bcbearer
bcast_bearer
;
static
struct
bclink
bcast_link
;
static
struct
tipc_
bcbearer
bcast_bearer
;
static
struct
tipc_
bclink
bcast_link
;
static
struct
bcbearer
*
bcbearer
=
&
bcast_bearer
;
static
struct
bclink
*
bclink
=
&
bcast_link
;
static
struct
link
*
bcl
=
&
bcast_link
.
link
;
static
struct
tipc_
bcbearer
*
bcbearer
=
&
bcast_bearer
;
static
struct
tipc_
bclink
*
bclink
=
&
bcast_link
;
static
struct
tipc_
link
*
bcl
=
&
bcast_link
.
link
;
static
DEFINE_SPINLOCK
(
bc_lock
);
...
...
@@ -308,7 +308,7 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
static
void
bclink_send_ack
(
struct
tipc_node
*
n_ptr
)
{
struct
link
*
l_ptr
=
n_ptr
->
active_links
[
n_ptr
->
addr
&
1
];
struct
tipc_
link
*
l_ptr
=
n_ptr
->
active_links
[
n_ptr
->
addr
&
1
];
if
(
l_ptr
!=
NULL
)
tipc_link_send_proto_msg
(
l_ptr
,
STATE_MSG
,
0
,
0
,
0
,
0
,
0
);
...
...
@@ -677,8 +677,8 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
void
tipc_bcbearer_sort
(
void
)
{
struct
bcbearer_pair
*
bp_temp
=
bcbearer
->
bpairs_temp
;
struct
bcbearer_pair
*
bp_curr
;
struct
tipc_
bcbearer_pair
*
bp_temp
=
bcbearer
->
bpairs_temp
;
struct
tipc_
bcbearer_pair
*
bp_curr
;
int
b_index
;
int
pri
;
...
...
@@ -893,9 +893,9 @@ static void tipc_nmap_diff(struct tipc_node_map *nm_a,
* tipc_port_list_add - add a port to a port list, ensuring no duplicates
*/
void
tipc_port_list_add
(
struct
port_list
*
pl_ptr
,
u32
port
)
void
tipc_port_list_add
(
struct
tipc_
port_list
*
pl_ptr
,
u32
port
)
{
struct
port_list
*
item
=
pl_ptr
;
struct
tipc_
port_list
*
item
=
pl_ptr
;
int
i
;
int
item_sz
=
PLSIZE
;
int
cnt
=
pl_ptr
->
count
;
...
...
@@ -927,10 +927,10 @@ void tipc_port_list_add(struct port_list *pl_ptr, u32 port)
*
*/
void
tipc_port_list_free
(
struct
port_list
*
pl_ptr
)
void
tipc_port_list_free
(
struct
tipc_
port_list
*
pl_ptr
)
{
struct
port_list
*
item
;
struct
port_list
*
next
;
struct
tipc_
port_list
*
item
;
struct
tipc_
port_list
*
next
;
for
(
item
=
pl_ptr
->
next
;
item
;
item
=
next
)
{
next
=
item
->
next
;
...
...
net/tipc/bcast.h
View file @
56be1788
...
...
@@ -54,15 +54,15 @@ struct tipc_node_map {
#define PLSIZE 32
/**
* struct port_list - set of node local destination ports
* struct
tipc_
port_list - set of node local destination ports
* @count: # of ports in set (only valid for first entry in list)
* @next: pointer to next entry in list
* @ports: array of port references
*/
struct
port_list
{
struct
tipc_
port_list
{
int
count
;
struct
port_list
*
next
;
struct
tipc_
port_list
*
next
;
u32
ports
[
PLSIZE
];
};
...
...
@@ -83,8 +83,8 @@ static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_m
return
!
memcmp
(
nm_a
,
nm_b
,
sizeof
(
*
nm_a
));
}
void
tipc_port_list_add
(
struct
port_list
*
pl_ptr
,
u32
port
);
void
tipc_port_list_free
(
struct
port_list
*
pl_ptr
);
void
tipc_port_list_add
(
struct
tipc_
port_list
*
pl_ptr
,
u32
port
);
void
tipc_port_list_free
(
struct
tipc_
port_list
*
pl_ptr
);
void
tipc_bclink_init
(
void
);
void
tipc_bclink_stop
(
void
);
...
...
net/tipc/bearer.c
View file @
56be1788
...
...
@@ -41,7 +41,7 @@
#define MAX_ADDR_STR 32
static
struct
media
*
media_list
[
MAX_MEDIA
];
static
struct
tipc_
media
*
media_list
[
MAX_MEDIA
];
static
u32
media_count
;
struct
tipc_bearer
tipc_bearers
[
MAX_BEARERS
];
...
...
@@ -68,7 +68,7 @@ static int media_name_valid(const char *name)
* tipc_media_find - locates specified media object by name
*/
struct
media
*
tipc_media_find
(
const
char
*
name
)
struct
tipc_
media
*
tipc_media_find
(
const
char
*
name
)
{
u32
i
;
...
...
@@ -83,7 +83,7 @@ struct media *tipc_media_find(const char *name)
* media_find_id - locates specified media object by type identifier
*/
static
struct
media
*
media_find_id
(
u8
type
)
static
struct
tipc_
media
*
media_find_id
(
u8
type
)
{
u32
i
;
...
...
@@ -100,7 +100,7 @@ static struct media *media_find_id(u8 type)
* Bearers for this media type must be activated separately at a later stage.
*/
int
tipc_register_media
(
struct
media
*
m_ptr
)
int
tipc_register_media
(
struct
tipc_
media
*
m_ptr
)
{
int
res
=
-
EINVAL
;
...
...
@@ -138,7 +138,7 @@ int tipc_register_media(struct media *m_ptr)
void
tipc_media_addr_printf
(
struct
print_buf
*
pb
,
struct
tipc_media_addr
*
a
)
{
char
addr_str
[
MAX_ADDR_STR
];
struct
media
*
m_ptr
;
struct
tipc_
media
*
m_ptr
;
m_ptr
=
media_find_id
(
a
->
media_id
);
...
...
@@ -185,7 +185,7 @@ struct sk_buff *tipc_media_get_names(void)
*/
static
int
bearer_name_validate
(
const
char
*
name
,
struct
bearer_name
*
name_parts
)
struct
tipc_bearer_names
*
name_parts
)
{
char
name_copy
[
TIPC_MAX_BEARER_NAME
];
char
*
media_name
;
...
...
@@ -318,7 +318,7 @@ void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest)
static
int
bearer_push
(
struct
tipc_bearer
*
b_ptr
)
{
u32
res
=
0
;
struct
link
*
ln
,
*
tln
;
struct
tipc_
link
*
ln
,
*
tln
;
if
(
b_ptr
->
blocked
)
return
0
;
...
...
@@ -364,7 +364,8 @@ void tipc_continue(struct tipc_bearer *b_ptr)
* bearer.lock is busy
*/
static
void
tipc_bearer_schedule_unlocked
(
struct
tipc_bearer
*
b_ptr
,
struct
link
*
l_ptr
)
static
void
tipc_bearer_schedule_unlocked
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_link
*
l_ptr
)
{
list_move_tail
(
&
l_ptr
->
link_list
,
&
b_ptr
->
cong_links
);
}
...
...
@@ -377,7 +378,7 @@ static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link
* bearer.lock is free
*/
void
tipc_bearer_schedule
(
struct
tipc_bearer
*
b_ptr
,
struct
link
*
l_ptr
)
void
tipc_bearer_schedule
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_
link
*
l_ptr
)
{
spin_lock_bh
(
&
b_ptr
->
lock
);
tipc_bearer_schedule_unlocked
(
b_ptr
,
l_ptr
);
...
...
@@ -390,7 +391,8 @@ void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr)
* and if there is, try to resolve it before returning.
* 'tipc_net_lock' is read_locked when this function is called
*/
int
tipc_bearer_resolve_congestion
(
struct
tipc_bearer
*
b_ptr
,
struct
link
*
l_ptr
)
int
tipc_bearer_resolve_congestion
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_link
*
l_ptr
)
{
int
res
=
1
;
...
...
@@ -409,7 +411,7 @@ int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr
* tipc_bearer_congested - determines if bearer is currently congested
*/
int
tipc_bearer_congested
(
struct
tipc_bearer
*
b_ptr
,
struct
link
*
l_ptr
)
int
tipc_bearer_congested
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_
link
*
l_ptr
)
{
if
(
unlikely
(
b_ptr
->
blocked
))
return
1
;
...
...
@@ -425,8 +427,8 @@ int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr)
int
tipc_enable_bearer
(
const
char
*
name
,
u32
disc_domain
,
u32
priority
)
{
struct
tipc_bearer
*
b_ptr
;
struct
media
*
m_ptr
;
struct
bearer_name
b_name
;
struct
tipc_
media
*
m_ptr
;
struct
tipc_bearer_names
b_names
;
char
addr_string
[
16
];
u32
bearer_id
;
u32
with_this_prio
;
...
...
@@ -438,7 +440,7 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
name
);
return
-
ENOPROTOOPT
;
}
if
(
!
bearer_name_validate
(
name
,
&
b_name
))
{
if
(
!
bearer_name_validate
(
name
,
&
b_name
s
))
{
warn
(
"Bearer <%s> rejected, illegal name
\n
"
,
name
);
return
-
EINVAL
;
}
...
...
@@ -463,10 +465,10 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
write_lock_bh
(
&
tipc_net_lock
);
m_ptr
=
tipc_media_find
(
b_name
.
media_name
);
m_ptr
=
tipc_media_find
(
b_name
s
.
media_name
);
if
(
!
m_ptr
)
{
warn
(
"Bearer <%s> rejected, media <%s> not registered
\n
"
,
name
,
b_name
.
media_name
);
b_name
s
.
media_name
);
goto
exit
;
}
...
...
@@ -544,8 +546,8 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
int
tipc_block_bearer
(
const
char
*
name
)
{
struct
tipc_bearer
*
b_ptr
=
NULL
;
struct
link
*
l_ptr
;
struct
link
*
temp_l_ptr
;
struct
tipc_
link
*
l_ptr
;
struct
tipc_
link
*
temp_l_ptr
;
read_lock_bh
(
&
tipc_net_lock
);
b_ptr
=
tipc_bearer_find
(
name
);
...
...
@@ -579,8 +581,8 @@ int tipc_block_bearer(const char *name)
static
void
bearer_disable
(
struct
tipc_bearer
*
b_ptr
)
{
struct
link
*
l_ptr
;
struct
link
*
temp_l_ptr
;
struct
tipc_
link
*
l_ptr
;
struct
tipc_
link
*
temp_l_ptr
;
info
(
"Disabling bearer <%s>
\n
"
,
b_ptr
->
name
);
spin_lock_bh
(
&
b_ptr
->
lock
);
...
...
net/tipc/bearer.h
View file @
56be1788
...
...
@@ -74,7 +74,7 @@ struct tipc_media_addr {
struct
tipc_bearer
;
/**
* struct media - TIPC media information available to internal users
* struct
tipc_
media - TIPC media information available to internal users
* @send_msg: routine which handles buffer transmission
* @enable_bearer: routine which enables a bearer
* @disable_bearer: routine which disables a bearer
...
...
@@ -90,7 +90,7 @@ struct tipc_bearer;
* @name: media name
*/
struct
media
{
struct
tipc_
media
{
int
(
*
send_msg
)(
struct
sk_buff
*
buf
,
struct
tipc_bearer
*
b_ptr
,
struct
tipc_media_addr
*
dest
);
...
...
@@ -139,12 +139,12 @@ struct tipc_bearer {
struct
tipc_media_addr
addr
;
/* initalized by media */
char
name
[
TIPC_MAX_BEARER_NAME
];
spinlock_t
lock
;
struct
media
*
media
;
struct
tipc_
media
*
media
;
u32
priority
;
u32
window
;
u32
tolerance
;
u32
identity
;
struct
link_req
*
link_req
;
struct
tipc_
link_req
*
link_req
;
struct
list_head
links
;
struct
list_head
cong_links
;
int
active
;
...
...
@@ -152,19 +152,19 @@ struct tipc_bearer {
struct
tipc_node_map
nodes
;
};
struct
bearer_name
{
struct
tipc_bearer_names
{
char
media_name
[
TIPC_MAX_MEDIA_NAME
];
char
if_name
[
TIPC_MAX_IF_NAME
];
};
struct
link
;
struct
tipc_
link
;
extern
struct
tipc_bearer
tipc_bearers
[];
/*
* TIPC routines available to supported media types
*/
int
tipc_register_media
(
struct
media
*
m_ptr
);
int
tipc_register_media
(
struct
tipc_
media
*
m_ptr
);
void
tipc_recv_msg
(
struct
sk_buff
*
buf
,
struct
tipc_bearer
*
tb_ptr
);
...
...
@@ -188,12 +188,13 @@ struct sk_buff *tipc_media_get_names(void);
struct
sk_buff
*
tipc_bearer_get_names
(
void
);
void
tipc_bearer_add_dest
(
struct
tipc_bearer
*
b_ptr
,
u32
dest
);
void
tipc_bearer_remove_dest
(
struct
tipc_bearer
*
b_ptr
,
u32
dest
);
void
tipc_bearer_schedule
(
struct
tipc_bearer
*
b_ptr
,
struct
link
*
l_ptr
);
void
tipc_bearer_schedule
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_
link
*
l_ptr
);
struct
tipc_bearer
*
tipc_bearer_find
(
const
char
*
name
);
struct
tipc_bearer
*
tipc_bearer_find_interface
(
const
char
*
if_name
);
struct
media
*
tipc_media_find
(
const
char
*
name
);
int
tipc_bearer_resolve_congestion
(
struct
tipc_bearer
*
b_ptr
,
struct
link
*
l_ptr
);
int
tipc_bearer_congested
(
struct
tipc_bearer
*
b_ptr
,
struct
link
*
l_ptr
);
struct
tipc_media
*
tipc_media_find
(
const
char
*
name
);
int
tipc_bearer_resolve_congestion
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_link
*
l_ptr
);
int
tipc_bearer_congested
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_link
*
l_ptr
);
void
tipc_bearer_stop
(
void
);
void
tipc_bearer_lock_push
(
struct
tipc_bearer
*
b_ptr
);
...
...
net/tipc/discover.c
View file @
56be1788
...
...
@@ -45,7 +45,7 @@
/**
* struct link_req - information about an ongoing link setup request
* struct
tipc_
link_req - information about an ongoing link setup request
* @bearer: bearer issuing requests
* @dest: destination address for request messages
* @domain: network domain to which links can be established
...
...
@@ -54,7 +54,7 @@
* @timer: timer governing period between requests
* @timer_intv: current interval between requests (in ms)
*/
struct
link_req
{
struct
tipc_
link_req
{
struct
tipc_bearer
*
bearer
;
struct
tipc_media_addr
dest
;
u32
domain
;
...
...
@@ -120,7 +120,7 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr,
void
tipc_disc_recv_msg
(
struct
sk_buff
*
buf
,
struct
tipc_bearer
*
b_ptr
)
{
struct
tipc_node
*
n_ptr
;
struct
link
*
link
;
struct
tipc_
link
*
link
;
struct
tipc_media_addr
media_addr
,
*
addr
;
struct
sk_buff
*
rbuf
;
struct
tipc_msg
*
msg
=
buf_msg
(
buf
);
...
...
@@ -218,7 +218,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
* and is either not currently searching or is searching at a slow rate
*/
static
void
disc_update
(
struct
link_req
*
req
)
static
void
disc_update
(
struct
tipc_
link_req
*
req
)
{
if
(
!
req
->
num_nodes
)
{
if
((
req
->
timer_intv
==
TIPC_LINK_REQ_INACTIVE
)
||
...
...
@@ -234,7 +234,7 @@ static void disc_update(struct link_req *req)
* @req: ptr to link request structure
*/
void
tipc_disc_add_dest
(
struct
link_req
*
req
)
void
tipc_disc_add_dest
(
struct
tipc_
link_req
*
req
)
{
req
->
num_nodes
++
;
}
...
...
@@ -244,7 +244,7 @@ void tipc_disc_add_dest(struct link_req *req)
* @req: ptr to link request structure
*/
void
tipc_disc_remove_dest
(
struct
link_req
*
req
)
void
tipc_disc_remove_dest
(
struct
tipc_
link_req
*
req
)
{
req
->
num_nodes
--
;
disc_update
(
req
);
...
...
@@ -255,7 +255,7 @@ void tipc_disc_remove_dest(struct link_req *req)
* @req: ptr to link request structure
*/
static
void
disc_send_msg
(
struct
link_req
*
req
)
static
void
disc_send_msg
(
struct
tipc_
link_req
*
req
)
{
if
(
!
req
->
bearer
->
blocked
)
tipc_bearer_send
(
req
->
bearer
,
req
->
buf
,
&
req
->
dest
);
...
...
@@ -268,7 +268,7 @@ static void disc_send_msg(struct link_req *req)
* Called whenever a link setup request timer associated with a bearer expires.
*/
static
void
disc_timeout
(
struct
link_req
*
req
)
static
void
disc_timeout
(
struct
tipc_
link_req
*
req
)
{
int
max_delay
;
...
...
@@ -316,7 +316,7 @@ static void disc_timeout(struct link_req *req)
int
tipc_disc_create
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_media_addr
*
dest
,
u32
dest_domain
)
{
struct
link_req
*
req
;
struct
tipc_
link_req
*
req
;
req
=
kmalloc
(
sizeof
(
*
req
),
GFP_ATOMIC
);
if
(
!
req
)
...
...
@@ -345,7 +345,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr,
* @req: ptr to link request structure
*/
void
tipc_disc_delete
(
struct
link_req
*
req
)
void
tipc_disc_delete
(
struct
tipc_
link_req
*
req
)
{
k_cancel_timer
(
&
req
->
timer
);
k_term_timer
(
&
req
->
timer
);
...
...
net/tipc/discover.h
View file @
56be1788
...
...
@@ -37,13 +37,13 @@
#ifndef _TIPC_DISCOVER_H
#define _TIPC_DISCOVER_H
struct
link_req
;
struct
tipc_
link_req
;
int
tipc_disc_create
(
struct
tipc_bearer
*
b_ptr
,
struct
tipc_media_addr
*
dest
,
u32
dest_domain
);
void
tipc_disc_delete
(
struct
link_req
*
req
);
void
tipc_disc_add_dest
(
struct
link_req
*
req
);
void
tipc_disc_remove_dest
(
struct
link_req
*
req
);
void
tipc_disc_delete
(
struct
tipc_
link_req
*
req
);
void
tipc_disc_add_dest
(
struct
tipc_
link_req
*
req
);
void
tipc_disc_remove_dest
(
struct
tipc_
link_req
*
req
);
void
tipc_disc_recv_msg
(
struct
sk_buff
*
buf
,
struct
tipc_bearer
*
b_ptr
);
#endif
net/tipc/eth_media.c
View file @
56be1788
...
...
@@ -56,7 +56,7 @@ struct eth_bearer {
struct
work_struct
cleanup
;
};
static
struct
media
eth_media_info
;
static
struct
tipc_
media
eth_media_info
;
static
struct
eth_bearer
eth_bearers
[
MAX_ETH_BEARERS
];
static
int
eth_started
;
static
struct
notifier_block
notifier
;
...
...
@@ -340,7 +340,7 @@ static int eth_msg2addr(struct tipc_media_addr *a, char *msg_area)
* Ethernet media registration info
*/
static
struct
media
eth_media_info
=
{
static
struct
tipc_
media
eth_media_info
=
{
.
send_msg
=
send_msg
,
.
enable_bearer
=
enable_bearer
,
.
disable_bearer
=
disable_bearer
,
...
...
net/tipc/link.c
View file @
56be1788
This diff is collapsed.
Click to expand it.
net/tipc/link.h
View file @
56be1788
...
...
@@ -67,7 +67,7 @@
#define MAX_PKT_DEFAULT 1500
/**
* struct link - TIPC link data structure
* struct
tipc_
link - TIPC link data structure
* @addr: network address of link's peer node
* @name: link name character string
* @media_addr: media address to use when sending messages over link
...
...
@@ -115,7 +115,7 @@
* @stats: collects statistics regarding link activity
*/
struct
link
{
struct
tipc_
link
{
u32
addr
;
char
name
[
TIPC_MAX_LINK_NAME
];
struct
tipc_media_addr
media_addr
;
...
...
@@ -213,24 +213,24 @@ struct link {
struct
tipc_port
;
struct
link
*
tipc_link_create
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
tipc_link_create
(
struct
tipc_node
*
n_ptr
,
struct
tipc_bearer
*
b_ptr
,
const
struct
tipc_media_addr
*
media_addr
);
void
tipc_link_delete
(
struct
link
*
l_ptr
);
void
tipc_link_changeover
(
struct
link
*
l_ptr
);
void
tipc_link_send_duplicate
(
struct
link
*
l_ptr
,
struct
link
*
dest
);
void
tipc_link_reset_fragments
(
struct
link
*
l_ptr
);
int
tipc_link_is_up
(
struct
link
*
l_ptr
);
int
tipc_link_is_active
(
struct
link
*
l_ptr
);
u32
tipc_link_push_packet
(
struct
link
*
l_ptr
);
void
tipc_link_stop
(
struct
link
*
l_ptr
);
void
tipc_link_delete
(
struct
tipc_
link
*
l_ptr
);
void
tipc_link_changeover
(
struct
tipc_
link
*
l_ptr
);
void
tipc_link_send_duplicate
(
struct
tipc_link
*
l_ptr
,
struct
tipc_
link
*
dest
);
void
tipc_link_reset_fragments
(
struct
tipc_
link
*
l_ptr
);
int
tipc_link_is_up
(
struct
tipc_
link
*
l_ptr
);
int
tipc_link_is_active
(
struct
tipc_
link
*
l_ptr
);
u32
tipc_link_push_packet
(
struct
tipc_
link
*
l_ptr
);
void
tipc_link_stop
(
struct
tipc_
link
*
l_ptr
);
struct
sk_buff
*
tipc_link_cmd_config
(
const
void
*
req_tlv_area
,
int
req_tlv_space
,
u16
cmd
);
struct
sk_buff
*
tipc_link_cmd_show_stats
(
const
void
*
req_tlv_area
,
int
req_tlv_space
);
struct
sk_buff
*
tipc_link_cmd_reset_stats
(
const
void
*
req_tlv_area
,
int
req_tlv_space
);
void
tipc_link_reset
(
struct
link
*
l_ptr
);
void
tipc_link_reset
(
struct
tipc_
link
*
l_ptr
);
int
tipc_link_send
(
struct
sk_buff
*
buf
,
u32
dest
,
u32
selector
);
void
tipc_link_send_names
(
struct
list_head
*
message_list
,
u32
dest
);
int
tipc_link_send_buf
(
struct
link
*
l_ptr
,
struct
sk_buff
*
buf
);
int
tipc_link_send_buf
(
struct
tipc_
link
*
l_ptr
,
struct
sk_buff
*
buf
);
u32
tipc_link_get_max_pkt
(
u32
dest
,
u32
selector
);
int
tipc_link_send_sections_fast
(
struct
tipc_port
*
sender
,
struct
iovec
const
*
msg_sect
,
...
...
@@ -241,14 +241,16 @@ void tipc_link_recv_bundle(struct sk_buff *buf);
int
tipc_link_recv_fragment
(
struct
sk_buff
**
pending
,
struct
sk_buff
**
fb
,
struct
tipc_msg
**
msg
);
void
tipc_link_send_proto_msg
(
struct
link
*
l_ptr
,
u32
msg_typ
,
int
prob
,
u32
gap
,
u32
tolerance
,
u32
priority
,
u32
acked_mtu
);
void
tipc_link_push_queue
(
struct
link
*
l_ptr
);
void
tipc_link_send_proto_msg
(
struct
tipc_link
*
l_ptr
,
u32
msg_typ
,
int
prob
,
u32
gap
,
u32
tolerance
,
u32
priority
,
u32
acked_mtu
);
void
tipc_link_push_queue
(
struct
tipc_link
*
l_ptr
);
u32
tipc_link_defer_pkt
(
struct
sk_buff
**
head
,
struct
sk_buff
**
tail
,
struct
sk_buff
*
buf
);
void
tipc_link_wakeup_ports
(
struct
link
*
l_ptr
,
int
all
);
void
tipc_link_set_queue_limits
(
struct
link
*
l_ptr
,
u32
window
);
void
tipc_link_retransmit
(
struct
link
*
l_ptr
,
struct
sk_buff
*
start
,
u32
retransmits
);
void
tipc_link_wakeup_ports
(
struct
tipc_link
*
l_ptr
,
int
all
);
void
tipc_link_set_queue_limits
(
struct
tipc_link
*
l_ptr
,
u32
window
);
void
tipc_link_retransmit
(
struct
tipc_link
*
l_ptr
,
struct
sk_buff
*
start
,
u32
retransmits
);
/*
* Link sequence number manipulation routines (uses modulo 2**16 arithmetic)
...
...
@@ -293,32 +295,32 @@ static inline u32 lesser(u32 left, u32 right)
* Link status checking routines
*/
static
inline
int
link_working_working
(
struct
link
*
l_ptr
)
static
inline
int
link_working_working
(
struct
tipc_
link
*
l_ptr
)
{
return
l_ptr
->
state
==
WORKING_WORKING
;
}
static
inline
int
link_working_unknown
(
struct
link
*
l_ptr
)
static
inline
int
link_working_unknown
(
struct
tipc_
link
*
l_ptr
)
{
return
l_ptr
->
state
==
WORKING_UNKNOWN
;
}
static
inline
int
link_reset_unknown
(
struct
link
*
l_ptr
)
static
inline
int
link_reset_unknown
(
struct
tipc_
link
*
l_ptr
)
{
return
l_ptr
->
state
==
RESET_UNKNOWN
;
}
static
inline
int
link_reset_reset
(
struct
link
*
l_ptr
)
static
inline
int
link_reset_reset
(
struct
tipc_
link
*
l_ptr
)
{
return
l_ptr
->
state
==
RESET_RESET
;
}
static
inline
int
link_blocked
(
struct
link
*
l_ptr
)
static
inline
int
link_blocked
(
struct
tipc_
link
*
l_ptr
)
{
return
l_ptr
->
exp_msg_count
||
l_ptr
->
blocked
;
}
static
inline
int
link_congested
(
struct
link
*
l_ptr
)
static
inline
int
link_congested
(
struct
tipc_
link
*
l_ptr
)
{
return
l_ptr
->
out_queue_size
>=
l_ptr
->
queue_limit
[
0
];
}
...
...
net/tipc/name_distr.c
View file @
56be1788
...
...
@@ -176,7 +176,7 @@ void tipc_named_withdraw(struct publication *publ)
void
tipc_named_node_up
(
unsigned
long
nodearg
)
{
struct
tipc_node
*
n_ptr
;
struct
link
*
l_ptr
;
struct
tipc_
link
*
l_ptr
;
struct
publication
*
publ
;
struct
distr_item
*
item
=
NULL
;
struct
sk_buff
*
buf
=
NULL
;
...
...
net/tipc/name_table.c
View file @
56be1788
...
...
@@ -251,8 +251,8 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq,
u32
type
,
u32
lower
,
u32
upper
,
u32
scope
,
u32
node
,
u32
port
,
u32
key
)
{
struct
subscription
*
s
;
struct
subscription
*
st
;
struct
tipc_
subscription
*
s
;
struct
tipc_
subscription
*
st
;
struct
publication
*
publ
;
struct
sub_seq
*
sseq
;
struct
name_info
*
info
;
...
...
@@ -381,7 +381,7 @@ static struct publication *tipc_nameseq_remove_publ(struct name_seq *nseq, u32 i
struct
sub_seq
*
sseq
=
nameseq_find_subseq
(
nseq
,
inst
);
struct
name_info
*
info
;
struct
sub_seq
*
free
;
struct
subscription
*
s
,
*
st
;
struct
tipc_
subscription
*
s
,
*
st
;
int
removed_subseq
=
0
;
if
(
!
sseq
)
...
...
@@ -448,7 +448,8 @@ static struct publication *tipc_nameseq_remove_publ(struct name_seq *nseq, u32 i
* sequence overlapping with the requested sequence
*/
static
void
tipc_nameseq_subscribe
(
struct
name_seq
*
nseq
,
struct
subscription
*
s
)
static
void
tipc_nameseq_subscribe
(
struct
name_seq
*
nseq
,
struct
tipc_subscription
*
s
)
{
struct
sub_seq
*
sseq
=
nseq
->
sseqs
;
...
...
@@ -625,7 +626,7 @@ u32 tipc_nametbl_translate(u32 type, u32 instance, u32 *destnode)
*/
int
tipc_nametbl_mc_translate
(
u32
type
,
u32
lower
,
u32
upper
,
u32
limit
,
struct
port_list
*
dports
)
struct
tipc_
port_list
*
dports
)
{
struct
name_seq
*
seq
;
struct
sub_seq
*
sseq
;
...
...
@@ -739,7 +740,7 @@ int tipc_nametbl_withdraw(u32 type, u32 lower, u32 ref, u32 key)
* tipc_nametbl_subscribe - add a subscription object to the name table
*/
void
tipc_nametbl_subscribe
(
struct
subscription
*
s
)
void
tipc_nametbl_subscribe
(
struct
tipc_
subscription
*
s
)
{
u32
type
=
s
->
seq
.
type
;
struct
name_seq
*
seq
;
...
...
@@ -763,7 +764,7 @@ void tipc_nametbl_subscribe(struct subscription *s)
* tipc_nametbl_unsubscribe - remove a subscription object from name table
*/
void
tipc_nametbl_unsubscribe
(
struct
subscription
*
s
)
void
tipc_nametbl_unsubscribe
(
struct
tipc_
subscription
*
s
)
{
struct
name_seq
*
seq
;
...
...
net/tipc/name_table.h
View file @
56be1788
...
...
@@ -39,8 +39,8 @@
#include "node_subscr.h"
struct
subscription
;
struct
port_list
;
struct
tipc_
subscription
;
struct
tipc_
port_list
;
/*
* TIPC name types reserved for internal TIPC use (both current and planned)
...
...
@@ -90,7 +90,7 @@ extern rwlock_t tipc_nametbl_lock;
struct
sk_buff
*
tipc_nametbl_get
(
const
void
*
req_tlv_area
,
int
req_tlv_space
);
u32
tipc_nametbl_translate
(
u32
type
,
u32
instance
,
u32
*
node
);
int
tipc_nametbl_mc_translate
(
u32
type
,
u32
lower
,
u32
upper
,
u32
limit
,
struct
port_list
*
dports
);
struct
tipc_
port_list
*
dports
);
int
tipc_nametbl_publish_rsv
(
u32
ref
,
unsigned
int
scope
,
struct
tipc_name_seq
const
*
seq
);
struct
publication
*
tipc_nametbl_publish
(
u32
type
,
u32
lower
,
u32
upper
,
...
...
@@ -100,8 +100,8 @@ struct publication *tipc_nametbl_insert_publ(u32 type, u32 lower, u32 upper,
u32
scope
,
u32
node
,
u32
ref
,
u32
key
);
struct
publication
*
tipc_nametbl_remove_publ
(
u32
type
,
u32
lower
,
u32
node
,
u32
ref
,
u32
key
);
void
tipc_nametbl_subscribe
(
struct
subscription
*
s
);
void
tipc_nametbl_unsubscribe
(
struct
subscription
*
s
);
void
tipc_nametbl_subscribe
(
struct
tipc_
subscription
*
s
);
void
tipc_nametbl_unsubscribe
(
struct
tipc_
subscription
*
s
);
int
tipc_nametbl_init
(
void
);
void
tipc_nametbl_stop
(
void
);
...
...
net/tipc/node.c
View file @
56be1788
...
...
@@ -136,9 +136,9 @@ void tipc_node_delete(struct tipc_node *n_ptr)
* Link becomes active (alone or shared) or standby, depending on its priority.
*/
void
tipc_node_link_up
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
)
void
tipc_node_link_up
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
)
{
struct
link
**
active
=
&
n_ptr
->
active_links
[
0
];
struct
tipc_
link
**
active
=
&
n_ptr
->
active_links
[
0
];
n_ptr
->
working_links
++
;
...
...
@@ -171,14 +171,14 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr)
static
void
node_select_active_links
(
struct
tipc_node
*
n_ptr
)
{
struct
link
**
active
=
&
n_ptr
->
active_links
[
0
];
struct
tipc_
link
**
active
=
&
n_ptr
->
active_links
[
0
];
u32
i
;
u32
highest_prio
=
0
;
active
[
0
]
=
active
[
1
]
=
NULL
;
for
(
i
=
0
;
i
<
MAX_BEARERS
;
i
++
)
{
struct
link
*
l_ptr
=
n_ptr
->
links
[
i
];
struct
tipc_
link
*
l_ptr
=
n_ptr
->
links
[
i
];
if
(
!
l_ptr
||
!
tipc_link_is_up
(
l_ptr
)
||
(
l_ptr
->
priority
<
highest_prio
))
...
...
@@ -197,9 +197,9 @@ static void node_select_active_links(struct tipc_node *n_ptr)
* tipc_node_link_down - handle loss of link
*/
void
tipc_node_link_down
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
)
void
tipc_node_link_down
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
)
{
struct
link
**
active
;
struct
tipc_
link
**
active
;
n_ptr
->
working_links
--
;
...
...
@@ -239,14 +239,14 @@ int tipc_node_is_up(struct tipc_node *n_ptr)
return
tipc_node_active_links
(
n_ptr
);
}
void
tipc_node_attach_link
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
)
void
tipc_node_attach_link
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
)
{
n_ptr
->
links
[
l_ptr
->
b_ptr
->
identity
]
=
l_ptr
;
atomic_inc
(
&
tipc_num_links
);
n_ptr
->
link_cnt
++
;
}
void
tipc_node_detach_link
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
)
void
tipc_node_detach_link
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
)
{
n_ptr
->
links
[
l_ptr
->
b_ptr
->
identity
]
=
NULL
;
atomic_dec
(
&
tipc_num_links
);
...
...
@@ -360,7 +360,7 @@ static void node_lost_contact(struct tipc_node *n_ptr)
/* Abort link changeover */
for
(
i
=
0
;
i
<
MAX_BEARERS
;
i
++
)
{
struct
link
*
l_ptr
=
n_ptr
->
links
[
i
];
struct
tipc_
link
*
l_ptr
=
n_ptr
->
links
[
i
];
if
(
!
l_ptr
)
continue
;
l_ptr
->
reset_checkpoint
=
l_ptr
->
next_in_no
;
...
...
net/tipc/node.h
View file @
56be1788
...
...
@@ -79,8 +79,8 @@ struct tipc_node {
struct
hlist_node
hash
;
struct
list_head
list
;
struct
list_head
nsub
;
struct
link
*
active_links
[
2
];
struct
link
*
links
[
MAX_BEARERS
];
struct
tipc_
link
*
active_links
[
2
];
struct
tipc_
link
*
links
[
MAX_BEARERS
];
int
link_cnt
;
int
working_links
;
int
block_setup
;
...
...
@@ -117,10 +117,10 @@ extern u32 tipc_own_tag;
struct
tipc_node
*
tipc_node_find
(
u32
addr
);
struct
tipc_node
*
tipc_node_create
(
u32
addr
);
void
tipc_node_delete
(
struct
tipc_node
*
n_ptr
);
void
tipc_node_attach_link
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
);
void
tipc_node_detach_link
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
);
void
tipc_node_link_down
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
);
void
tipc_node_link_up
(
struct
tipc_node
*
n_ptr
,
struct
link
*
l_ptr
);
void
tipc_node_attach_link
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
);
void
tipc_node_detach_link
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
);
void
tipc_node_link_down
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
);
void
tipc_node_link_up
(
struct
tipc_node
*
n_ptr
,
struct
tipc_
link
*
l_ptr
);
int
tipc_node_active_links
(
struct
tipc_node
*
n_ptr
);
int
tipc_node_redundant_links
(
struct
tipc_node
*
n_ptr
);
int
tipc_node_is_up
(
struct
tipc_node
*
n_ptr
);
...
...
net/tipc/port.c
View file @
56be1788
...
...
@@ -80,7 +80,7 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq,
struct
tipc_msg
*
hdr
;
struct
sk_buff
*
buf
;
struct
sk_buff
*
ibuf
=
NULL
;
struct
port_list
dports
=
{
0
,
NULL
,
};
struct
tipc_
port_list
dports
=
{
0
,
NULL
,
};
struct
tipc_port
*
oport
=
tipc_port_deref
(
ref
);
int
ext_targets
;
int
res
;
...
...
@@ -142,11 +142,11 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq,
* If there is no port list, perform a lookup to create one
*/
void
tipc_port_recv_mcast
(
struct
sk_buff
*
buf
,
struct
port_list
*
dp
)
void
tipc_port_recv_mcast
(
struct
sk_buff
*
buf
,
struct
tipc_
port_list
*
dp
)
{
struct
tipc_msg
*
msg
;
struct
port_list
dports
=
{
0
,
NULL
,
};
struct
port_list
*
item
=
dp
;
struct
tipc_
port_list
dports
=
{
0
,
NULL
,
};
struct
tipc_
port_list
*
item
=
dp
;
int
cnt
=
0
;
msg
=
buf_msg
(
buf
);
...
...
net/tipc/port.h
View file @
56be1788
...
...
@@ -151,7 +151,7 @@ struct tipc_port {
};
extern
spinlock_t
tipc_port_list_lock
;
struct
port_list
;
struct
tipc_
port_list
;
/*
* TIPC port manipulation routines
...
...
@@ -228,7 +228,7 @@ int tipc_port_reject_sections(struct tipc_port *p_ptr, struct tipc_msg *hdr,
unsigned
int
total_len
,
int
err
);
struct
sk_buff
*
tipc_port_get_ports
(
void
);
void
tipc_port_recv_proto_msg
(
struct
sk_buff
*
buf
);
void
tipc_port_recv_mcast
(
struct
sk_buff
*
buf
,
struct
port_list
*
dp
);
void
tipc_port_recv_mcast
(
struct
sk_buff
*
buf
,
struct
tipc_
port_list
*
dp
);
void
tipc_port_reinit
(
void
);
/**
...
...
net/tipc/subscr.c
View file @
56be1788
...
...
@@ -40,14 +40,14 @@
#include "subscr.h"
/**
* struct subscriber - TIPC network topology subscriber
* struct
tipc_
subscriber - TIPC network topology subscriber
* @port_ref: object reference to server port connecting to subscriber
* @lock: pointer to spinlock controlling access to subscriber's server port
* @subscriber_list: adjacent subscribers in top. server's list of subscribers
* @subscription_list: list of subscription objects for this subscriber
*/
struct
subscriber
{
struct
tipc_
subscriber
{
u32
port_ref
;
spinlock_t
*
lock
;
struct
list_head
subscriber_list
;
...
...
@@ -92,7 +92,7 @@ static u32 htohl(u32 in, int swap)
* try to take the lock if the message is rejected and returned!
*/
static
void
subscr_send_event
(
struct
subscription
*
sub
,
static
void
subscr_send_event
(
struct
tipc_
subscription
*
sub
,
u32
found_lower
,
u32
found_upper
,
u32
event
,
...
...
@@ -118,7 +118,7 @@ static void subscr_send_event(struct subscription *sub,
* Returns 1 if there is overlap, otherwise 0.
*/
int
tipc_subscr_overlap
(
struct
subscription
*
sub
,
int
tipc_subscr_overlap
(
struct
tipc_
subscription
*
sub
,
u32
found_lower
,
u32
found_upper
)
...
...
@@ -138,7 +138,7 @@ int tipc_subscr_overlap(struct subscription *sub,
* Protected by nameseq.lock in name_table.c
*/
void
tipc_subscr_report_overlap
(
struct
subscription
*
sub
,
void
tipc_subscr_report_overlap
(
struct
tipc_
subscription
*
sub
,
u32
found_lower
,
u32
found_upper
,
u32
event
,
...
...
@@ -158,7 +158,7 @@ void tipc_subscr_report_overlap(struct subscription *sub,
* subscr_timeout - subscription timeout has occurred
*/
static
void
subscr_timeout
(
struct
subscription
*
sub
)
static
void
subscr_timeout
(
struct
tipc_
subscription
*
sub
)
{
struct
tipc_port
*
server_port
;
...
...
@@ -205,7 +205,7 @@ static void subscr_timeout(struct subscription *sub)
* Called with subscriber port locked.
*/
static
void
subscr_del
(
struct
subscription
*
sub
)
static
void
subscr_del
(
struct
tipc_
subscription
*
sub
)
{
tipc_nametbl_unsubscribe
(
sub
);
list_del
(
&
sub
->
subscription_list
);
...
...
@@ -224,11 +224,11 @@ static void subscr_del(struct subscription *sub)
* simply wait for it to be released, then claim it.)
*/
static
void
subscr_terminate
(
struct
subscriber
*
subscriber
)
static
void
subscr_terminate
(
struct
tipc_
subscriber
*
subscriber
)
{
u32
port_ref
;
struct
subscription
*
sub
;
struct
subscription
*
sub_temp
;
struct
tipc_
subscription
*
sub
;
struct
tipc_
subscription
*
sub_temp
;
/* Invalidate subscriber reference */
...
...
@@ -278,10 +278,10 @@ static void subscr_terminate(struct subscriber *subscriber)
*/
static
void
subscr_cancel
(
struct
tipc_subscr
*
s
,
struct
subscriber
*
subscriber
)
struct
tipc_
subscriber
*
subscriber
)
{
struct
subscription
*
sub
;
struct
subscription
*
sub_temp
;
struct
tipc_
subscription
*
sub
;
struct
tipc_
subscription
*
sub_temp
;
int
found
=
0
;
/* Find first matching subscription, exit if not found */
...
...
@@ -314,10 +314,10 @@ static void subscr_cancel(struct tipc_subscr *s,
* Called with subscriber port locked.
*/
static
struct
subscription
*
subscr_subscribe
(
struct
tipc_subscr
*
s
,
struct
subscriber
*
subscriber
)
static
struct
tipc_
subscription
*
subscr_subscribe
(
struct
tipc_subscr
*
s
,
struct
tipc_
subscriber
*
subscriber
)
{
struct
subscription
*
sub
;
struct
tipc_
subscription
*
sub
;
int
swap
;
/* Determine subscriber's endianness */
...
...
@@ -393,7 +393,7 @@ static void subscr_conn_shutdown_event(void *usr_handle,
unsigned
int
size
,
int
reason
)
{
struct
subscriber
*
subscriber
=
usr_handle
;
struct
tipc_
subscriber
*
subscriber
=
usr_handle
;
spinlock_t
*
subscriber_lock
;
if
(
tipc_port_lock
(
port_ref
)
==
NULL
)
...
...
@@ -416,9 +416,9 @@ static void subscr_conn_msg_event(void *usr_handle,
const
unchar
*
data
,
u32
size
)
{
struct
subscriber
*
subscriber
=
usr_handle
;
struct
tipc_
subscriber
*
subscriber
=
usr_handle
;
spinlock_t
*
subscriber_lock
;
struct
subscription
*
sub
;
struct
tipc_
subscription
*
sub
;
/*
* Lock subscriber's server port (& make a local copy of lock pointer,
...
...
@@ -471,12 +471,12 @@ static void subscr_named_msg_event(void *usr_handle,
struct
tipc_portid
const
*
orig
,
struct
tipc_name_seq
const
*
dest
)
{
struct
subscriber
*
subscriber
;
struct
tipc_
subscriber
*
subscriber
;
u32
server_port_ref
;
/* Create subscriber object */
subscriber
=
kzalloc
(
sizeof
(
struct
subscriber
),
GFP_ATOMIC
);
subscriber
=
kzalloc
(
sizeof
(
struct
tipc_
subscriber
),
GFP_ATOMIC
);
if
(
subscriber
==
NULL
)
{
warn
(
"Subscriber rejected, no memory
\n
"
);
return
;
...
...
@@ -568,8 +568,8 @@ int tipc_subscr_start(void)
void
tipc_subscr_stop
(
void
)
{
struct
subscriber
*
subscriber
;
struct
subscriber
*
subscriber_temp
;
struct
tipc_
subscriber
*
subscriber
;
struct
tipc_
subscriber
*
subscriber_temp
;
spinlock_t
*
subscriber_lock
;
if
(
topsrv
.
setup_port
)
{
...
...
net/tipc/subscr.h
View file @
56be1788
...
...
@@ -37,10 +37,10 @@
#ifndef _TIPC_SUBSCR_H
#define _TIPC_SUBSCR_H
struct
subscription
;
struct
tipc_
subscription
;
/**
* struct subscription - TIPC network topology subscription object
* struct
tipc_
subscription - TIPC network topology subscription object
* @seq: name sequence associated with subscription
* @timeout: duration of subscription (in ms)
* @filter: event filtering to be done for subscription
...
...
@@ -52,7 +52,7 @@ struct subscription;
* @evt: template for events generated by subscription
*/
struct
subscription
{
struct
tipc_
subscription
{
struct
tipc_name_seq
seq
;
u32
timeout
;
u32
filter
;
...
...
@@ -64,11 +64,11 @@ struct subscription {
struct
tipc_event
evt
;
};
int
tipc_subscr_overlap
(
struct
subscription
*
sub
,
int
tipc_subscr_overlap
(
struct
tipc_
subscription
*
sub
,
u32
found_lower
,
u32
found_upper
);
void
tipc_subscr_report_overlap
(
struct
subscription
*
sub
,
void
tipc_subscr_report_overlap
(
struct
tipc_
subscription
*
sub
,
u32
found_lower
,
u32
found_upper
,
u32
event
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment