[vpp-dev] change vhost-user queue size
Hi all, When vpp sends packets to a VM via a vhost-user interface, it will put the packet in a queue (called `rxvq` in the code). It seems the default queue size is 256 descriptors (I print rxvq->qsz_mask+1, and get 256). Is it possible to increase the queue size, and how? I followed the steps here <https://wiki.fd.io/view/VPP/Use_VPP_to_Chain_VMs_Using_Vhost-User_Interface> to setup the vhost-user interfaces and VM. Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University
[vpp-dev] NFV with VPP
Hi all, If I want to run a VNF chain (e.g., FW, NAT, IDS, VPN gateway...), what is the normal way of running them with VPP? Do we run each VNF in a VM/container and use VPP as a software switch, or run each VNF as a node in the VPP graph? If it is the latter case, is there any open source code online for these VNF (say, IDS or VPN) that can be plugged into VPP? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] Bug?
That makes sense. Let me check. On Tue, Dec 5, 2017 at 10:19 AM, John Lo (loj) wrote: > In L2 mode, the ethernet interface will be put in promiscuous mode to > receive all packets on the wire. In L3 mode, it will only receive packets > whose destination MAC is that of the interface. What you observe is the > expected behavior. -John > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Tuesday, December 05, 2017 9:59 AM > *To:* Neale Ranns (nranns) > *Cc:* vpp-dev@lists.fd.io > *Subject:* Re: [vpp-dev] Bug? > > > > Actually there is no packet going to int2. > > > > When in L3 mode, dpdk-input does not get any packet from int2. But just by > changing it to L2 mode, dpdk-input gets exactly the same packet from int2 > as from int1. > > > > At dpdk-input, whether the interface is L2 or L3 should not affect the > packet it gets. The check (e.g., ethernet-input) is after the dpdk-input. > > > > That's why I think it may be a bug. (e.g., somehow the memory of the frame > at int1 and int2 are the same, so the dpdk-input puts the same packet to > the next node twice. Just my guess, may be wrong). > > > > On Tue, Dec 5, 2017 at 4:05 AM, Neale Ranns (nranns) > wrote: > > > > By ‘receive’ in this context, I assume you mean it accepts the packet that > has arrived on the wire. As opposed to the fact that the packet did indeed > arrive at that interface - clearly it is not the receiving device that > influences which packets arrive at which interfaces. > > > > So, let me bounce this back to you. Under what circumstances do L3 and L2 > ports accept a packet? > > > > Regards, > > neale > > > > *From: * on behalf of Yuliang Li < > yuliang...@yale.edu> > *Date: *Tuesday, 5 December 2017 at 04:55 > *To: *"vpp-dev@lists.fd.io" > *Subject: *[vpp-dev] Bug? > > > > Hi, > > > > I am using vpp v18.01-rc0~160-ge13c799 (show version in vppctl). I feel > I find a bug. > > > > I have two physical interfaces TenGigabitEthernet5/0/0 (int1) > and TenGigabitEthernet5/0/1 (int2). > > > > Normally, if I send traffic (from another server) to int1, I expect int2 > should NOT receive the traffic. This is true when int2 is in l3 mode. > > > > However, if I set int2 to l2 mode (e.g., set interface l2 bridge > TenGigabitEthernet5/0/1 2), int2 will receive the same traffic as int1 > does. This problem happens no matter int1 is in l2 or l3 mode. I use the > trace to confirm that int2 receives the same traffic as int1 does. > > > > Does anyone know this problem? > > > > Thanks, > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > > > > > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] Bug?
Actually there is no packet going to int2. When in L3 mode, dpdk-input does not get any packet from int2. But just by changing it to L2 mode, dpdk-input gets exactly the same packet from int2 as from int1. At dpdk-input, whether the interface is L2 or L3 should not affect the packet it gets. The check (e.g., ethernet-input) is after the dpdk-input. That's why I think it may be a bug. (e.g., somehow the memory of the frame at int1 and int2 are the same, so the dpdk-input puts the same packet to the next node twice. Just my guess, may be wrong). On Tue, Dec 5, 2017 at 4:05 AM, Neale Ranns (nranns) wrote: > > > By ‘receive’ in this context, I assume you mean it accepts the packet that > has arrived on the wire. As opposed to the fact that the packet did indeed > arrive at that interface - clearly it is not the receiving device that > influences which packets arrive at which interfaces. > > > > So, let me bounce this back to you. Under what circumstances do L3 and L2 > ports accept a packet? > > > > Regards, > > neale > > > > *From: * on behalf of Yuliang Li < > yuliang...@yale.edu> > *Date: *Tuesday, 5 December 2017 at 04:55 > *To: *"vpp-dev@lists.fd.io" > *Subject: *[vpp-dev] Bug? > > > > Hi, > > > > I am using vpp v18.01-rc0~160-ge13c799 (show version in vppctl). I feel > I find a bug. > > > > I have two physical interfaces TenGigabitEthernet5/0/0 (int1) > and TenGigabitEthernet5/0/1 (int2). > > > > Normally, if I send traffic (from another server) to int1, I expect int2 > should NOT receive the traffic. This is true when int2 is in l3 mode. > > > > However, if I set int2 to l2 mode (e.g., set interface l2 bridge > TenGigabitEthernet5/0/1 2), int2 will receive the same traffic as int1 > does. This problem happens no matter int1 is in l2 or l3 mode. I use the > trace to confirm that int2 receives the same traffic as int1 does. > > > > Does anyone know this problem? > > > > Thanks, > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] Bug?
Hi, I am using vpp v18.01-rc0~160-ge13c799 (show version in vppctl). I feel I find a bug. I have two physical interfaces TenGigabitEthernet5/0/0 (int1) and TenGigabitEthernet5/0/1 (int2). Normally, if I send traffic (from another server) to int1, I expect int2 should NOT receive the traffic. This is true when int2 is in l3 mode. However, if I set int2 to l2 mode (e.g., set interface l2 bridge TenGigabitEthernet5/0/1 2), int2 will receive the same traffic as int1 does. This problem happens no matter int1 is in l2 or l3 mode. I use the trace to confirm that int2 receives the same traffic as int1 does. Does anyone know this problem? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] zero copy when delivering packet from vpp to a VM/container?
Hi all, Is there a way to attach a VM/container to VPP, so that packet between vpp and VM/container requires zero copy? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] ACL
I tried some ACL config, but it does not work as I expected. I send traffic into interface 1, and vpp should send the traffic out through interface 2. For ACL, I first add this ACL. acl_add_replace ipv4 src 10.0.0.0/8 deny Then, I send traffic after adding each of the following 4 configs. acl_interface_add_del sw_if_index 1 add input acl 0 acl_interface_add_del sw_if_index 1 add output acl 0 acl_interface_add_del sw_if_index 2 add input acl 0 acl_interface_add_del sw_if_index 2 add output acl 0 I expect no traffic being sent out after adding the ACL to the input of interface 1. However, I still see traffic going out of interface 2. Only after the 4th config, no traffic is sent out. Also in the "show run" in vppctl, I can only see "acl-plugin-fa-worker-cleaner-pinterrupt" and "acl-plugin-out-ip4-fa" that are related to ACL. I think this means ACL at the input of an interface is not working. Do you see anything wrong here? Thanks, Yuliang On Tue, Nov 14, 2017 at 5:10 AM, Andrew Yourtchenko wrote: > Cool! > > Sure, you can use vat in that case as well. > > --a > > On 13 Nov 2017, at 22:08, Yuliang Li wrote: > > It works! Thanks. > > Another question: if I want to use ACL plugin in non-debug build (say, > build-release), is can I use vat? Or I need to use the python code? > > On Mon, Nov 13, 2017 at 12:06 PM, Andrew Yourtchenko > wrote: > >> “Make build” in the VPP directory will get you a debug build. The $1 and >> such is just standard shell scripting, in case I need to pass some >> parameters to vat. I don’t think I had ever needed them... >> >> --a >> >> On 13 Nov 2017, at 17:40, Yuliang Li wrote: >> >> Maybe this is a stupid question.. Does vat have to work with debug >> builds? And how to do the debug builds? What are the $1~$5 in your script? >> >> Thanks, >> Yuliang >> >> On Mon, Nov 13, 2017 at 3:03 AM, Andrew Yourtchenko >> wrote: >> >>> When just running vat from within the source tree, it needs to know the >>> path for the plugins, for debug builds I usually have the following small >>> shell script which takes care of this without requiring me thinking every >>> time (of course needs to be launched from the vpp top directory since it >>> has relative paths: >>> >>> $ cat ~/bin/run-vat >>> #!/bin/sh >>> sudo ./build-root/install-vpp_debug-native/vpp/bin/vpp_api_test >>> plugin_path >>> ./build-root/install-vpp_debug-native/vpp/lib64/vpp_api_test_plugins/ >>> $1 $2 $3 $4 $5 >>> >>> Not sure about the error with build-vat, I will let other folks comment >>> on it if someone knows... >>> >>> —a >>> >>> > On 13 Nov 2017, at 03:14, Yuliang Li wrote: >>> > >>> > Thanks for the quick reply. >>> > >>> > I still fail to use the vat to configure ACL. After make >>> build-release, I use sudo build-root/build-vpp-native/vpp/vpp_api_test, >>> but it tell me: >>> > 'acl_plugin_get_version': function not found >>> > Other ACL commands have the same problem. >>> > >>> > I also tried make build-vat, but it gives the following error: >>> > Arch for platform 'vpp' is native >>> > Finding source for vpp-api-test >>> > Package vpp-api-test not found with path /home/bright/tools/vpp >>> >>> > Makefile:780: recipe for target 'vpp-api-test-find-source' failed >>> > make[1]: *** [vpp-api-test-find-source] Error 1 >>> > make[1]: Leaving directory '/home/bright/tools/vpp/build-root' >>> > Makefile:460: recipe for target 'build-vat' failed >>> > make: *** [build-vat] Error 2 >>> > >>> > Am I doing something wrong here? >>> > >>> > Thanks, >>> > Yuliang >>> > >>> > On Sun, Nov 12, 2017 at 5:15 PM, Andrew 👽 Yourtchenko < >>> ayour...@gmail.com> wrote: >>> > Hi Yuliang, >>> > >>> > You can look at the test/test_acl_plugin_*.py files for the examples >>> > of interactions with plugin from python code. >>> > >>> > Alternatively, you can use VPP API test tool (vat) which is built >>> > together with VPP and then issue the API calls directly from there. >>> > >>> > Shout if you have any questions, will be happy to answer! :) >>> > >>> > --a >>> > >>> > On 11/12/17, Yuliang Li wrote: >>> > > Hi, >>>
Re: [vpp-dev] ACL
It works! Thanks. Another question: if I want to use ACL plugin in non-debug build (say, build-release), is can I use vat? Or I need to use the python code? On Mon, Nov 13, 2017 at 12:06 PM, Andrew Yourtchenko wrote: > “Make build” in the VPP directory will get you a debug build. The $1 and > such is just standard shell scripting, in case I need to pass some > parameters to vat. I don’t think I had ever needed them... > > --a > > On 13 Nov 2017, at 17:40, Yuliang Li wrote: > > Maybe this is a stupid question.. Does vat have to work with debug builds? > And how to do the debug builds? What are the $1~$5 in your script? > > Thanks, > Yuliang > > On Mon, Nov 13, 2017 at 3:03 AM, Andrew Yourtchenko > wrote: > >> When just running vat from within the source tree, it needs to know the >> path for the plugins, for debug builds I usually have the following small >> shell script which takes care of this without requiring me thinking every >> time (of course needs to be launched from the vpp top directory since it >> has relative paths: >> >> $ cat ~/bin/run-vat >> #!/bin/sh >> sudo ./build-root/install-vpp_debug-native/vpp/bin/vpp_api_test >> plugin_path >> ./build-root/install-vpp_debug-native/vpp/lib64/vpp_api_test_plugins/ >> $1 $2 $3 $4 $5 >> >> Not sure about the error with build-vat, I will let other folks comment >> on it if someone knows... >> >> —a >> >> > On 13 Nov 2017, at 03:14, Yuliang Li wrote: >> > >> > Thanks for the quick reply. >> > >> > I still fail to use the vat to configure ACL. After make build-release, >> I use sudo build-root/build-vpp-native/vpp/vpp_api_test, but it tell me: >> > 'acl_plugin_get_version': function not found >> > Other ACL commands have the same problem. >> > >> > I also tried make build-vat, but it gives the following error: >> > Arch for platform 'vpp' is native >> > Finding source for vpp-api-test >> > Package vpp-api-test not found with path /home/bright/tools/vpp >> >> > Makefile:780: recipe for target 'vpp-api-test-find-source' failed >> > make[1]: *** [vpp-api-test-find-source] Error 1 >> > make[1]: Leaving directory '/home/bright/tools/vpp/build-root' >> > Makefile:460: recipe for target 'build-vat' failed >> > make: *** [build-vat] Error 2 >> > >> > Am I doing something wrong here? >> > >> > Thanks, >> > Yuliang >> > >> > On Sun, Nov 12, 2017 at 5:15 PM, Andrew 👽 Yourtchenko < >> ayour...@gmail.com> wrote: >> > Hi Yuliang, >> > >> > You can look at the test/test_acl_plugin_*.py files for the examples >> > of interactions with plugin from python code. >> > >> > Alternatively, you can use VPP API test tool (vat) which is built >> > together with VPP and then issue the API calls directly from there. >> > >> > Shout if you have any questions, will be happy to answer! :) >> > >> > --a >> > >> > On 11/12/17, Yuliang Li wrote: >> > > Hi, >> > > >> > > I want to use the ACL plugin https://wiki.fd.io/view/VPP/Se >> curityGroups. It >> > > seems it can only be configured via API. I only used vppctl before. >> Can >> > > anyone please tell how to use the API to configure? Or is there other >> ways >> > > to configre? >> > > >> > > Thanks, >> > > -- >> > > Yuliang Li >> > > PhD student >> > > Department of Computer Science >> > > Yale University >> > > >> > >> > >> > >> > -- >> > Yuliang Li >> > PhD student >> > Department of Computer Science >> > Yale University >> >> > > > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] ACL
Maybe this is a stupid question.. Does vat have to work with debug builds? And how to do the debug builds? What are the $1~$5 in your script? Thanks, Yuliang On Mon, Nov 13, 2017 at 3:03 AM, Andrew Yourtchenko wrote: > When just running vat from within the source tree, it needs to know the > path for the plugins, for debug builds I usually have the following small > shell script which takes care of this without requiring me thinking every > time (of course needs to be launched from the vpp top directory since it > has relative paths: > > $ cat ~/bin/run-vat > #!/bin/sh > sudo ./build-root/install-vpp_debug-native/vpp/bin/vpp_api_test > plugin_path > ./build-root/install-vpp_debug-native/vpp/lib64/vpp_api_test_plugins/ > $1 $2 $3 $4 $5 > > Not sure about the error with build-vat, I will let other folks comment on > it if someone knows... > > —a > > > On 13 Nov 2017, at 03:14, Yuliang Li wrote: > > > > Thanks for the quick reply. > > > > I still fail to use the vat to configure ACL. After make build-release, > I use sudo build-root/build-vpp-native/vpp/vpp_api_test, but it tell me: > > 'acl_plugin_get_version': function not found > > Other ACL commands have the same problem. > > > > I also tried make build-vat, but it gives the following error: > > Arch for platform 'vpp' is native > > Finding source for vpp-api-test > > Package vpp-api-test not found with path /home/bright/tools/vpp > > Makefile:780: recipe for target 'vpp-api-test-find-source' failed > > make[1]: *** [vpp-api-test-find-source] Error 1 > > make[1]: Leaving directory '/home/bright/tools/vpp/build-root' > > Makefile:460: recipe for target 'build-vat' failed > > make: *** [build-vat] Error 2 > > > > Am I doing something wrong here? > > > > Thanks, > > Yuliang > > > > On Sun, Nov 12, 2017 at 5:15 PM, Andrew 👽 Yourtchenko < > ayour...@gmail.com> wrote: > > Hi Yuliang, > > > > You can look at the test/test_acl_plugin_*.py files for the examples > > of interactions with plugin from python code. > > > > Alternatively, you can use VPP API test tool (vat) which is built > > together with VPP and then issue the API calls directly from there. > > > > Shout if you have any questions, will be happy to answer! :) > > > > --a > > > > On 11/12/17, Yuliang Li wrote: > > > Hi, > > > > > > I want to use the ACL plugin https://wiki.fd.io/view/VPP/ > SecurityGroups. It > > > seems it can only be configured via API. I only used vppctl before. Can > > > anyone please tell how to use the API to configure? Or is there other > ways > > > to configre? > > > > > > Thanks, > > > -- > > > Yuliang Li > > > PhD student > > > Department of Computer Science > > > Yale University > > > > > > > > > > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] ACL
Thanks for the quick reply. I still fail to use the vat to configure ACL. After make build-release, I use sudo build-root/build-vpp-native/vpp/vpp_api_test, but it tell me: 'acl_plugin_get_version': function not found Other ACL commands have the same problem. I also tried make build-vat, but it gives the following error: Arch for platform 'vpp' is native Finding source for vpp-api-test Package vpp-api-test not found with path /home/bright/tools/vpp Makefile:780: recipe for target 'vpp-api-test-find-source' failed make[1]: *** [vpp-api-test-find-source] Error 1 make[1]: Leaving directory '/home/bright/tools/vpp/build-root' Makefile:460: recipe for target 'build-vat' failed make: *** [build-vat] Error 2 Am I doing something wrong here? Thanks, Yuliang On Sun, Nov 12, 2017 at 5:15 PM, Andrew 👽 Yourtchenko wrote: > Hi Yuliang, > > You can look at the test/test_acl_plugin_*.py files for the examples > of interactions with plugin from python code. > > Alternatively, you can use VPP API test tool (vat) which is built > together with VPP and then issue the API calls directly from there. > > Shout if you have any questions, will be happy to answer! :) > > --a > > On 11/12/17, Yuliang Li wrote: > > Hi, > > > > I want to use the ACL plugin https://wiki.fd.io/view/VPP/SecurityGroups. > It > > seems it can only be configured via API. I only used vppctl before. Can > > anyone please tell how to use the API to configure? Or is there other > ways > > to configre? > > > > Thanks, > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > > > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] ACL
Hi, I want to use the ACL plugin https://wiki.fd.io/view/VPP/SecurityGroups. It seems it can only be configured via API. I only used vppctl before. Can anyone please tell how to use the API to configure? Or is there other ways to configre? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] dpdk output function
Hi, Some node is called "TenGigabitEthernet5/0/1-output". I am using dpdk on this interface. Does anyone know what is the function that this node calls? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] nat44 address pool not fully used
Here are the results: CountNode Reason 10240 nat44-in2out-slowpath Good in2out packets processed 7847236 nat44-in2out-slowpath Maximum sessions exceeded 23864696 nat44-in2out Good in2out packets processed 10240 nat44-in2out-slowpath Good in2out packets processed 7846673 nat44-in2out-slowpath Maximum sessions exceeded 23864371 nat44-in2out Good in2out packets processed It seems the number of maximum sessions limits. I just updated from an older version to the latest by pulling from https://gerrit.fd.io/r/vpp3 days ago. I did not change the configuration file that I used before. Is there any default parameter value change? On Mon, Oct 30, 2017 at 1:29 AM, Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco) wrote: > Hi, > > > > Are you on latest? > > Could you please provide “show node counters” output. > > > > Regards, > > Matus > > > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Saturday, October 28, 2017 8:48 PM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] nat44 address pool not fully used > > > > Hi, > > > > I use "nat44 add addr 10.1.1.2-10.1.1.254", in the hope that in2out > traffic can use any of the source IP in the range. > > > > However, when I generate in2out traffic composing 65536 different internal > source IP (with the same source port), only 10.1.1.2 is used for external > source IP, and allocated 20162 port number. That means only 20162 internal > IP get translated, while the rest are dropped. I am wondering why it does > not allocate other addresses in the pool (e.g., 10.1.1.3)? > > > > Here are the output of show nat44 detail: > > 10.1.1.2 > > tenant VRF independent > > 0 busy udp ports > > 20162 busy tcp ports > > 0 busy icmp ports > > 10.1.1.3 > > tenant VRF independent > > 0 busy udp ports > > 0 busy tcp ports > > 0 busy icmp ports > > (all following shows 0 busy ports). > > > > Thanks, > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] nat44 address pool not fully used
Hi, I use "nat44 add addr 10.1.1.2-10.1.1.254", in the hope that in2out traffic can use any of the source IP in the range. However, when I generate in2out traffic composing 65536 different internal source IP (with the same source port), only 10.1.1.2 is used for external source IP, and allocated 20162 port number. That means only 20162 internal IP get translated, while the rest are dropped. I am wondering why it does not allocate other addresses in the pool (e.g., 10.1.1.3)? Here are the output of show nat44 detail: 10.1.1.2 tenant VRF independent 0 busy udp ports 20162 busy tcp ports 0 busy icmp ports 10.1.1.3 tenant VRF independent 0 busy udp ports 0 busy tcp ports 0 busy icmp ports (all following shows 0 busy ports). Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] SNAT hash tables
The RELEASE.md says it is for 17.04. But in vppctl, 'show ver' shows I am using v17.10-rc0~19-g58eb866 What is latest version? Thanks, Yuliang On Tue, Oct 17, 2017 at 3:01 AM, Ole Troan wrote: > Yuliang, > > > Get it. It use spinlock (in vppinfra/bihash_template.c): > > > > while (__sync_lock_test_and_set (h->writer_lock, 1)) > > > > On Mon, Oct 16, 2017 at 11:39 AM, Yuliang Li > wrote: > > Hi all, > > > > I am curious in the SNAT implementation. I see that SNAT's hash tables > are shared by all worker threads. Does SNAT use lock to avoid multiple > threads updating the hash table concurrently? If not, how does it avoid > race condition? > > Are you on latest? > The "global" NAT state space is essentially split across all workers. So > there is no locking. > > typedef struct { > /* Main lookup tables */ > clib_bihash_8_8_t out2in; > clib_bihash_8_8_t in2out; > > /* Find-a-user => src address lookup */ > clib_bihash_8_8_t user_hash; > > /* User pool */ > snat_user_t * users; > > /* Session pool */ > snat_session_t * sessions; > > /* Pool of doubly-linked list elements */ > dlist_elt_t * list_pool; > > u32 snat_thread_index; > } snat_main_per_thread_data_t; > > > Best regards, > Ole > > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] SNAT hash tables
Get it. It use spinlock (in vppinfra/bihash_template.c): while (__sync_lock_test_and_set (h->writer_lock, 1)) On Mon, Oct 16, 2017 at 11:39 AM, Yuliang Li wrote: > Hi all, > > I am curious in the SNAT implementation. I see that SNAT's hash tables > <https://wiki.fd.io/view/VPP/NAT#Data_structures> are shared by all > worker threads. Does SNAT use lock to avoid multiple threads updating the > hash table concurrently? If not, how does it avoid race condition? > > Thanks, > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] SNAT hash tables
Hi all, I am curious in the SNAT implementation. I see that SNAT's hash tables <https://wiki.fd.io/view/VPP/NAT#Data_structures> are shared by all worker threads. Does SNAT use lock to avoid multiple threads updating the hash table concurrently? If not, how does it avoid race condition? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] stop handoff in SNAT
I think I get the reason. If the flow space split is dynamic, each thread has to propagate the state across all threads when new flows come, which requires locking. Using static flow space split can avoid this, at the cost of handoff for both directions. On Thu, Jul 20, 2017 at 9:44 AM, Yuliang Li wrote: > Thanks. That's a good point. But can I just use handoff on out2in? Because > the in2out traffic is already split by RSS. > > On Wed, Jul 19, 2017 at 10:15 PM, Matus Fabian -X (matfabia - PANTHEON > TECHNOLOGIES at Cisco) wrote: > >> Hi, >> >> >> >> You need handoff when running multithread because traffic for specific >> inside network user must be processed always on same thread in both >> directions. >> >> >> >> Regards, >> >> Matus >> >> >> >> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On >> Behalf Of *Yuliang Li >> *Sent:* Thursday, July 20, 2017 5:58 AM >> *To:* vpp-dev@lists.fd.io >> *Subject:* [vpp-dev] stop handoff in SNAT >> >> >> >> Hi, >> >> >> >> Is there a way to stop handoff (move packet from one thread to another) >> in SNAT? I already use RSS to split packets across threads at the input, so >> I do not need it to spread traffic across threads again. >> >> >> >> Thanks, >> -- >> >> Yuliang Li >> >> PhD student >> >> Department of Computer Science >> >> Yale University >> > > > > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] stop handoff in SNAT
Thanks. That's a good point. But can I just use handoff on out2in? Because the in2out traffic is already split by RSS. On Wed, Jul 19, 2017 at 10:15 PM, Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco) wrote: > Hi, > > > > You need handoff when running multithread because traffic for specific > inside network user must be processed always on same thread in both > directions. > > > > Regards, > > Matus > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Thursday, July 20, 2017 5:58 AM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] stop handoff in SNAT > > > > Hi, > > > > Is there a way to stop handoff (move packet from one thread to another) in > SNAT? I already use RSS to split packets across threads at the input, so I > do not need it to spread traffic across threads again. > > > > Thanks, > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] stop handoff in SNAT
Hi, Is there a way to stop handoff (move packet from one thread to another) in SNAT? I already use RSS to split packets across threads at the input, so I do not need it to spread traffic across threads again. Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] bug?
Hi, I clone the code from https://gerrit.fd.io/r/vpp. In threads.c, line 643-645: 643 nm_clone->nodes_by_type[VLIB_NODE_TYPE_INTERNAL] = 644 vec_dup (nm->nodes_by_type[VLIB_NODE_TYPE_INTERNAL]); 645 vec_foreach (rt, nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT]) Should the VLIB_NODE_TYPE_INPUT in line 645 be VLIB_NODE_TYPE_INTERNAL? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] use a single interface for SNAT
Oh I just hack it... I am using an L2 switch to connect servers, so I manually setup the ARP tables on all hosts to make sure the traffic goes to the SNAT server. On Wed, Jul 19, 2017 at 1:29 AM, Ole Troan wrote: > > > On 19 Jul 2017, at 01:21, Yuliang Li wrote: > > Never mind. Solved. > > > How did you solve that? > Cause it's on the todo list... > > Cheers > Ole > > > > On Tue, Jul 18, 2017 at 3:51 PM, Yuliang Li wrote: > >> Hi, >> >> I want to setup SNAT on a server with just one network interface. How >> shall I setup the interface address so that both inside-outside and >> outside-inside traffic can be forwarded to this server? I failed to assign >> two IP addresses to the interface. >> >> Thanks, >> -- >> Yuliang Li >> PhD student >> Department of Computer Science >> Yale University >> > > > > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > > ___ > vpp-dev mailing list > vpp-dev@lists.fd.io > https://lists.fd.io/mailman/listinfo/vpp-dev > > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] thread handling tx
Hi, How can I see the thread that handles the tx of each interface? I can use the "show int rx" to see which thread is responsible for rx, but I want to also see the tx. Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] use a single interface for SNAT
Never mind. Solved. On Tue, Jul 18, 2017 at 3:51 PM, Yuliang Li wrote: > Hi, > > I want to setup SNAT on a server with just one network interface. How > shall I setup the interface address so that both inside-outside and > outside-inside traffic can be forwarded to this server? I failed to assign > two IP addresses to the interface. > > Thanks, > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] use a single interface for SNAT
Hi, I want to setup SNAT on a server with just one network interface. How shall I setup the interface address so that both inside-outside and outside-inside traffic can be forwarded to this server? I failed to assign two IP addresses to the interface. Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] Merge multiple frames?
Hi, The packets in a frame (a batch of packets) can be split (if they goes to different next node). Are there places where packets from different frames are merged into one frame? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] Will adding fields to existing structures affect performance?
Hi, The code seems to be highly tuned for cache performance. If I want to add some more fields in the existing structures, are there any performance concerns? For example, if I want to add some fields in the frame structure (vlib_frame_t), are there dangers of affecting performance? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] monitor function
Thanks a lot! On Tue, Jul 11, 2017 at 6:50 PM, Luke, Chris wrote: > The generated documentation has a handy link to the source. :) > > > > https://docs.fd.io/vpp/17.07/clicmd_src_vlib.html#clicmd_show_runtime > > > > Chris. > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Tuesday, July 11, 2017 21:32 > *To:* Ni, Hongjun > *Cc:* vpp-dev@lists.fd.io > *Subject:* Re: [vpp-dev] monitor function > > > > Thanks Hongjun. Do you know which piece of code shall I look at if I want > to add my customized monitoring and expose them to vppctl? > > > > On Tue, Jul 11, 2017 at 6:23 PM, Ni, Hongjun wrote: > > Hi Yuliang, > > > > Please see below link for details: > > https://wiki.fd.io/view/VPP/Command-line_Interface_(CLI)_ > Guide#CLI_features > > > > -Hongjun > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Wednesday, July 12, 2017 9:19 AM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] monitor function > > > > Hi, > > > > I want to add more things to be monitored when using command "show run". > How does the command in vppctl interact with vpp? > > > > Thanks, > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > > > > > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] monitor function
Thanks Hongjun. Do you know which piece of code shall I look at if I want to add my customized monitoring and expose them to vppctl? On Tue, Jul 11, 2017 at 6:23 PM, Ni, Hongjun wrote: > Hi Yuliang, > > > > Please see below link for details: > > https://wiki.fd.io/view/VPP/Command-line_Interface_(CLI)_ > Guide#CLI_features > > > > -Hongjun > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Wednesday, July 12, 2017 9:19 AM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] monitor function > > > > Hi, > > > > I want to add more things to be monitored when using command "show run". > How does the command in vppctl interact with vpp? > > > > Thanks, > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] monitor function
Hi, I want to add more things to be monitored when using command "show run". How does the command in vppctl interact with vpp? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] set mapping from node to thread
Thanks Ole. Could you please be more specific on the "state space"? According to my understanding, the SNAT will remember the port mapping when a new connection from inside to outside starts. Is this the state that you mean? If so, does that mean the states are split by the RSS? On Sat, Jul 8, 2017 at 12:49 AM, Ole Troan wrote: > Yulilang, > > > Thanks for the detailed response. > > > > However, from the experiment I did, I see the same packet being > processed by two threads. That is why I asked this question. Maybe I made > some mistakes, here is what I did: > > > > - In vlib_main_or_worker_loop function, I print out all pending frames > here, as well as the thread_index of them, and the node name. > > - I start the vpp with 4 worker threads, and set up SNAT according to > the progressive tutorial. > > - I run iperf that go through the SNAT. > > > > The printed information shows that, each TCP packet from the inside to > the outside of the SNAT will go through the ethernet-input and snat-in2out. > But the thread_index at the ethernet-input is 2, while the thread_index at > snat-in2out is 1. > > > > Is the above expected? > > Yes. To avoid locking the SNAT plugin splits the "state space" across the > set of workers and does hand off between workers to ensure to match of the > right packet with the worker owning the state for that session. > > Best regards, > Ole > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] set mapping from node to thread
I am using af_packet... I will try dpdk. On Fri, Jul 7, 2017 at 6:11 PM, Florin Coras wrote: > Hi Yuliang, > > Are you running with dpdk or with tap/af_packet interfaces? As far as I > remember multithreading for the last two might not work properly. > > Florin > > On Jul 7, 2017, at 5:55 PM, Yuliang Li wrote: > > I printed 3 thread_index, and all 3 shows the same value: > > 1. vlib_frame_t's thread_index: > For each pending frame p: > > vlib_pending_frame_t *p = nm->pending_frames + i; > > I get the vlib_frame_t f: > > vlib_frame_t *f = vlib_get_frame (vm, p->frame_index); > > and I print f->thread_index > > 2. vlib_node_runtime_t's thread_indes: > For each pending frame p, I get its node runtime nr: > > vlib_node_runtime_t *nr = vec_elt_at_index > (nm->nodes_by_type[VLIB_NODE_TYPE_INTERNAL], > p->node_runtime_index); > > and I print nr->thread_index > > 3. vlib_main_t's thread_index: > I print vm->thread_index > > > On Fri, Jul 7, 2017 at 5:37 PM, Dave Barach (dbarach) > wrote: > >> What exactly were you printing? Vlib_pending_frame_t’s don’t have a >> thread_index field...: >> >> >> >> >> >> /* A frame pending dispatch by main loop. */ >> >> typedef struct >> >> { >> >> /* Node and runtime for this frame. */ >> >> u32 node_runtime_index; >> >> >> >> /* Frame index (in the heap). */ >> >> u32 frame_index; >> >> >> >> /* Start of next frames for this node. */ >> >> u32 next_frame_index; >> >> >> >> /* Special value for next_frame_index when there is no next frame. */ >> >> #define VLIB_PENDING_FRAME_NO_NEXT_FRAME ((u32) ~0) >> >> } vlib_pending_frame_t; >> >> >> >> Thanks… Dave >> >> >> >> *From:* Yuliang Li [mailto:yuliang...@yale.edu] >> *Sent:* Friday, July 7, 2017 8:04 PM >> *To:* Dave Barach (dbarach) >> *Cc:* vpp-dev@lists.fd.io >> *Subject:* Re: [vpp-dev] set mapping from node to thread >> >> >> >> Hi Dave, >> >> >> >> Thanks for the detailed response. >> >> >> >> However, from the experiment I did, I see the same packet being processed >> by two threads. That is why I asked this question. Maybe I made some >> mistakes, here is what I did: >> >> >> >> - In *vlib_main_or_worker_loop* function, I print out all pending frames >> here, as well as the thread_index of them, and the node name. >> >> - I start the vpp with 4 worker threads, and set up SNAT according to the >> progressive tutorial >> <https://wiki.fd.io/view/VPP/Progressive_VPP_Tutorial>. >> >> - I run iperf that go through the SNAT. >> >> >> >> The printed information shows that, each TCP packet from the inside to >> the outside of the SNAT will go through the ethernet-input and snat-in2out. >> But the thread_index at the ethernet-input is 2, while the thread_index at >> snat-in2out is 1. >> >> >> >> Is the above expected? >> >> >> >> Thanks, >> >> >> >> On Fri, Jul 7, 2017 at 12:22 PM, Dave Barach (dbarach) >> wrote: >> >> Dear Yuliang, >> >> >> >> From a high level: vpp creates N identical graph replicas in a multi-core >> configuration. When practicable, we use hardware RSS hashing to ensure that >> all packets belonging to a specific flow are processed [in order!] by the >> same thread / graph replica. In effect, embarrassing parallelism. >> >> >> >> It’s easy enough to hand off packets between threads - see the >> “handoff-node” - but we avoid that whenever possible. >> >> >> >> Although one could - and I have - divided graph nodes across threads to >> create pipelines, that scheme needs significant dynamic tuning to handle a >> traffic pattern change. It’s hard to map nodes onto cores so that each >> thread in a pipeline uses approximately the same number of clocks/pkt; >> critical, since pipelines run at the speed of the slowest stage. >> >> >> >> It’s possible to hand off a full frame of packets for less than two >> clocks/pkt. Unfortunately, that’s the least significant issue. Handing off >> a packet from one core/thread to another guarantees a bunch of memory/cache >> subsystem pressure as the system moves packet data and metadata from A to >> B. >> >> >> >> HTH... Dave >> >> >> >>
Re: [vpp-dev] set mapping from node to thread
I printed 3 thread_index, and all 3 shows the same value: 1. vlib_frame_t's thread_index: For each pending frame p: vlib_pending_frame_t *p = nm->pending_frames + i; I get the vlib_frame_t f: vlib_frame_t *f = vlib_get_frame (vm, p->frame_index); and I print f->thread_index 2. vlib_node_runtime_t's thread_indes: For each pending frame p, I get its node runtime nr: vlib_node_runtime_t *nr = vec_elt_at_index (nm->nodes_by_type[VLIB_NODE_TYPE_INTERNAL], p->node_runtime_index); and I print nr->thread_index 3. vlib_main_t's thread_index: I print vm->thread_index On Fri, Jul 7, 2017 at 5:37 PM, Dave Barach (dbarach) wrote: > What exactly were you printing? Vlib_pending_frame_t’s don’t have a > thread_index field...: > > > > > > /* A frame pending dispatch by main loop. */ > > typedef struct > > { > > /* Node and runtime for this frame. */ > > u32 node_runtime_index; > > > > /* Frame index (in the heap). */ > > u32 frame_index; > > > > /* Start of next frames for this node. */ > > u32 next_frame_index; > > > > /* Special value for next_frame_index when there is no next frame. */ > > #define VLIB_PENDING_FRAME_NO_NEXT_FRAME ((u32) ~0) > > } vlib_pending_frame_t; > > > > Thanks… Dave > > > > *From:* Yuliang Li [mailto:yuliang...@yale.edu] > *Sent:* Friday, July 7, 2017 8:04 PM > *To:* Dave Barach (dbarach) > *Cc:* vpp-dev@lists.fd.io > *Subject:* Re: [vpp-dev] set mapping from node to thread > > > > Hi Dave, > > > > Thanks for the detailed response. > > > > However, from the experiment I did, I see the same packet being processed > by two threads. That is why I asked this question. Maybe I made some > mistakes, here is what I did: > > > > - In *vlib_main_or_worker_loop* function, I print out all pending frames > here, as well as the thread_index of them, and the node name. > > - I start the vpp with 4 worker threads, and set up SNAT according to the > progressive > tutorial <https://wiki.fd.io/view/VPP/Progressive_VPP_Tutorial>. > > - I run iperf that go through the SNAT. > > > > The printed information shows that, each TCP packet from the inside to the > outside of the SNAT will go through the ethernet-input and snat-in2out. But > the thread_index at the ethernet-input is 2, while the thread_index at > snat-in2out is 1. > > > > Is the above expected? > > > > Thanks, > > > > On Fri, Jul 7, 2017 at 12:22 PM, Dave Barach (dbarach) > wrote: > > Dear Yuliang, > > > > From a high level: vpp creates N identical graph replicas in a multi-core > configuration. When practicable, we use hardware RSS hashing to ensure that > all packets belonging to a specific flow are processed [in order!] by the > same thread / graph replica. In effect, embarrassing parallelism. > > > > It’s easy enough to hand off packets between threads - see the > “handoff-node” - but we avoid that whenever possible. > > > > Although one could - and I have - divided graph nodes across threads to > create pipelines, that scheme needs significant dynamic tuning to handle a > traffic pattern change. It’s hard to map nodes onto cores so that each > thread in a pipeline uses approximately the same number of clocks/pkt; > critical, since pipelines run at the speed of the slowest stage. > > > > It’s possible to hand off a full frame of packets for less than two > clocks/pkt. Unfortunately, that’s the least significant issue. Handing off > a packet from one core/thread to another guarantees a bunch of memory/cache > subsystem pressure as the system moves packet data and metadata from A to > B. > > > > HTH... Dave > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Friday, July 7, 2017 1:14 PM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] set mapping from node to thread > > > > Hi, > > > > Is there a way to set which node should run on which thread? And is there > a command that shows the mapping from nodes to threads? > > > > Thanks, > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > > > > > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] ACL commands
Hi, Does anyone knows how to configure ACL in vpp? Is there any document? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] set mapping from node to thread
Hi Dave, Thanks for the detailed response. However, from the experiment I did, I see the same packet being processed by two threads. That is why I asked this question. Maybe I made some mistakes, here is what I did: - In *vlib_main_or_worker_loop* function, I print out all pending frames here, as well as the thread_index of them, and the node name. - I start the vpp with 4 worker threads, and set up SNAT according to the progressive tutorial <https://wiki.fd.io/view/VPP/Progressive_VPP_Tutorial>. - I run iperf that go through the SNAT. The printed information shows that, each TCP packet from the inside to the outside of the SNAT will go through the ethernet-input and snat-in2out. But the thread_index at the ethernet-input is 2, while the thread_index at snat-in2out is 1. Is the above expected? Thanks, On Fri, Jul 7, 2017 at 12:22 PM, Dave Barach (dbarach) wrote: > Dear Yuliang, > > > > From a high level: vpp creates N identical graph replicas in a multi-core > configuration. When practicable, we use hardware RSS hashing to ensure that > all packets belonging to a specific flow are processed [in order!] by the > same thread / graph replica. In effect, embarrassing parallelism. > > > > It’s easy enough to hand off packets between threads - see the > “handoff-node” - but we avoid that whenever possible. > > > > Although one could - and I have - divided graph nodes across threads to > create pipelines, that scheme needs significant dynamic tuning to handle a > traffic pattern change. It’s hard to map nodes onto cores so that each > thread in a pipeline uses approximately the same number of clocks/pkt; > critical, since pipelines run at the speed of the slowest stage. > > > > It’s possible to hand off a full frame of packets for less than two > clocks/pkt. Unfortunately, that’s the least significant issue. Handing off > a packet from one core/thread to another guarantees a bunch of memory/cache > subsystem pressure as the system moves packet data and metadata from A to > B. > > > > HTH... Dave > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Yuliang Li > *Sent:* Friday, July 7, 2017 1:14 PM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] set mapping from node to thread > > > > Hi, > > > > Is there a way to set which node should run on which thread? And is there > a command that shows the mapping from nodes to threads? > > > > Thanks, > > -- > > Yuliang Li > > PhD student > > Department of Computer Science > > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] set mapping from node to thread
Hi, Is there a way to set which node should run on which thread? And is there a command that shows the mapping from nodes to threads? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] monitor queue
Or, which part of the source code is about the queue? I would like to add some code if there is no existing function that can monitor the queue. On Sun, Jul 2, 2017 at 5:46 PM, Yuliang Li wrote: > Hi, > > I am new to VPP. I want to monitor the queue (length, or packets in it) > between different VPPs. Is there any way to monitor the queue regularly, > say every 1 sec or 10 ms? > > Thanks, > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
[vpp-dev] monitor queue
Hi, I am new to VPP. I want to monitor the queue (length, or packets in it) between different VPPs. Is there any way to monitor the queue regularly, say every 1 sec or 10 ms? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev