diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2017-01-03 10:55:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-03 11:13:05 -0500 |
commit | 4d8642d896c53966d32d5e343c3620813dd0e7c8 (patch) | |
tree | db71d2efc406446d9a0d9753dc80247a6f0cf217 /net/tipc/socket.c | |
parent | 8c44e1af16b2983b3df93117cd0ca40638998ce3 (diff) |
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, | |||
788 | struct sk_buff_head *inputq) | 788 | struct sk_buff_head *inputq) |
789 | { | 789 | { |
790 | struct tipc_msg *msg; | 790 | struct tipc_msg *msg; |
791 | struct tipc_plist dports; | 791 | struct list_head dports; |
792 | u32 portid; | 792 | u32 portid; |
793 | u32 scope = TIPC_CLUSTER_SCOPE; | 793 | u32 scope = TIPC_CLUSTER_SCOPE; |
794 | struct sk_buff_head tmpq; | 794 | struct sk_buff_head tmpq; |
@@ -796,7 +796,7 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq, | |||
796 | struct sk_buff *skb, *_skb; | 796 | struct sk_buff *skb, *_skb; |
797 | 797 | ||
798 | __skb_queue_head_init(&tmpq); | 798 | __skb_queue_head_init(&tmpq); |
799 | tipc_plist_init(&dports); | 799 | INIT_LIST_HEAD(&dports); |
800 | 800 | ||
801 | skb = tipc_skb_peek(arrvq, &inputq->lock); | 801 | skb = tipc_skb_peek(arrvq, &inputq->lock); |
802 | for (; skb; skb = tipc_skb_peek(arrvq, &inputq->lock)) { | 802 | 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, | |||
810 | tipc_nametbl_mc_translate(net, | 810 | tipc_nametbl_mc_translate(net, |
811 | msg_nametype(msg), msg_namelower(msg), | 811 | msg_nametype(msg), msg_namelower(msg), |
812 | msg_nameupper(msg), scope, &dports); | 812 | msg_nameupper(msg), scope, &dports); |
813 | portid = tipc_plist_pop(&dports); | 813 | portid = u32_pop(&dports); |
814 | for (; portid; portid = tipc_plist_pop(&dports)) { | 814 | for (; portid; portid = u32_pop(&dports)) { |
815 | _skb = __pskb_copy(skb, hsz, GFP_ATOMIC); | 815 | _skb = __pskb_copy(skb, hsz, GFP_ATOMIC); |
816 | if (_skb) { | 816 | if (_skb) { |
817 | msg_set_destport(buf_msg(_skb), portid); | 817 | msg_set_destport(buf_msg(_skb), portid); |