[vpp-dev] vpp io threads

2018-01-31 Thread Shiv Dev
 Hi Team,

  I am trying to see how to distribute traffic between multiple
worker threads
in the absence of RSS. I believe there are I/O threads for handling input
and and dispatching to worker threads.

src/vlib/threads.c: "  /* Initial barrier sync, for both worker and
i/o
threads */

Is there any documentation for I/O threads and binding them to interfaces ?

Regards,
Shiv
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Docker containers

2018-01-07 Thread Shiv Dev
Hi,

 I was able to get the ports working using the below docker command,
testpmd commands..

 - docker run -it -v /tmp/sock1.sock:/var/run/usvhost1 -v
/tmp/sock2.sock:/var/run/usvhost2 -v /dev/hugepages/:/dev/hugepages
dpdk_app_l2fwd
 - ./bin/testpmd -l 16-17  -n 4 --log-level=8 --socket-mem=1024,1024
--no-pci --vdev=virtio_user0,path=/var/run/usvhost1,mac=00:00:00:01:01:01
--vdev=virtio_user1,path=/var/run/usvhost2,mac=00:00:00:01:01:02 --  -i
--txqflags=0xf00 --disable-hw-vlan


EAL: Master lcore 16 is ready (tid=2c6fd8c0;cpuset=[16])
EAL: lcore 17 is ready (tid=2add9700;cpuset=[17])
EAL: Search driver virtio_user0 to probe device virtio_user0
EAL: Search driver virtio_user1 to probe device virtio_user1
Interactive-mode selected
Warning: NUMA should be configured manually by using --port-numa-config and
--ring-numa-config parameters along with --numa.
USER1: create a new mbuf pool : n=155456, size=2176,
socket=0
USER1: create a new mbuf pool : n=155456, size=2176,
socket=1
Configuring Port 0 (socket 0)
Port 0: 00:00:00:01:01:01
Configuring Port 1 (socket 0)
Port 1: 00:00:00:01:01:02
Checking link statuses...
Done
testpmd> help



Regards,
Shiv


On Tue, Jan 2, 2018 at 10:34 PM, Shiv Dev <shivfs...@gmail.com> wrote:

