diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2017-01-03 16:55:10 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-03 17:13:05 +0100 |
commit | 4d8642d896c53966d32d5e343c3620813dd0e7c8 (patch) | |
tree | db71d2efc406446d9a0d9753dc80247a6f0cf217 /net/tipc/socket.c | |
parent | tipc: unify tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() functions (diff) | |
download | linux-4d8642d896c53966d32d5e343c3620813dd0e7c8.tar.xz linux-4d8642d896c53966d32d5e343c3620813dd0e7c8.zip |
tipc: modify struct tipc_plist to be more versatile
During multicast reception we currently use a simple linked list with
push/pop semantics to store port numbers.
We now see a need for a more generic list for storing values of type
u32. We therefore make some modifications to this list, while replacing
the prefix 'tipc_plist_' with 'u32_'. We also add a couple of new
functions which will come to use in the next commits.
Acked-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index f27462eeccbe..fae6a55ef1b0 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -788,7 +788,7 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq, struct sk_buff_head *inputq) { struct tipc_msg *msg; - struct tipc_plist dports; + struct list_head dports; u32 portid; u32 scope = TIPC_CLUSTER_SCOPE; struct sk_buff_head tmpq; @@ -796,7 +796,7 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq, struct sk_buff *skb, *_skb; __skb_queue_head_init(&tmpq); - tipc_plist_init(&dports); + INIT_LIST_HEAD(&dports); skb = tipc_skb_peek(arrvq, &inputq->lock); for (; skb; skb = tipc_skb_peek(arrvq, &inputq->lock)) { @@ -810,8 +810,8 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq, tipc_nametbl_mc_translate(net, msg_nametype(msg), msg_namelower(msg), msg_nameupper(msg), scope, &dports); - portid = tipc_plist_pop(&dports); - for (; portid; portid = tipc_plist_pop(&dports)) { + portid = u32_pop(&dports); + for (; portid; portid = u32_pop(&dports)) { _skb = __pskb_copy(skb, hsz, GFP_ATOMIC); if (_skb) { msg_set_destport(buf_msg(_skb), portid); |