Hi Max,

Inline.

> On Jul 28, 2019, at 10:47 AM, Max A. <max1...@mail.ru> wrote:
> 
> Hi Florin,
> 
> I simplified the application. It sends the request and reads all the data 
> from the server using the 8 KB buffer. The fifo size is set to 8 KB. In the 
> attached dump [1] you can see that in packet number 14 there will be an 
> overflow of the size of the tcp window.

Looks much better. I suspect that the issue with packet 14 is the fact that vpp 
accepts the session and notifies vcl of it, but vcl needs a bit of time to 
initialize its state and therefore won’t manage to read any data prior to the 
fifo being filled. 

> My application reports the size of the received block. If the tcp window size 
> is full, the application receives 7240 bytes from vpp. Next, the application 
> receives data no larger than 6 KB, and the problem does not occur. At what 
> point in time does vpp decide that the buffer is full, before I get the data 
> from the read function?

TCP in vpp processes bursts of packets (up to 256). If a packet in a burst is 
accepted, tcp enqueues its data in the associated session's rx fifo, shared 
with the app, and it sends a notification for that session at the end of the 
burst only if the fifo does not already have one. From what you’re seeing, not 
all 7240B come in a burst, so vcl gets a notification before the rx fifo fills.
 
> There is also a slightly different question. Is the fifo allocated for the 
> all lifetime of the session?

Short answer yes. It’s just a chunk of memory shared by the session layer with 
vcl.

Longer answer is that the fifo's data portion (where connection data is stored) 
can be grown, so more data could be enqueued. But fifo growth is not managed 
transparently by the session layer (i.e., no auto tuning), and at this time, 
external applications (like vcl) can’t control the fifo size. 

Florin

> 
> Thanks.
> 
> [1] https://drive.google.com/open?id=1Q__5UgnBAKoRGfaGaqIxAVNWqoSCzIPZ 
> <https://drive.google.com/open?id=1Q__5UgnBAKoRGfaGaqIxAVNWqoSCzIPZ> 
> 
> -- 
> Max A.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13598): https://lists.fd.io/g/vpp-dev/message/13598
Mute This Topic: https://lists.fd.io/mt/32582078/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to