On 06/13/2016 02:24 PM, Erik Hugne wrote:
> On Mon, Jun 13, 2016 at 01:51:15PM -0400, Jon Maloy wrote:
>> --- a/net/tipc/socket.c
>> +++ b/net/tipc/socket.c
>> @@ -1830,6 +1834,14 @@ void tipc_sk_rcv(struct net *net, struct sk_buff_head 
>> *inputq)
>>                              tipc_sk_enqueue(inputq, sk, dport);
>>                              spin_unlock_bh(&sk->sk_lock.slock);
>>                      }
>> +                    /* Send pending response/rejected messages, if any */
>> +                    while (!skb_queue_empty(&sk->sk_write_queue)) {
>> +                            skb = skb_dequeue(&sk->sk_write_queue);
>> +                            if (!skb)
>> +                                    break;
>> +                            dnode = msg_destnode(buf_msg(skb));
>> +                            tipc_node_xmit_skb(net, skb, dnode, dport);
>> +                    }
> Might i suggest this instead?
>       while ((skb = skb_dequeue(&sk->sk_write_queue))) {
I already thought about that, and checked the implementation of 
skb_dequeue(). As I suspected it unconditionally grabs the queue lock 
before checking if there is anything to return. We don't want that on 
the critical data path.

///jon

>               dnode = msg_destnode(buf_msg(skb));
>               tipc_node_xmit_skb(net, skb, dnode, dport);
>       }
>
> //E
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> tipc-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tipc-discussion


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to