Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-13 Thread Alexander Chernavin via lists.fd.io
Ole, OK, nat44_user_dump is not going to return anything in NAT ED. nat44_user_session_dump has required fields ( ip_address and vrf_id) that don't allow you to dump all the sessions. If make those fields optional, that should work. Addition of sort and limit optional fields is a good idea and

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-13 Thread Ole Troan
Hi Alexander, Let me try to restart. ;-) nat44_user_dump gives you a list of inside ip addresses that have sessions. That makes sense when you track sessions by inside ip address (user). E.g. in a traditional NAT where in endpoint independent mode you use up an outside port per-session and you n

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-13 Thread Alexander Chernavin via lists.fd.io
Hello Ole, I'm not sure I get your question right. The use case is being able to see NAT pool utilization and debug NAT sessions. I  think it's not a specific use case. NAT44 ED sessions: thread 0 vpp_main: 3 sessions i2o 10.255.10.100 proto icmp port 1593 fib 0 o2i 10.1

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Ole Troan
Alexander, Is your use case list all sessions matching x rather than list all sessions with sa==n? Cheers Ole > On 12 May 2020, at 16:28, Klement Sekera via lists.fd.io > wrote: > > ED NAT no longer has “user” concept and it doesn’t differentiate one session > from another. (So technicall

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Klement Sekera via lists.fd.io
ED NAT no longer has “user” concept and it doesn’t differentiate one session from another. (So technically the API works just fine). Even if we wanted to recreate that information it means to build a hash of “users” on the fly for API purpose, do the dump and then throw it away. I don’t see any

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Alexander Chernavin via lists.fd.io
Klement, I would prefer the existing API working. I expect millions of sessions and it's clear that dumping them all is a blocker but during debug, there are not so many of them. Thanks, Alexander -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Klement Sekera via lists.fd.io
Alexander, It seems that fixing existing API is a huge pain. What we could do is implement an API which dumps all the sessions and the client app could sort it out. How many sessions do you typically have? As by default APIs run in a stop-the-world state, having millions of sessions will stop a

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Alexander Chernavin via lists.fd.io
Klement, Basically print statistics and debug info: number of users, what user consumes what number of sessions, what session created for what communication. Thanks, Alexander -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16334): https://lists.f

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Klement Sekera via lists.fd.io
Hi Alexander, Understood. So when you get those sessions, what do you do with them? Thanks, Klement > On 12 May 2020, at 13:45, Alexander Chernavin via lists.fd.io > wrote: > > Hello Klement, > > I want to list all NAT sessions. In order to do that I used to call > VL_API_NAT44_USER_DUMP.

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Ole Troan
Alexander, > I want to list all NAT sessions. In order to do that I used to call > VL_API_NAT44_USER_DUMP. After that, I had all users, and I could call > VL_API_NAT44_USER_SESSION_DUMP to get sessions for every user. > > Now VL_API_NAT44_USER_DUMP returns nothing in ED mode and I don't know wh

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Alexander Chernavin via lists.fd.io
Hello Klement, I want to list all NAT sessions. In order to do that I used to call VL_API_NAT44_USER_DUMP. After that, I had all users, and I could call VL_API_NAT44_USER_SESSION_DUMP to get sessions for every user. Now VL_API_NAT44_USER_DUMP returns nothing in ED mode and I don't know what us

Re: [vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Klement Sekera via lists.fd.io
Hi Alexander, thanks for your feedback. The concept of user was really used for quickly re-using existing sessions in NAT. With port-overloading, ports are no longer a precious resource and dropping “users” means not having to maintain an extra hash table. To better understand your problem, ca

[vpp-dev] NAT ED empty users dump #nat #nat44

2020-05-12 Thread Alexander Chernavin via lists.fd.io
Hello, As I understand the "users" concept has been removed from NAT ED and now vl_api_nat44_user_dump_t returns nothing in ED mode. vl_api_nat44_user_session_dump_t returns sessions only if you know the user you are requesting sessions for. But you can't get the user list. Therefore this chai