Hi, 

Inline.

> On Mar 2, 2021, at 8:19 AM, theoliviadun...@gmail.com wrote:
> 
> Dear All,
> 
> The example application hs_apps/proxy.c 
> <https://github.com/FDio/vpp/blob/master/src/plugins/hs_apps/proxy.c> seems 
> to achieve the functionality of TCP proxy using VPP host stack.

FC: Yes, but keep in mind that’s an explicit proxy (client connects to the 
proxy’s ip). 

> 
> 1. It uses Session Layer API with FIFO. My understanding is that it includes 
> 2 packet memcpy for all the TCP data packets (One from vlib_buffer to FIFO, 
> again from FIFO to vlib_buffer).

FC: Correct. 

> Any solution to avoid this and modify the same buffer between connections? 
> Assuming it is okay to compromise on packet reordering or TCP segment overlap 
> functionality.

FC: In spite of the memcpy, performance should be pretty good, i.e., last time 
I checked the proxy was able to saturate a 10Gbps nic with 1 connection. Have 
you hit any limitation? 

As for the option of compromising the logic that deals with ooo packet arrivals 
and retransmissions, that would most probably break TCP, so it’s not really an 
option. 

>   1.1 Since the proxy runs in same VPP process, shared memory is not needed. 
> Also any documentation on Hoststack's Binary API?

FC: At this point, the binary api is only used as one of the two options for 
attaching external apps to the host stack. If you actually meant the functions 
is application_interface.h, then unfortunately no, there’s no documentation 
beyond the code. 

> 2. If it is not possible to avoid FIFO in shared memory,

FC: The fifo segments are "buffer space" and fifos rely on them by 
construction. In theory, fifos could be updated to queue and release buffers 
(equivalent to converting the buffer pool into a fifo segment) but that’s by no 
means trivial and performance benefits are not entirely clear, i.e., number of 
buffers will have to grow as the number of connections is scaled up.

> is there any limit on the number of connections because of the linux fd? 

FC: Not sure I understand the question. We only use memfds for fifo segments, 
apart from cut-through sessions which need 1 fifo segment/ connection, why 
would that be a limiting factor?

Regards,
Florin

> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18835): https://lists.fd.io/g/vpp-dev/message/18835
Mute This Topic: https://lists.fd.io/mt/81029148/21656
Mute #vpp-hoststack:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-hoststack
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