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
Kirill Smelkov
linux
Commits
1897fe55
Commit
1897fe55
authored
Jun 24, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tipc-Jun24-2011' of
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/net-next-2.6
parents
cd5f3e20
e4a0aee4
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
276 additions
and
381 deletions
+276
-381
net/tipc/bcast.c
net/tipc/bcast.c
+5
-1
net/tipc/bearer.c
net/tipc/bearer.c
+0
-1
net/tipc/bearer.h
net/tipc/bearer.h
+0
-2
net/tipc/core.h
net/tipc/core.h
+0
-6
net/tipc/link.c
net/tipc/link.c
+3
-3
net/tipc/msg.c
net/tipc/msg.c
+2
-4
net/tipc/msg.h
net/tipc/msg.h
+7
-27
net/tipc/name_distr.c
net/tipc/name_distr.c
+3
-3
net/tipc/name_table.c
net/tipc/name_table.c
+120
-169
net/tipc/name_table.h
net/tipc/name_table.h
+7
-7
net/tipc/port.c
net/tipc/port.c
+129
-155
net/tipc/socket.c
net/tipc/socket.c
+0
-3
No files found.
net/tipc/bcast.c
View file @
1897fe55
...
...
@@ -552,12 +552,16 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
if
(
likely
(
!
msg_non_seq
(
buf_msg
(
buf
))))
{
struct
tipc_msg
*
msg
;
assert
(
tipc_bcast_nmap
.
count
!=
0
);
bcbuf_set_acks
(
buf
,
tipc_bcast_nmap
.
count
);
msg
=
buf_msg
(
buf
);
msg_set_non_seq
(
msg
,
1
);
msg_set_mc_netid
(
msg
,
tipc_net_id
);
bcl
->
stats
.
sent_info
++
;
if
(
WARN_ON
(
!
tipc_bcast_nmap
.
count
))
{
dump_stack
();
return
0
;
}
}
/* Send buffer over bearers until all targets reached */
...
...
net/tipc/bearer.c
View file @
1897fe55
...
...
@@ -402,7 +402,6 @@ void tipc_bearer_lock_push(struct tipc_bearer *b_ptr)
void
tipc_continue
(
struct
tipc_bearer
*
b_ptr
)
{
spin_lock_bh
(
&
b_ptr
->
lock
);
b_ptr
->
continue_count
++
;
if
(
!
list_empty
(
&
b_ptr
->
cong_links
))
tipc_k_signal
((
Handler
)
tipc_bearer_lock_push
,
(
unsigned
long
)
b_ptr
);
b_ptr
->
blocked
=
0
;
...
...
net/tipc/bearer.h
View file @
1897fe55
...
...
@@ -107,7 +107,6 @@ struct media {
* @link_req: ptr to (optional) structure making periodic link setup requests
* @links: list of non-congested links associated with bearer
* @cong_links: list of congested links associated with bearer
* @continue_count: # of times bearer has resumed after congestion or blocking
* @active: non-zero if bearer structure is represents a bearer
* @net_plane: network plane ('A' through 'H') currently associated with bearer
* @nodes: indicates which nodes in cluster can be reached through bearer
...
...
@@ -129,7 +128,6 @@ struct tipc_bearer {
struct
link_req
*
link_req
;
struct
list_head
links
;
struct
list_head
cong_links
;
u32
continue_count
;
int
active
;
char
net_plane
;
struct
tipc_node_map
nodes
;
...
...
net/tipc/core.h
View file @
1897fe55
...
...
@@ -61,12 +61,6 @@
struct
tipc_msg
;
/* msg.h */
struct
print_buf
;
/* log.h */
/*
* TIPC sanity test macros
*/
#define assert(i) BUG_ON(!(i))
/*
* TIPC system monitoring code
*/
...
...
net/tipc/link.c
View file @
1897fe55
...
...
@@ -1572,7 +1572,7 @@ static struct sk_buff *link_insert_deferred_queue(struct link *l_ptr,
static
int
link_recv_buf_validate
(
struct
sk_buff
*
buf
)
{
static
u32
min_data_hdr_size
[
8
]
=
{
SHORT_H_SIZE
,
MCAST_H_SIZE
,
LONG_H_SIZE
,
DIR_MSG
_H_SIZE
,
SHORT_H_SIZE
,
MCAST_H_SIZE
,
NAMED_H_SIZE
,
BASIC
_H_SIZE
,
MAX_H_SIZE
,
MAX_H_SIZE
,
MAX_H_SIZE
,
MAX_H_SIZE
};
...
...
@@ -2553,7 +2553,7 @@ int tipc_link_recv_fragment(struct sk_buff **pending, struct sk_buff **fb,
u32
msg_sz
=
msg_size
(
imsg
);
u32
fragm_sz
=
msg_data_sz
(
fragm
);
u32
exp_fragm_cnt
=
msg_sz
/
fragm_sz
+
!!
(
msg_sz
%
fragm_sz
);
u32
max
=
TIPC_MAX_USER_MSG_SIZE
+
LONG
_H_SIZE
;
u32
max
=
TIPC_MAX_USER_MSG_SIZE
+
NAMED
_H_SIZE
;
if
(
msg_type
(
imsg
)
==
TIPC_MCAST_MSG
)
max
=
TIPC_MAX_USER_MSG_SIZE
+
MCAST_H_SIZE
;
if
(
msg_size
(
imsg
)
>
max
)
{
...
...
@@ -2882,7 +2882,7 @@ static int tipc_link_stats(const char *name, char *buf, const u32 buf_size)
profile_total
=
1
;
tipc_printf
(
&
pb
,
" TX profile sample:%u packets average:%u octets
\n
"
" 0-64:%u%% -256:%u%% -1024:%u%% -4096:%u%% "
"-163
5
4:%u%% -32768:%u%% -66000:%u%%
\n
"
,
"-163
8
4:%u%% -32768:%u%% -66000:%u%%
\n
"
,
l_ptr
->
stats
.
msg_length_counts
,
l_ptr
->
stats
.
msg_lengths_total
/
profile_total
,
percent
(
l_ptr
->
stats
.
msg_length_profile
[
0
],
profile_total
),
...
...
net/tipc/msg.c
View file @
1897fe55
...
...
@@ -61,10 +61,8 @@ void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type,
msg_set_size
(
m
,
hsize
);
msg_set_prevnode
(
m
,
tipc_own_addr
);
msg_set_type
(
m
,
type
);
if
(
!
msg_short
(
m
))
{
msg_set_orignode
(
m
,
tipc_own_addr
);
msg_set_destnode
(
m
,
destnode
);
}
msg_set_orignode
(
m
,
tipc_own_addr
);
msg_set_destnode
(
m
,
destnode
);
}
/**
...
...
net/tipc/msg.h
View file @
1897fe55
...
...
@@ -68,10 +68,10 @@
* Message header sizes
*/
#define SHORT_H_SIZE 24
/*
Connected, in-cluster messages
*/
#define
DIR_MSG_H_SIZE 32
/* Directly addressed messages
*/
#define
LONG_H_SIZE 40
/* Named messages
*/
#define MCAST_H_SIZE 44
/* Multicast
messages
*/
#define SHORT_H_SIZE 24
/*
In-cluster basic payload message
*/
#define
BASIC_H_SIZE 32
/* Basic payload message
*/
#define
NAMED_H_SIZE 40
/* Named payload message
*/
#define MCAST_H_SIZE 44
/* Multicast
payload message
*/
#define INT_H_SIZE 40
/* Internal messages */
#define MIN_H_SIZE 24
/* Smallest legal TIPC header size */
#define MAX_H_SIZE 60
/* Largest possible TIPC header size */
...
...
@@ -310,26 +310,6 @@ static inline void msg_set_seqno(struct tipc_msg *m, u32 n)
msg_set_bits
(
m
,
2
,
0
,
0xffff
,
n
);
}
/*
* TIPC may utilize the "link ack #" and "link seq #" fields of a short
* message header to hold the destination node for the message, since the
* normal "dest node" field isn't present. This cache is only referenced
* when required, so populating the cache of a longer message header is
* harmless (as long as the header has the two link sequence fields present).
*
* Note: Host byte order is OK here, since the info never goes off-card.
*/
static
inline
u32
msg_destnode_cache
(
struct
tipc_msg
*
m
)
{
return
m
->
hdr
[
2
];
}
static
inline
void
msg_set_destnode_cache
(
struct
tipc_msg
*
m
,
u32
dnode
)
{
m
->
hdr
[
2
]
=
dnode
;
}
/*
* Words 3-10
*/
...
...
@@ -377,7 +357,7 @@ static inline void msg_set_mc_netid(struct tipc_msg *m, u32 p)
static
inline
int
msg_short
(
struct
tipc_msg
*
m
)
{
return
msg_hdr_sz
(
m
)
==
24
;
return
msg_hdr_sz
(
m
)
==
SHORT_H_SIZE
;
}
static
inline
u32
msg_orignode
(
struct
tipc_msg
*
m
)
...
...
@@ -635,7 +615,7 @@ static inline u32 msg_link_selector(struct tipc_msg *m)
static
inline
void
msg_set_link_selector
(
struct
tipc_msg
*
m
,
u32
n
)
{
msg_set_bits
(
m
,
4
,
0
,
1
,
(
n
&
1
)
);
msg_set_bits
(
m
,
4
,
0
,
1
,
n
);
}
/*
...
...
@@ -659,7 +639,7 @@ static inline u32 msg_probe(struct tipc_msg *m)
static
inline
void
msg_set_probe
(
struct
tipc_msg
*
m
,
u32
val
)
{
msg_set_bits
(
m
,
5
,
0
,
1
,
(
val
&
1
)
);
msg_set_bits
(
m
,
5
,
0
,
1
,
val
);
}
static
inline
char
msg_net_plane
(
struct
tipc_msg
*
m
)
...
...
net/tipc/name_distr.c
View file @
1897fe55
...
...
@@ -94,13 +94,13 @@ static void publ_to_item(struct distr_item *i, struct publication *p)
static
struct
sk_buff
*
named_prepare_buf
(
u32
type
,
u32
size
,
u32
dest
)
{
struct
sk_buff
*
buf
=
tipc_buf_acquire
(
LONG
_H_SIZE
+
size
);
struct
sk_buff
*
buf
=
tipc_buf_acquire
(
INT
_H_SIZE
+
size
);
struct
tipc_msg
*
msg
;
if
(
buf
!=
NULL
)
{
msg
=
buf_msg
(
buf
);
tipc_msg_init
(
msg
,
NAME_DISTRIBUTOR
,
type
,
LONG
_H_SIZE
,
dest
);
msg_set_size
(
msg
,
LONG
_H_SIZE
+
size
);
tipc_msg_init
(
msg
,
NAME_DISTRIBUTOR
,
type
,
INT
_H_SIZE
,
dest
);
msg_set_size
(
msg
,
INT
_H_SIZE
+
size
);
}
return
buf
;
}
...
...
net/tipc/name_table.c
View file @
1897fe55
This diff is collapsed.
Click to expand it.
net/tipc/name_table.h
View file @
1897fe55
...
...
@@ -2,7 +2,7 @@
* net/tipc/name_table.h: Include file for TIPC name table code
*
* Copyright (c) 2000-2006, Ericsson AB
* Copyright (c) 2004-2005, Wind River Systems
* Copyright (c) 2004-2005,
2010-2011,
Wind River Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
...
...
@@ -61,9 +61,9 @@ struct port_list;
* @subscr: subscription to "node down" event (for off-node publications only)
* @local_list: adjacent entries in list of publications made by this node
* @pport_list: adjacent entries in list of publications made by this port
* @node_list:
next matching name seq publication
with >= node scope
* @cluster_list:
next matching name seq publication
with >= cluster scope
* @zone_list:
next matching name seq publication
with >= zone scope
* @node_list:
adjacent matching name seq publications
with >= node scope
* @cluster_list:
adjacent matching name seq publications
with >= cluster scope
* @zone_list:
adjacent matching name seq publications
with >= zone scope
*
* Note that the node list, cluster list, and zone list are circular lists.
*/
...
...
@@ -79,9 +79,9 @@ struct publication {
struct
tipc_node_subscr
subscr
;
struct
list_head
local_list
;
struct
list_head
pport_list
;
struct
publication
*
node_list_nex
t
;
struct
publication
*
cluster_list_nex
t
;
struct
publication
*
zone_list_nex
t
;
struct
list_head
node_lis
t
;
struct
list_head
cluster_lis
t
;
struct
list_head
zone_lis
t
;
};
...
...
net/tipc/port.c
View file @
1897fe55
This diff is collapsed.
Click to expand it.
net/tipc/socket.c
View file @
1897fe55
...
...
@@ -36,9 +36,6 @@
#include <net/sock.h>
#include <linux/tipc.h>
#include <linux/tipc_config.h>
#include "core.h"
#include "port.h"
...
...
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