Hi Olivia, 

Inline.

> On Jun 21, 2021, at 12:51 AM, Olivia Dunham <theoliviadun...@gmail.com> wrote:
> 
> Hi Florin,
> 
> Digging further into this, I got to know that only the main core handles 
> `vnet_connect`. The TCP connection is owned by main core while it is in 
> active open state. 

Yes, that’s accurate. 

> But also I see that half open table as well as other data structures are 
> properly locked. So will it be possible to handle active open without 
> involving main core at all?

Unfortunately not yet. Half-open pools are shared between the thread that opens 
connections and the ones that eventually end up with the established 
connections. Currently main thread opens connections with a worker barrier and 
subsequently workers read data into the half-open pool without any lock but do 
not add/remove half-open connections. Cleanup is handled with timers also on 
main thread. 

> Do you see any problem with below scenario? Do we need to add more locks?
> 1. VPP worker core calls `vnet_connect` inside a graph node.

That is definitely acceptable. 

> 2. The connection is set to be owned by the worker which called 
> `vnet_connect`.

Not sure if you only want the half-open to be owned by said worker or the 
established connection as well. Either way, currently we don’t support either 
of those two, the latter because of we let the nic decide the worker with rss 
hashing. 

> 3. SYN is generated from the same worker instead of main core. 

As per above, it can’t work currently. One thing I’ve been considering is to 
move the active opens from main to first worker. For most part, tcp might work 
correctly but it might still need some additional locks on the port tables 
whereas udp needs some more changes. 

Out of curiosity, any particular reason why you’re looking into this? Are you 
hitting any active open performance limitations with the latest version of vpp? 

Regards, 
Florin

> 
> 

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