diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2017-10-13 05:04:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-13 11:46:00 -0400 |
commit | f70d37b796241f617107d5585ee96a7e1b660b63 (patch) | |
tree | 3f23524fa7b31c7205d0c7f1f49cfd6ff027d5b6 /net/tipc/node.c | |
parent | 64ac5f5977df5b276374fb2f051082129f5cdb22 (diff) |
tipc: add new function for sending multiple small messages
We see an increasing need to send multiple single-buffer messages
of TIPC_SYSTEM_IMPORTANCE to different individual destination nodes.
Instead of looping over the send queue and sending each buffer
individually, as we do now, we add a new help function
tipc_node_distr_xmit() to do this.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 6cc1ae600820..89f8ac73bf65 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -1254,6 +1254,22 @@ int tipc_node_xmit_skb(struct net *net, struct sk_buff *skb, u32 dnode, | |||
1254 | return 0; | 1254 | return 0; |
1255 | } | 1255 | } |
1256 | 1256 | ||
1257 | /* tipc_node_distr_xmit(): send single buffer msgs to individual destinations | ||
1258 | * Note: this is only for SYSTEM_IMPORTANCE messages, which cannot be rejected | ||
1259 | */ | ||
1260 | int tipc_node_distr_xmit(struct net *net, struct sk_buff_head *xmitq) | ||
1261 | { | ||
1262 | struct sk_buff *skb; | ||
1263 | u32 selector, dnode; | ||
1264 | |||
1265 | while ((skb = __skb_dequeue(xmitq))) { | ||
1266 | selector = msg_origport(buf_msg(skb)); | ||
1267 | dnode = msg_destnode(buf_msg(skb)); | ||
1268 | tipc_node_xmit_skb(net, skb, dnode, selector); | ||
1269 | } | ||
1270 | return 0; | ||
1271 | } | ||
1272 | |||
1257 | void tipc_node_broadcast(struct net *net, struct sk_buff *skb) | 1273 | void tipc_node_broadcast(struct net *net, struct sk_buff *skb) |
1258 | { | 1274 | { |
1259 | struct sk_buff *txskb; | 1275 | struct sk_buff *txskb; |