> I find that changing the vdev  in the l2fwd command line to virtio_user
> helps..
>
> shiv@shiv-lenovo-v310:~/work/docker$ docker run -it -v
> /tmp/sock1.sock:/tmp/sock1.sock -v /mnt/huge_vhost/:/mnt/huge_vhost
> dpdk_app_l2fwd  l2fwd -c 0x4 -n 4 -m 1024 --no-pci --vdev=*virtio_user0*
> ,path=/tmp/sock1.sock -- -p 0x1.
>
> However, now the error is
>
> EAL: Fail to configure port 0..
> Start ports failed..
>
> Regards,
> Shiv
>
> On Fri, Dec 29, 2017 at 10:49 AM, Akshaya Nadahalli <aksh...@rtbrick.com>
> wrote:
>
>> Hi Shiv,
>>
>> Not sure about vhost interfaces, but should be doable with tap/veth
>> pairs.  Refer to below links:
>>
>> https://wiki.fd.io/view/VPP/Configure_VPP_TAP_Interfaces_For
>> _Container_Routing
>> https://wiki.fd.io/view/VPP/Configure_VPP_As_A_Router_Between_Namespaces
>>
>> I had used veth pairs to communicate with each other via VPP instances
>> running under different lxc containers. Procedure I followed was as below
>> and i think same should work for docker as well:
>>
>> 1. Create Veth pair with command:
>> sudo ip link add name  type veth peer name
>> 
>>
>> 2. Findout the network namespace of conatiners and move the veth
>> interfaces to corresponding namespaces:
>>
>> sudo lxc-info --name  | grep "PID:" | awk '{print
>> $2}' ---> for lxc containers
>>
>> docker inspect -f '{{.State.Pid}}'> for docker
>>
>> sudo ip link set netns  dev > container>
>>
>> 3. Login to VPP within the container and take over the host interface
>> with the command:
>> create host-interface name 
>>
>> --
>> HTH,
>> Akshaya N
>>
>>
>> -Original Message-
>> *From*: Shiv Dev <shivfs...@gmail.com
>> <shiv%20dev%20%3cshivfs...@gmail.com%3e>>
>> *To*: vpp-dev@lists.fd.io
>> *Subject*: [vpp-dev] Docker containers
>> *Date*: Thu, 28 Dec 2017 21:51:15 +0530
>>
>>
>>
>> Hi VPP Team,
>>
>>I am trying to interface docker containers to VPP through an
>> vhost-user device.
>>
>>   The page here (https://wiki.fd.io/view/VPP/U
>> se_VPP_to_connect_VMs_Using_Vhost-User_Interface) explains how to do it
>> for VMs.  Is there any page that explains it for docker containers ?
>>
>>   As explained in the above page, I have setup the vhost-user interfaces
>> in VPP. I am getting a problem when I try to pass the vhost information to
>> the docker container.
>>
>> vpp# show vhost-user Virtio vhost-user interfaces .. Interface:
>> VirtualEthernet0/0/0 (ifindex 1) virtio_net_hdr_sz 0 ... Interface:
>> VirtualEthernet0/0/1 (ifindex 2) virtio_net_hdr_sz 0 ..
>>
>> shiv@shiv-lenovo-v310:~/work/docker$ docker run -it -v
>> /tmp/sock1.sock:/tmp/sock1.sock -v /mnt/huge_vhost/:/mnt/huge_vhost
>> dpdk_app_l2fwd  l2fwd -c 0x4 -n 4 -m 1024 --no-pci
>> --vdev=virtio-user0,path=/tmp/sock1.sock -- -p 0x1 EAL: Detected 4
>> lcore(s) EAL: No free hugepages reported in hugepages-1048576kB EAL: Cannot
>> obtain physical addresses: Success. Only vfio will function. EAL: Failed to
>> get current mempolicy: Operation not permitted. Assuming MPOL_DEFAULT.
>> ERROR: failed to parse device "virtio-user0" EAL: Unable to parse device
>> 'virtio-user0,path=/tmp/sock1.sock' EAL: Error - exiting with code: 1
>> Cause: Invalid EAL arguments
>>
>> Basically, how do we pass virtio-user devices to container app ? Is there
>> any way to check if the virtio-user devices are available in the kernel ?
>>
>> Regards, Shiv
>>
>>
>>
>> ___
>> vpp-dev mailing 
>> listvpp-...@lists.fd.iohttps://lists.fd.io/mailman/listinfo/vpp-dev
>>
>>
>> --
>> Regards,
>> Akshaya N
>>
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Unable to add NIC to VPP

2018-01-03 Thread Shiv Dev
Hi Dave,

Thanks for the response.

