Locked [QUESTION] How to add virtual interfaces on ARM board


Dorian Lau
 

Hi,

I'm a newbie and study vpp recently. I succeed cross compiling vpp (including my own plugin) , and it can be started up on my arm64 board (aarch64 ubuntu 18.04).  But there is only one physical NIC (eth1)  which I can use on the board, and I don't need dpdk, so there is only local0 when I run "show int" cmd.

My question is how to add two more ip addresses (maybe virtual interface?)  as below network tepology.



My own plugin implements ip-in-ip, something like gre or gtp tunnel, to remove ip header from port1 to port2 and add ip header from port2 to port1.

Note that this vpp program and the whole function can run successfully on PC vmware ubuntu virtual machine with dpdk, since I can create more ensXXX in the virtual machine, and I use igb_uio dpdk driver to operate the interface. But I really don't know how to implement the same function on the board in case there is only one NIC. Both with or without dpdk is ok for me, as it seems that igb_uio.ko is not supported on the board NIC, only rte_kni.ko is supported, and I'm not sure if kni is still suppored in vpp dpdk plugin.

Any helps will be appreciated. Thanks!
Dorian


Xiaodong Xu
 

Maybe you can try host interface in this case, since you are going to share the control traffic and the user traffic on the only NIC. Check https://s3-docs.fd.io/vpp/23.06/gettingstarted/progressivevpp/interface.html#create-vpp-host-interface for more details.

Regards,
Xiaodong


On Wed, Mar 22, 2023 at 6:50 PM <dorian_lau@...> wrote:
Hi,

I'm a newbie and study vpp recently. I succeed cross compiling vpp (including my own plugin) , and it can be started up on my arm64 board (aarch64 ubuntu 18.04).  But there is only one physical NIC (eth1)  which I can use on the board, and I don't need dpdk, so there is only local0 when I run "show int" cmd.

My question is how to add two more ip addresses (maybe virtual interface?)  as below network tepology.



My own plugin implements ip-in-ip, something like gre or gtp tunnel, to remove ip header from port1 to port2 and add ip header from port2 to port1.

Note that this vpp program and the whole function can run successfully on PC vmware ubuntu virtual machine with dpdk, since I can create more ensXXX in the virtual machine, and I use igb_uio dpdk driver to operate the interface. But I really don't know how to implement the same function on the board in case there is only one NIC. Both with or without dpdk is ok for me, as it seems that igb_uio.ko is not supported on the board NIC, only rte_kni.ko is supported, and I'm not sure if kni is still suppored in vpp dpdk plugin.

Any helps will be appreciated. Thanks!
Dorian



Dorian Lau
 

Hi Xiaodong,

Thanks for your reply.

I'm studying your link and also searching some other topics & messages. Your link about host interface is AF_PACKET, right? I searched other posts mentioned tap has better performance than host interface. Can I use tap for my requirement?


Dorian


Lijian Zhang
 

You can run multiple VPP instances [1] and connect them using memif interface, which is shared memory-based software interface.

VPP also has packet generator, to emulate the PC1, PC2 in your topology.

 

In this way, you can achieve the topology based on pure software implementation.

 

[1]

https://s3-docs.fd.io/vpp/23.06/gettingstarted/progressivevpp/twovppinstances.html

 

Thanks.

From: vpp-dev@... <vpp-dev@...> On Behalf Of Xiaodong Xu via lists.fd.io
Sent: Thursday, March 23, 2023 12:51 PM
To: vpp-dev@...
Subject: Re: [vpp-dev] [QUESTION] How to add virtual interfaces on ARM board

 

Maybe you can try host interface in this case, since you are going to share the control traffic and the user traffic on the only NIC. Check https://s3-docs.fd.io/vpp/23.06/gettingstarted/progressivevpp/interface.html#create-vpp-host-interface for more details.

 

Regards,

Xiaodong

 

On Wed, Mar 22, 2023 at 6:50 PM <dorian_lau@...> wrote:

Hi,

I'm a newbie and study vpp recently. I succeed cross compiling vpp (including my own plugin) , and it can be started up on my arm64 board (aarch64 ubuntu 18.04).  But there is only one physical NIC (eth1)  which I can use on the board, and I don't need dpdk, so there is only local0 when I run "show int" cmd.

My question is how to add two more ip addresses (maybe virtual interface?)  as below network tepology.



My own plugin implements ip-in-ip, something like gre or gtp tunnel, to remove ip header from port1 to port2 and add ip header from port2 to port1.

Note that this vpp program and the whole function can run successfully on PC vmware ubuntu virtual machine with dpdk, since I can create more ensXXX in the virtual machine, and I use igb_uio dpdk driver to operate the interface. But I really don't know how to implement the same function on the board in case there is only one NIC. Both with or without dpdk is ok for me, as it seems that igb_uio.ko is not supported on the board NIC, only rte_kni.ko is supported, and I'm not sure if kni is still suppored in vpp dpdk plugin.

Any helps will be appreciated. Thanks!
Dorian


Dorian Lau
 

Hi,

I create tap interface on vpp like this:

create tap id 0 host-ip4-addr 10.10.1.1/24
set int state tap0 up
set int ip addr tap0 10.10.1.2/24

And I can ping from host (arm board) to vpp.

Can someone tell me how to ping vpp tap0 (10.10.1.2) from another linux machine (e.g. 10.10.1.5)?


Thanks,
Dorian