All of lore.kernel.org
 help / color / mirror / Atom feed
* One question regarding the SCTP write buffer free mechanism
@ 2020-03-26  5:22 Mao, Jinhui (NSB - CN/Hangzhou)
  2020-03-26 19:29 ` Marcelo Ricardo Leitner
  2020-03-27  4:57 ` Mao, Jinhui (NSB - CN/Hangzhou)
  0 siblings, 2 replies; 3+ messages in thread
From: Mao, Jinhui (NSB - CN/Hangzhou) @ 2020-03-26  5:22 UTC (permalink / raw)
  To: linux-sctp

Dear Linux SCTP experts. 

Recently we found a SCTP problem in our product, the scenario can be described as follow

Endpoint A                                                                                     Endpoint Z 
{App sends 3 messages; strm 0} DATA [TSN=6] ---------------> (ack) 
                                                     DATA [TSN=7] ---------------> (lost)
                                                     DATA [TSN=8] ---------------> (gap detected,immediately send ack)
                                                                                              /----- SACK [TSN Ack=6,Block=1, Start=2,End=2]
                                                                                    <-----/ 
                                                                                     ......
                                                   DATA [TSN\x10] ---------------> (gap detected,immediately send ack)
                                                                                               /----- SACK [TSN Ack=6,Block=1, Start=2,End=4]
                                                                                    <-----/       (3 SACK to indicate that TSN=7 lost, fast re-trans triggered)
                                       Re-trans DATA [TSN=7] ---------------> (also lost)
                                                    DATA [TSN\x11] ---------------> (gap detected,immediately send ack)
                                                                                               /----- SACK [TSN Ack=6,Block=1, Start=2,End=5]
                                                                                     <-----/       
                                                                                       ......
                                                  DATA [TSN40] ---------------> (gap detected,immediately send ack)
                                                                                                /----- SACK [TSN Ack=6,Block=1, Start=2,End34]
                                                                                      <-----/       
                       Error happened on Endpoint A when calling SCTP sendmsg to send more to Endpoint B, the error is "Resource temporarily unavailable". Association is not destroyed at this time. 
1 second later RTO Timeout 2nd Re-trans DATA [TSN=7] ---------------> (Acked)


So could you please help to comments on the following question?
-	Does this means that if an gap is found in the SACK, those packages sent after this lost packet will stay in the write buffer until the gap is filled? Even if they are successfully SACKed?

Thanks a lot!

Best Regards!

Mao Jinhui

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: One question regarding the SCTP write buffer free mechanism
  2020-03-26  5:22 One question regarding the SCTP write buffer free mechanism Mao, Jinhui (NSB - CN/Hangzhou)
@ 2020-03-26 19:29 ` Marcelo Ricardo Leitner
  2020-03-27  4:57 ` Mao, Jinhui (NSB - CN/Hangzhou)
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Ricardo Leitner @ 2020-03-26 19:29 UTC (permalink / raw)
  To: linux-sctp

On Thu, Mar 26, 2020 at 05:22:46AM +0000, Mao, Jinhui (NSB - CN/Hangzhou) wrote:
...
>                        Error happened on Endpoint A when calling SCTP sendmsg to send more to Endpoint B, the error is "Resource temporarily unavailable". Association is not destroyed at this time. 
> 1 second later RTO Timeout 2nd Re-trans DATA [TSN=7] ---------------> (Acked)
> 
> 
> So could you please help to comments on the following question?
> -	Does this means that if an gap is found in the SACK, those packages sent after this lost packet will stay in the write buffer until the gap is filled? Even if they are successfully SACKed?

Yes and yes. Because the receiver is allowed to drop any data acked in
a gap block if it needs more memory to fill in the gap, and in this
case, the sender would have to retransmit it.

Seems you're using non-block sockets, otherwise that last sendmsg()
would have blocked waiting for the sndbuf space to be available, btw.

Cheers,
  Marcelo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: One question regarding the SCTP write buffer free mechanism
  2020-03-26  5:22 One question regarding the SCTP write buffer free mechanism Mao, Jinhui (NSB - CN/Hangzhou)
  2020-03-26 19:29 ` Marcelo Ricardo Leitner
@ 2020-03-27  4:57 ` Mao, Jinhui (NSB - CN/Hangzhou)
  1 sibling, 0 replies; 3+ messages in thread
From: Mao, Jinhui (NSB - CN/Hangzhou) @ 2020-03-27  4:57 UTC (permalink / raw)
  To: linux-sctp

VGhhbmtzIGEgbG90IGZvciB0aGUgcmVzcG9uc2UuIEl0YHMgY2xlYXIgZm9yIG1lIG5vdy4g8J+Y
gw0KDQpIYXZlIGEgbmljZSBkYXkhDQoNCkJlc3QgUmVnYXJkcyENCg0KTWFvIEppbmh1aQ0KDQot
LS0tLU9yaWdpbmFsIE1lc3NhZ2UtL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HNlbnQgYWZ0ZXIgdGhpcyBsb3N0IHBhY2tldCB3aWxsIHN0YXkgaW4gdGhl
IHdyaXRlIGJ1ZmZlciB1bnRpbCB0aGUgZ2FwIGlzIGZpbGxlZD8gRXZlbiBpZiB0aGV5IGFyZSBz
dWNjZXNzZnVsbHkgU0FDS2VkPw0KDQpZZXMgYW5kIHllcy4gQmVjYXVzZSB0aGUgcmVjZWl2ZXIg
aXMgYWxsb3dlZCB0byBkcm9wIGFueSBkYXRhIGFja2VkIGluIGEgZ2FwIGJsb2NrIGlmIGl0IG5l
ZWRzIG1vcmUgbWVtb3J5IHRvIGZpbGwgaW4gdGhlIGdhcCwgYW5kIGluIHRoaXMgY2FzZSwgdGhl
IHNlbmRlciB3b3VsZCBoYXZlIHRvIHJldHJhbnNtaXQgaXQuDQoNClNlZW1zIHlvdSdyZSB1c2lu
ZyBub24tYmxvY2sgc29ja2V0cywgb3RoZXJ3aXNlIHRoYXQgbGFzdCBzZW5kbXNnKCkgd291bGQg
aGF2ZSBibG9ja2VkIHdhaXRpbmcgZm9yIHRoZSBzbmRidWYgc3BhY2UgdG8gYmUgYXZhaWxhYmxl
LCBidHcuDQoNCkNoZWVycywNCiAgTWFyY2Vsbw0K

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-27  4:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-26  5:22 One question regarding the SCTP write buffer free mechanism Mao, Jinhui (NSB - CN/Hangzhou)
2020-03-26 19:29 ` Marcelo Ricardo Leitner
2020-03-27  4:57 ` Mao, Jinhui (NSB - CN/Hangzhou)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.