There is no support for the realtek driver in dpdk (http://dpdk.org/doc/nics).
When I moved to a server with an X540 interface, I see the interface comes
up in vpp..

  vpp# show interface
  Name   Idx   State  Counter
Count
TenGigabitEthernet81/0/0  1 up   rx packets


Regards,
Shiv

On Wed, Jan 3, 2018 at 12:19 AM, Dave Wallace <dwallac...@gmail.com> wrote:

> Shiv,
>
> You need to verify that there is a DPDK driver for the device you are
> trying to use.
>
> If there is a DPDK driver, then you will need to add a case for it in the
> vpp dpdk driver initialization function in .../vpp/src/plugins/dpdk/
> device/init.c
>
> Finally you will need to test VPP with the driver to make sure that it
> works.
> Not all DPDK drivers are created equal ;)
>
> Hope this helps,
> -daw-
>
> On 1/2/2018 12:34 PM, Shiv Dev wrote:
>
>
> Hi VPP Team,
>
>  I am trying to add a NIC to using the instructions in
> https://wiki.fd.io/view/VPP/How_To_Connect_A_PCI_Interface_To_VPP.
>
> I do not see the interface being created in vpp and see the following
> errors in the /var/log/syslog..
>
> Jan  2 22:50:48 shiv-lenovo-v310 vpp[3453]: /usr/bin/vpp[3453]:
> dpdk_bind_devices_to_uio:758: Unsupported PCI device 0x10ec:0x8168 found at
> PCI address :02:00.0
> ..
>
> From the code in src/plugins/dpdk/device/init.c: dpdk_bind_devices_to_uio(),
> I see that the above device (realtek device vendor id = 0x10ec) is not
> supported. Does an additional "else if" need to be added to support realtek
> devices  or am I missing something obvious here ?
>
> Regards,
> Shiv
>
> ---
>
> shiv@shiv-lenovo-v310:~$ lsmod | grep igb_uio
> igb_uio16384  0
> uio20480  2 uio_pci_generic,igb_uio
>
> From /etc/vpp/startup.conf..
>
> ## Whitelist specific interface by specifying PCI address
> dev :02:00.0
>
> vpp# show pci
> Address  Sock VID:PID Link Speed   Driver  Product Name
> Vital Product Data
> :02:00.0  10ec:8168   2.5 GT/s x1  igb_uio
>
>
> vpp# show interface
>   Name   Idx   State  Counter
> Count
> local00down
>
>
>
>
> ___
> vpp-dev mailing 
> listvpp-...@lists.fd.iohttps://lists.fd.io/mailman/listinfo/vpp-dev
>
>
>
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Unable to add NIC to VPP

2018-01-02 Thread Shiv Dev
Hi VPP Team,

 I am trying to add a NIC to using the instructions in
https://wiki.fd.io/view/VPP/How_To_Connect_A_PCI_Interface_To_VPP.

I do not see the interface being created in vpp and see the following
errors in the /var/log/syslog..

Jan  2 22:50:48 shiv-lenovo-v310 vpp[3453]: /usr/bin/vpp[3453]:
dpdk_bind_devices_to_uio:758: Unsupported PCI device 0x10ec:0x8168 found at
PCI address :02:00.0
..

>From the code
in src/plugins/dpdk/device/init.c: dpdk_bind_devices_to_uio(), I see that
the above device (realtek device vendor id = 0x10ec) is not supported. Does
an additional "else if" need to be added to support realtek devices  or am
I missing something obvious here ?

Regards,
Shiv

---

shiv@shiv-lenovo-v310:~$ lsmod | grep igb_uio
igb_uio16384  0
uio20480  2 uio_pci_generic,igb_uio

>From /etc/vpp/startup.conf..

## Whitelist specific interface by specifying PCI address
dev :02:00.0

vpp# show pci
Address  Sock VID:PID Link Speed   Driver  Product Name
Vital Product Data
:02:00.0  10ec:8168   2.5 GT/s x1  igb_uio


vpp# show interface
  Name   Idx   State  Counter
Count
local00down
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Docker containers

2017-12-28 Thread Shiv Dev
Hi VPP Team,

 I am trying to interface docker containers to VPP through an vhost-user
device.

  The page here (
https://wiki.fd.io/view/VPP/Use_VPP_to_connect_VMs_Using_Vhost-User_Interface)
explains how to do it for VMs.  Is there any page that explains it for
docker containers ?

  As explained in the above page, I have setup the vhost-user interfaces in
VPP. I am getting a problem when I try to pass the vhost information to the
docker container.

vpp# show vhost-user
Virtio vhost-user interfaces
..
Interface: VirtualEthernet0/0/0 (ifindex 1)
virtio_net_hdr_sz 0
...
Interface: VirtualEthernet0/0/1 (ifindex 2)
virtio_net_hdr_sz 0
..

shiv@shiv-lenovo-v310:~/work/docker$ docker run -it -v
/tmp/sock1.sock:/tmp/sock1.sock -v /mnt/huge_vhost/:/mnt/huge_vhost
dpdk_app_l2fwd  l2fwd -c 0x4 -n 4 -m 1024 --no-pci
--vdev=virtio-user0,path=/tmp/sock1.sock -- -p 0x1
EAL: Detected 4 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Cannot obtain physical addresses: Success. Only vfio will function.
EAL: Failed to get current mempolicy: Operation not permitted. Assuming
MPOL_DEFAULT.
ERROR: failed to parse device "virtio-user0"
EAL: Unable to parse device 'virtio-user0,path=/tmp/sock1.sock'
EAL: Error - exiting with code: 1
  Cause: Invalid EAL arguments

Basically, how do we pass virtio-user devices to container app ? Is there
any way to check if the virtio-user devices are available in the kernel ?

Regards,
Shiv
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] user mode TCP stack..

