On 10/04/2016 09:24 PM, Jon Maloy wrote:
>
>
>> -----Original Message-----
>> From: Parthasarathy Bhuvaragan
>> Sent: Tuesday, 04 October, 2016 08:29
>> To: tipc-discussion@lists.sourceforge.net; Jon Maloy 
>> <jon.ma...@ericsson.com>;
>> ma...@donjonn.com; Ying Xue <ying....@windriver.com>
>> Subject: [PATCH net v1 1/3] tipc: fix socket wakeup when the transmit queue 
>> is
>> empty
>>
>> Until now, in tipc_link_rcv() the sockets are woken only when we were
>> able to release a frame from the link's transmit queue.
>> However link_prepare_wakeup(), wakes only as many users as permitted
>> by the current link window and the rest of the users are woken the
>> next time a frame is released. In case of the released frame being
>> the last frame in the transmit queue i.e the queue becomes empty, we
>> miss to wake the users and they experience permanent congestion.
>>
>> In this commit, we wakeup the users if link's transmit queue is empty.
>>
>> Signed-off-by: Parthasarathy Bhuvaragan
>> <parthasarathy.bhuvara...@ericsson.com>
>> ---
>>  net/tipc/link.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/net/tipc/link.c b/net/tipc/link.c
>> index b36e16cdc945..28f9376ce6d7 100644
>> --- a/net/tipc/link.c
>> +++ b/net/tipc/link.c
>> @@ -1251,6 +1251,10 @@ int tipc_link_rcv(struct tipc_link *l, struct sk_buff 
>> *skb,
>>                               link_prepare_wakeup(l);
>>               }
>>
>> +             if (skb_queue_empty(&l->transmq) &&
>> +                 !skb_queue_empty(&l->wakeupq))
>> +                     link_prepare_wakeup(l);
>
> I don't think this one is needed. If you look at the last lines of 
> tipc_link_proto_rcv() the wakeups are attempted unconditionally on an idle 
> link, and it is anyway at STATE messages that this property is important.
Thanks for spotting it. Yes, I see that now. I drop this patch.
/Partha
>
> ///jon
>
>> +
>>               /* Defer delivery if sequence gap */
>>               if (unlikely(seqno != rcv_nxt)) {
>>                       __tipc_skb_queue_sorted(defq, seqno, skb);
>> --
>> 2.1.4
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to