2017-12-28 Thread Shiv Dev
Thanks Florin for the clarification..

Regards,
Shiv

On Thu, Dec 28, 2017 at 3:29 AM, Florin Coras <fcoras.li...@gmail.com>
wrote:

> Shiv,
>
> To clarify, the stack has no name per se. We just refer to the transport
> and session layers part of vnet as “vpp’s host stack”. On top of the the
> session layer we run VCL, a wrapper library that offers more posix-like
> APIs for app's consumption as opposed to the raw, vpp specific, APIs the
> session layer offers. As transport protocols, we now support TCP and UDP
> and there’s ongoing work from Marco to implement SCTP.
>
> Furthermore, the TCP/UDP implementation from vnet are completely
> independent from TLDK. The two were developed in parallel but unfortunately
> I can’t speak to the differences between them since I’m only familiar with
> the code part of vnet.
>
> Regards,
> Florin
>
> On Dec 21, 2017, at 3:52 AM, Shiv Dev <shivfs...@gmail.com> wrote:
>
> Why would the TLDK be needed if the VCL is already available ? Are there
> any improvements (perf / features) in TLDK ?
>
>  Also,  which release is TLDK is targeted for ?
>
> Regards,
> Shiv
>
> On Thu, Dec 21, 2017 at 1:04 PM, Pierre Pfister (ppfister) <
> ppfis...@cisco.com> wrote:
>
>> Hello,
>>
>> VPP's user-space TCP stack is called VCL (VPP Communication Library).
>> https://wiki.fd.io/view/VPP/VPPCommunicationsLibrary
>>
>> - Pierre
>>
>>
>> Le 21 déc. 2017 à 07:19, satish karunanithi <satish.f...@gmail.com> a
>> écrit :
>>
>> Hi,
>>
>> I see there is a tcp module under vnet which does all the tcp stuffs
>> syn/syn ack/windowing etc..
>> May i know why you feel this cannot be used as user mode TCP stack? Am i
>> missing something here?
>>
>> Thanks & Regards,
>> Satish.
>>
>>
>> On Thu, Dec 21, 2017 at 10:32 AM, Jim Thompson <j...@netgate.com> wrote:
>>
>>>
>>>
>>> On Dec 20, 2017, at 10:21 PM, Shiv Dev <shivfs...@gmail.com> wrote:
>>>
>>> Hi VPP Team,
>>>
>>>   Is there a user mode TCP stack available as part of VPP ?
>>>
>>>
>>> https://gerrit.fd.io/r/gitweb?p=tldk.git;a=summary
>>>
>>> “The TLDK (Transport Layer Development Kit) project will implement a set
>>> of libraries for L4 protocol processing (UDP, TCP etc.) and VPP graph
>>> nodes, plugins, etc using those libraries to implement a host stack.”
>>>
>>>I did see somewhere that there is no user mode stack available as
>>> part of VPP, and some folks use mTCP..
>>>
>>>
>>> No idea.  See above.  There was also some work to bolt in libuinet via
>>> netmap.
>>>
>>> Jim
>>>
>>> ___
>>> vpp-dev mailing list
>>> vpp-dev@lists.fd.io
>>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>>
>>
>> ___
>> vpp-dev mailing list
>> vpp-dev@lists.fd.io
>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>
>>
>>
>> ___
>> vpp-dev mailing list
>> vpp-dev@lists.fd.io
>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>
>
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
>
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev