Re: [vpp-dev] qwery regarding lcp

2022-11-10 Thread Pim van Pelt via lists.fd.io
Hoi,

Your description isn't very clear to me, unfortunately. But I think what
you're trying to do is connect an existing vlan100 interface outside of
VPP, into an LCP pair you created in VPP. If so, perhaps a bridge-domain
can help:

In Linux:
brctl addbr br0
brctl addif br0 Vlan100

In VPP:
create bridge-domain 1001
create tap id 1001 host-if-name vpp-bd1001 host-bridge br0 host-mtu-size
9100
set interface l2 bridge tap1001 1001
set interface state tap1001 up

bvi create instance 1001
set interface l2 bridge bvi1001 1001 bvi
set interface ip address bvi1001 192.0.2.1/24
set interface ip address bvi1001 2001:db8::1/64
set interface mtu packet 9100 bvi1001
set interface state bvi1001 up
lcp create bvi1001 host-if bvi1001 netns dataplane

This will end up tying together your 'Vlan100' interface in a bridge called
br0 together with a VPP tap called vpp-bd1001. This way, the bridge-domain
bd1001 and the linux bridge br0 have full L2 connectivity amongst
themselves. Then, you expose a BVI in the VPP bd1001 and expose that to
Linux as an LCP, which means hosts in "Vlan100" will be able to see each
other, and the BVI.

  - (in default namespace)
  - ip link set br0 up mtu 9000
  - ip link set vpp-bd1 up mtu 9000


On Thu, Nov 10, 2022 at 11:42 AM Pragya Nand Bhagat <
pragya.nand.bhaga...@gmail.com> wrote:

> Hi All,
>
> Is there a provision to create lcp pair between already existing
> interface(vlan) in host and an loopback interface .
>
> Example:
>
> interface on host
> root@mavenir-Default-string:/# ip link show Vlan100
> 26981: Vlan100@Bridge:  mtu 9100 qdisc
> noqueue state UP mode DEFAULT grou0
> link/ether a4:bf:01:89:9d:cb brd ff:ff:ff:ff:ff:ff
>
> interface on vpp is a loopback interface created by foll command:
> create loopback interface instance 100
>  which creates loop100
>
> Thanks
> Pragya Nand
>
>
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22159): https://lists.fd.io/g/vpp-dev/message/22159
Mute This Topic: https://lists.fd.io/mt/94933342/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] VPP at ~150Mpps on a Dell R720

2022-11-17 Thread Pim van Pelt via lists.fd.io
Hoi folks,

>From time to time I'm invited to share how the VPP development community is
progressing. This week I joined the DENOG folks in Hamburg, Germany, to
show how a combination of VPP, Linux Control Plane, and higher level
automation like vppcfg come together to provide a reasonably complete ISP
peering router. I was challenged a while ago to demonstrate the 100Mpps
barrier, which most of us may have already passed with fancy new hardware
that exposes PCIe v4.0, but for this talk I took a 10 year old Dell R720
and submitted it to a T-Rex loadtest, It yielded some pretty good results.

DENOG talk entry: https://pretalx.com/denog14/talk/X9GJHM/
Video Recording: https://ipng.ch/media/denog14/index.html
Slides:
https://ipng.ch/media/denog14/IPng%20Networks%20-%20VPP%20-%20DENOG14.pdf

groet,
Pim
-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22193): https://lists.fd.io/g/vpp-dev/message/22193
Mute This Topic: https://lists.fd.io/mt/95086995/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] VPP memif raw data udp packet streaming between VPPs

2022-11-18 Thread Pim van Pelt via lists.fd.io
Hoi Mustafa,

I don't know much about memif, but seeing as it creates an L2 device, one
avenue is adding the memif into a bridge-domain together with a transport
tunnel, for example VXLAN:

vpp# create interface memif id 0 master
vpp# create bridge-domain 10
vpp# create vxlan tunnel src 192.168.11.3 dst 192.168.11.0 vni 10
vpp# set interface l2 bridge memif0/0 10
vpp# set interface l2 bridge vxlan_tunnel0 10
vpp# set interface state vxlan_tunnel0 up
vpp# set interface state memif0/0 up

vpp# show bridge-domain 10 detail
  BD-ID   Index   BSN  Age(min)  Learning  U-Forwrd   UU-Flood   Flooding
 ARP-Term  arp-ufwd Learn-co Learn-li   BVI-Intf
   10   1  0 offonon   floodon
  off   off016777216 N/A
span-l2-input l2-input-classify l2-input-feat-arc l2-policer-classify
l2-input-acl vpath-input-l2 l2-ip-qos-record l2-input-vtr l2-learn l2-rw
l2-fwd
l2-flood l2-flood l2-output

   Interface   If-idx ISN  SHG  BVI  TxFlood
 VLAN-Tag-Rewrite
   memif0/0  1210-  *
none
 vxlan_tunnel0   1110-  *
none

If you'd do this on both sides (ie a reciprocal tunnel on 192.168.11.0
pointed at 11.3 with the same VNI id 10), I think you would get
bidirectional forwarding of the memif0/0 payload between both VPP instances.

groet,
Pim

On Fri, Nov 18, 2022 at 9:38 AM Mustafa BAKIRCIOGLU <
mustafa.bakircio...@ulakhaberlesme.com.tr> wrote:

> Hello,
>
> I have two applications and I would like to communicate these over udp in
> seperate machines. So, for this purpose I'am using VPP. My question is, is
> there any way to make vpp to encapsulate the application raw data (which
> these raw datas come over memif interfaces) in udp packets to transfer over
> machine to another machine. I am newbee in VPP I could not see any example
> to perform this logic like how I can encapsulate memif raw datas in to udp
> packets.
> I also added the desing what I am trying to do to make the whole picture
> clear.
>
>
> It would be very helpful if you can show or describe which steps I should
> do to do this logic.
>
> Best Regards,
>
> Mustafa Bakircioglu.
>
> Bu elektronik posta ve onunla iletilen bütün dosyalar sadece göndericisi
> tarafından alması amaçlanan yetkili, gerçek ya da tüzel kişinin kullanımı
> içindir. Eğer söz konusu yetkili alıcı değilseniz, bu elektronik postanın
> içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız
> kesinlikle yasaktır ve bu elektronik postayı derhal silmeniz gerekmektedir.
> Şirketimiz bu mesajın içerdiği bilgilerin doğruluğu veya eksiksiz olduğu
> konusunda herhangi bir garanti vermemektedir. Bu nedenle, bu bilgilerin ne
> şekilde olursa olsun içeriğinden, iletilmesinden, alınmasından ve
> saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca gönderen
> kişiye aittir ve Şirketimizin görüşlerini yansıtmayabilir. Tarafınız ile
> paylaşılan kişisel verilerin, 6698 sayılı Kişisel Verilerin Korunması
> Kanununa uygun olarak işlenmesi gereğini bilginize sunarız.
> --
>
> This e-mail and all files sent with it are intended for authorized natural
> or legal persons, who should be the only persons to open and read them. If
> you are not an authorized recipient, you are strictly prohibited from
> disclosing, copying, forwarding, and using the contents of this e-mail, and
> you must immediately delete it. Our company does not guarantee the accuracy
> or thoroughness of the information contained in this message. It is
> therefore in no way responsible for the content, sending, retrieval and
> storage of this information. The opinions contained in this message are the
> views of the sender only and do not necessarily reflect the views of the
> company. We would like to inform you that any personal data shared with you
> should be processed in accordance with the Law on Protection of Personal
> Data numbered 6698.
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22201): https://lists.fd.io/g/vpp-dev/message/22201
Mute This Topic: https://lists.fd.io/mt/95108399/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Crash on using a linux-cp GRE tunnel

2022-11-25 Thread Pim van Pelt via lists.fd.io
Hoi Konrad,

Looking at your configs, gre0 will have been created as an L3 interface. If
you'd like it to be an L2 interface, create it with 'teb' (transparent
ethernet bridge).
The crash I think we ought to be able to avoid in linux-cp, but it's I
think because you're using a TAP (L2) rather than a TUN (L3) interface. If
you'd like to keep the GRE as L3, then you can create the LCP with the
'tun' argument.
  create gre tunnelcreate gre tunnel src  dst
 [instance ] [outer-fib-id ] [teb | erspan ]
[del] [multipoint]
  lcp create   lcp create
| host-if  netns  [tun]

Let me know if that helps for your usecase.

groet,
Pim

On Fri, Nov 25, 2022 at 2:28 PM Konrad Zemek  wrote:

> Hey all,
>
> I'm running v22.10-release of vpp from fdio repositories, on Ubuntu 22.10.
> I'm experimenting with linux-cp for a control plane including GRE tunels,
> and I stumbled upon an easy to reproduce crash:
>
> unix {
>   cli-listen /run/vpp/cli-vpp1.sock
>   nodaemon
>   coredump-size unlimited
>   full-coredump
> }
> api-segment { prefix vpp1 }
> plugins {
>   plugin linux_cp_plugin.so { enable }
>   plugin linux_nl_plugin.so { enable }
> }
> dpdk {
>   socket-mem 1024
>   dev :00:10.0
> }
> linux-cp {
>   #default netns dataplane
>   lcp-sync
>   lcp-auto-subint
> }
>
> vpp# set interface ip address TenGigabitEthernet0/10/0 10.1.2.3/24
> vpp# set interface state TenGigabitEthernet0/10/0 up
> vpp# create gre tunnel src 10.1.2.3 dst 10.1.2.2 gre0
> vpp# lcp create gre0 host-if mytun
> vpp# set interface ip address gre0 10.10.10.1/30
> vpp# set interface state gre0 up
>
> Then just `ping 10.10.10.2` from the host system.
>
> Thanks,
> Konrad Zemek
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22242): https://lists.fd.io/g/vpp-dev/message/22242
Mute This Topic: https://lists.fd.io/mt/95253764/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] VPP crashes on LX2160A platform

2022-12-01 Thread Pim van Pelt via lists.fd.io
Hoi,

VPP does not run on that board, because the soc does not enumerate its DPDK
enabled interfaces on the PCIe bus, but rather has a custom bus, which VPP
is not integrated with.
Incidentally, I did get VPP itself to run but without DPDK (or AVF or etc)
interfaces; and its basic functionality (ie create loop, tunnel, tap) did
seem to work, just no accelerated interfaces.
There were also issues with the 25G and 100G ports on the serdes, it seemed
to only want to run 8x10G.

Ben also had a few insights on my previous post to vpp-dev@ list:
https://lists.fd.io/g/vpp-dev/message/21984

groet,
Pim

On Thu, Dec 1, 2022 at 12:59 PM  wrote:

> Dear VPP community,
>
>
> I'm trying to operate VPP on SolidRun LX2160 board, which is based on 16
> cores A72 NXP SoC, unfortunately, with little success. Does anybody have
> any experience with running VPP on such boards?
>
>
> The performance in my tests is quite good (more then 4mpps NDR) , but VPP
> works very unstable and segfaults in time interval from seconds to hours
> after start.
> The events causing segfaults were not identified. It may happen (and
> usually) when you walk through CLI. It may happen (less frequently) when
> just forwarding packets without a touch to vppctl. Applying config longer
> then few lines usually cause that. Second VPPCTL connection usually couses
> that,
>
> I was trying the following versions of VPP with literally same results:
>
> - VPP 21.01 from LSDK distribution, built on the board natively
> - VPP 22.10, from Master branch, crossbuilt using
> https://docs.nxp.com/bundle/GUID-87AD3497-0BD4-4492-8040-3F3BE0F2B087/page/GUID-8A75A4AD-2EB9-4A5A-A784-465B98E67951.html
> - VPP 22.08, built using flexbuild tool (from same link above).
>
> I was trying different settings of main_heap memory pool (size, pagesize),
> different hugepages settings (standard 4k, huge 2M, huge 1G), but there
> were no serious improvement. It looks like 22.08 most stable and may last
> for few hours.
>
> As performance looks promising, I'm really looking forward to make it work
> stable. Can somebody please  advice , where do I need to look at  to fix
> the problem? There are , according to CSIT, good results on other ARM v8
> platforms.
> As for OS, I'm using pre-built Ubuntu Core-based distribution from
> SolidRun.
>
> See below OS information, logs with crash. See in attachement: Platform
> dmesg and GDB trace of 22.10 crash.
> Below are system logs of VPP crashes.
>
> abramov@nc2s5:~$ cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=20.04
> DISTRIB_CODENAME=focal
> DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
> abramov@nc2s5:~$ uname -a
> Linux nc2s5 5.10.35-00018-gbb124648d42c #1 SMP PREEMPT Wed May 11 17:07:05
> UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
> abramov@nc2s5:~$
>
>
> Dec 01 10:35:42 nc2s5 vnet[2259]: received signal SIGSEGV, PC unsupported,
> faulting address 0x2d3ba50a885
> Dec 01 10:35:42 nc2s5 vnet[2259]: #0  0xa7df2e2c 0xa7df2e2c
> Dec 01 10:35:42 nc2s5 vnet[2259]: #1  0xa95ad588 0xa95ad588
> Dec 01 10:35:42 nc2s5 vnet[2259]: #2  0xa7da0090
> vlib_node_runtime_sync_stats + 0x0
> Dec 01 10:35:42 nc2s5 vnet[2259]: #3  0xa7da191c
> vlib_node_sync_stats + 0x4c
> Dec 01 10:35:42 nc2s5 vnet[2259]: #4  0xa7dd973c
> vlib_worker_thread_barrier_release + 0x45c
> Dec 01 10:35:42 nc2s5 vnet[2259]: #5  0xa7de6ef4 0xa7de6ef4
> Dec 01 10:35:42 nc2s5 vnet[2259]: #6  0xa7de827c 0xa7de827c
> Dec 01 10:35:42 nc2s5 vnet[2259]: #7  0xa7df00dc 0xa7df00dc
> Dec 01 10:35:42 nc2s5 vnet[2259]: #8  0xa7da5e04 vlib_main + 0x8f4
> Dec 01 10:35:42 nc2s5 vnet[2259]: #9  0xa7df1d8c 0xa7df1d8c
> Dec 01 10:35:42 nc2s5 vnet[2259]: #10 0xa7c36f8c clib_calljmp +
> 0x24
>
> Dec 01 10:26:56 nc2s5 vnet[2232]: received signal SIGSEGV, PC unsupported,
> faulting address 0x208
> Dec 01 10:26:56 nc2s5 vnet[2232]: #0  0xa4bebe2c 0xa4bebe2c
> Dec 01 10:26:56 nc2s5 vnet[2232]: #1  0xa63a6588 0xa63a6588
> Dec 01 10:26:56 nc2s5 vnet[2232]: #2  0xa6340aa8 0xa6340aa8
> Dec 01 10:26:56 nc2s5 vnet[2232]: #3  0xa4b9f150 vlib_main + 0xc40
> Dec 01 10:26:56 nc2s5 vnet[2232]: #4  0xa4bead8c 0xa4bead8c
> Dec 01 10:26:56 nc2s5 vnet[2232]: #5  0xa4a2ff8c clib_calljmp +
> 0x24
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22265): https://lists.fd.io/g/vpp-dev/message/22265
Mute This Topic: https://lists.fd.io/mt/95379828/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] arm64 / clearfog + VPP

2022-12-05 Thread Pim van Pelt via lists.fd.io
+Josua Mayer 
Hello again Josua, you'll remember we discussed Vector Packet Processing
(VPP) on the NXP/DPAA board, and we've still been discussing this in the
community off and on. I did not manage to get VPP to run on the NXP LX2160A
Clearfog, but Xiaodong references a document from NXP that perhaps you have
contacts for? I think it would be really great to collaborate on
reproducing a running VPP on this NXP processor, and it would likely be
beneficial for your Clearfog et al product line if users knew how to run
VPP on it.

I'm willing to put in the time to make it work, but I will need to
interview/clarify a bunch of things with Solid Run and/or NXP.

groet,
Pim

On Mon, Dec 5, 2022 at 9:59 PM Xiaodong Xu  wrote:

> There is a guide to run VPP on dpaa2 board from NXP at
> https://docs.nxp.com/bundle/GUID-487B2E69-BB19-42CB-AC38-7EF18C0FE3AE/page/GUID-EBA9A5C6-2407-4AC7-87B6-C1470B2CD92D.html
>  It
> requires a few scripts as well as some driver tools (restool, etc.) not
> sure they had any specific changes to VPP for this purpose. It is unclear
> what the startup.conf looks like to run VPP either.
>
> If anyone had any successful experience to bring up VPP on a dpaa2
> platform, please share with us and it would be much appreciated.
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22288): https://lists.fd.io/g/vpp-dev/message/22288
Mute This Topic: https://lists.fd.io/mt/94234426/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Wireguard api - incorrect key lengh issue

2022-12-08 Thread Pim van Pelt via lists.fd.io
Hoi Petr,

I think that the keys in the wireguard plugin are represented
as bytestream, and your 44 character string probably refers to its base64
representation. Try sending the raw key (32 bytes).

As an aside, I thought I'd ask ChatGPT this question, because I thought it
was a fun puzzle.

Pim: if I have a 32 byte array and want to print that as a base64 encoded
> string, how long would the string be ?
> ChatGPT: If you have a 32-byte array and you want to print it as a
> base64-encoded string, the resulting string would be 44 characters long.
> This is because base64 encoding takes 3 bytes of data and converts it into
> 4 characters, so 32 bytes of data would be encoded as 43.3 characters,
> which would be rounded up to 44 characters.


groet,
Pim


On Thu, Dec 8, 2022 at 7:45 AM Petr Boltík  wrote:

> Hi all,
>
> I have an issue with wireguard api message wireguard_interface_create. The
> public/private key is statically declared as "u8 public_key[32]", but
> the length of the public/private key is 44 (at this moment).
> Api wireguard_interface_dump is also impacted. Cli works fine - there is
> "u8 private_key" dynamic assignment. I have already tried to increase
> "typedef wireguard_interface", but this simple modification is not correct
> (I'm not familiar with C).
>
> Please forward this message to the right people.
>
> Thanks to all
> Petr
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22303): https://lists.fd.io/g/vpp-dev/message/22303
Mute This Topic: https://lists.fd.io/mt/95533324/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Python VPP_API_DIR

2022-12-11 Thread Pim van Pelt via lists.fd.io
Hoi,

I am starting to work on a few APIs and noticed that the vpp_papi module's
method find_api_dir promises that it will include VPP_API_DIR first, if
specified in the environment. It doesn't actually do that.
I wrote a changelist that prepends VPP_API_DIR if it exists. This is
backwards compatible / benign because it would not have been useful before
this change, and folks will not have it in their environment yet. While I'm
here, I thought it would be good to make explicit that the 'dirs' argument
is meant to be a list (except it is not initialized or checked, so any
invocation without dirs=[] will crash)

See ssh://pimvanp...@gerrit.fd.io:29418/vpp and please review/merge. Ole
are you the Python API maintainer ?

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22311): https://lists.fd.io/g/vpp-dev/message/22311
Mute This Topic: https://lists.fd.io/mt/95610877/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Python VPP_API_DIR

2022-12-11 Thread Pim van Pelt via lists.fd.io
Of course, the link is https://gerrit.fd.io/r/c/vpp/+/37791

groet,
Pim

On Mon, Dec 12, 2022 at 12:41 AM Pim van Pelt via lists.fd.io  wrote:

> Hoi,
>
> I am starting to work on a few APIs and noticed that the vpp_papi module's
> method find_api_dir promises that it will include VPP_API_DIR first, if
> specified in the environment. It doesn't actually do that.
> I wrote a changelist that prepends VPP_API_DIR if it exists. This is
> backwards compatible / benign because it would not have been useful before
> this change, and folks will not have it in their environment yet. While I'm
> here, I thought it would be good to make explicit that the 'dirs' argument
> is meant to be a list (except it is not initialized or checked, so any
> invocation without dirs=[] will crash)
>
> See ssh://pimvanp...@gerrit.fd.io:29418/vpp and please review/merge. Ole
> are you the Python API maintainer ?
>
> --
> Pim van Pelt 
> PBVP1-RIPE - http://www.ipng.nl/
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22312): https://lists.fd.io/g/vpp-dev/message/22312
Mute This Topic: https://lists.fd.io/mt/95610877/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Running multiple VPP processes causing VAPI API failures

2022-12-14 Thread Pim van Pelt via lists.fd.io
Hoi,

Also worth noting, several sockets are created in /run/vpp/* notably the
API socket /run/vpp/api.sock - the second invocation of "vpp" may have
overwritten the socket with a new one, rendering the existing first
invocation of "vpp" unusable.
As Klement points out, you can run multiple instances of VPP, but make sure
they run in their own namespace so that they don't overwrite each others
shared memory and stats segments, and they don't overwrite each others
sockets.

groet,
Pim

On Wed, Dec 14, 2022 at 1:06 PM Klement Sekera 
wrote:

> Hi,
>
> if you have two vpp instances running with same shm prefix, conflicts are
> to be expected. It’s possible that the second instance mangled file system
> entries for the first one. When running more than one vpp instance, you
> need to ensure that every one of those has a unique shared memory prefix.
> You can take a look at how the test framework does this.
>
> Regards,
> Klement
>
> > On 12 Dec 2022, at 16:59, Chinmaya Aggarwal via lists.fd.io
>  wrote:
> >
> > Hi,
> >
> > We have a main VPP process running and we have IPIP tunnels configured
> in VPP which we try to fetch using VAPI API calls. It works fine in normal
> scenarios but when we by mistake executed the command "vpp" from linux
> command line, we saw that an additional VPP daemon started running and also
> that VAPI API call is not able to fetch IPIP tunnel data anymore. On
> killing this daemon manually, we observed that VAPI connections could not
> be established anymore and VPP's main process also got into a bad state.
> Restarting VPP fixed the issue and we were able to fetch IPIP tunnel data
> through VAPI APIs.
> >
> > What is the purpose of this command "vpp" and is it a valid use case to
> run multiple vpp daemons? Also, how can we restrict the additional daemon
> from starting if VPP's main process is already running?
> >
> > Thanks and Regards,
> > Chinmaya Agarwal.
> >
> >
>
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22329): https://lists.fd.io/g/vpp-dev/message/22329
Mute This Topic: https://lists.fd.io/mt/95624233/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Linux-cp Plugin Bird Routes Not Showing Up in VPP

2022-12-22 Thread Pim van Pelt via lists.fd.io
Hoi,

Is bird running in the 'dataplane' network namespace ?

groet,
Pim

On Thu, Dec 22, 2022 at 12:52 AM Christopher Adigun 
wrote:

> Hi,
>
> I am currently trying to use linx-cp plugins to sync routes learned via
> BGP, bird is seeing the BGP route but I can't see the routes in VPP.
>
> Details:
>
> *vpp v22.10-release built by root on ff42e25458af at 2022-10-26T14:00:24*
>
> *startup.conf:*
>
> unix {
>   nodaemon
>   log /tmp/vpp.log
>   full-coredump
>   gid vpp
>   interactive
>   cli-listen /run/vpp/cli.sock
>   exec /etc/vpp/init.conf
> }
>
> cpu {
>   main-core 1
>   corelist-workers 19
> }
>
> memory {
>   main-heap-size 2G
> }
> api-trace {
>   on
> }
>
> dpdk {
>  dev :00:09.0 {name n6}
>  dev :00:07.0 {name internet}
> }
>
> api-segment {
>   gid vpp
> }
>
> plugins {
>   path /usr/lib/x86_64-linux-gnu/vpp_plugins/
>   plugin ping_plugin.so { disable }
>   plugin linux_cp_plugin.so { enable }
>   plugin linux_nl_plugin.so { enable }
>   plugin dpdk_plugin.so { enable }
> }
>
> *Init.conf:*
>
> lcp default netns dataplane
> lcp lcp-sync on
> lcp lcp-auto-subint on
> create loopback interface instance 0
> lcp create loop0 host-if loop0
> set interface state loop0 up
> set interface ip address loop0 192.168.163.2/32
> lcp create n6 host-if xe0-1
> set interface mtu 9001 n6
> set interface mtu 9001 internet
> set interface ip address n6 10.0.5.10/24
> set interface ip address internet 10.0.4.9/24
> set interface state n6 up
> set interface state internet up
> ip route add 0.0.0.0/0 via 10.0.4.1 internet
> set cnat snat-policy addr 10.0.4.9
> set cnat snat-policy if-pfx
> set cnat snat-policy if table include-v4 internet
> set cnat snat-policy prefix 10.45.0.0/16
> set interface feature internet cnat-snat-ip4 arc ip4-unicast
>
> *BIRD routes:*
>
> root@nat-gw-697d886cb4-xn62q:/etc/bird# birdc show route all
> BIRD 1.6.8 ready.
> 10.45.0.0/16   via 10.0.5.9 on xe0-1 [neighbor_v4_1 23:13:04] * (100)
> [i]
> Type: BGP unicast univ
> BGP.origin: IGP
> BGP.as_path:
> BGP.next_hop: 10.0.5.9
> BGP.med: 0
> BGP.local_pref: 100
>
> root@nat-gw-697d886cb4-xn62q:/etc/bird# ip r
> 10.0.5.0/24 dev xe0-1 proto kernel scope link src 10.0.5.10
> 10.45.0.0/16 via 10.0.5.9 dev xe0-1 proto bird
>
>
> *BIRD config:*
>
> router id 194.1.163.2;
>
> protocol device { scan time 30; }
> protocol kernel kernel4 {
>   import none;
>   export where source != RTS_DEVICE;
>   learn off;
>   scan time 300;
> }
>
> protocol bgp neighbor_v4_1 {
>   local as 65001;
>   direct;
>   neighbor 10.0.5.9 as 65001;
> }
>
> Need any hint on troubleshooting this.
>
> Thanks
>
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22362): https://lists.fd.io/g/vpp-dev/message/22362
Mute This Topic: https://lists.fd.io/mt/95817807/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Linux-cp Plugin Bird Routes Not Showing Up in VPP

2022-12-22 Thread Pim van Pelt via lists.fd.io
Hoi,


On Thu, Dec 22, 2022 at 4:08 PM Matthew Smith via lists.fd.io  wrote:

>
> On Thu, Dec 22, 2022 at 7:09 AM Petr Boltík  wrote:
>
>>
>> - To make "plugin linux_nl_plugin.so" working, you need to run VPP inside
>> netns dataplane (same as bird). This can be done by editing VPP systemd
>> startup file (add something like "
>> NetworkNamespacePath=/var/run/netns/dataplane" ) and ensuring that netns
>> "dataplane" will be started first.
>>
>
> I run VPP in the default netns and use FRR & iproute2 in the dataplane
> netns and it works fine. I test this regularly on AWS, Azure, KVM, and bare
> metal. I don't set the netns with vppctl CLI commands though, I set it in
> startup.conf with 'linux-cp { default netns dataplane }'. I will look into
> whether something is broken with the CLI command.
>
I run VPP in default netns and Bird2 & iproute2 in the dataplane netns. I
set default netns dataplane in startup.conf also.

I think OP has a different problem, because I do see their netlink messages
arriving otherwise. One test that you can do, is in the network namespace,
change the link attribute (like ip link set  mtu 1500; or ip link set
 up; or down; and then see if 'vppctl show int' reflects that change.
That would demonstrate that end-to-end, netlink messages are arriving from
the dataplane netns, through kernel, through linux_nl plugin and finally
into the dataplane.

One plausible explanation for the behavior is that linux_nl starts the
netlink listener immediately, based on startup.conf, and it does not change
its mind when you specify 'lcp netns default' on the CLI, in other words:
it will only listen to one namespace, namely the one it found when it
started up. I think this is OP's issue, and if so, then 'lcp netns' is
broken in linux-cp, it can never work, and actually should be considered
harmful because there will only be one netns listened to, so changing it
midflight will give erratic results. The same is true for the 'netns'
argument to lcp create -- the only place where linux_nl will ever pick up
netlink messages is in the very first namespace it started in, as specified
in startup.conf.

As a point of comparison - lcpng will start a netlink listener *once the
first LIP is created*; which is why it will start the listener in either
what was setup in startup.conf, or what it changed to with 'lcp default
netns', to any value set before the very first interface pair is created.
'lcp default netns' works there, but as with linux_nl, if any LIP is
created in a netns other than the initial one which has the (one and only)
netlink listener in it), it will give unexpected results.

I think we should:
- remove lcp netns default from CLI
- remove changing the netns from API
- force use of only startup.conf to start the netlink listener in that, and
only that, network namespace.

Thoughts ?

--
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22371): https://lists.fd.io/g/vpp-dev/message/22371
Mute This Topic: https://lists.fd.io/mt/95817807/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Linux-cp Plugin Bird Routes Not Showing Up in VPP

2022-12-22 Thread Pim van Pelt via lists.fd.io
Hoi,

On Thu, Dec 22, 2022 at 10:16 PM Christopher Adigun 
wrote:

> Interface is still down which I need for my use-case because that is where
> the BGP communication is taking place.
>
> I tried your git repo and built the container image, now both are working
> fine.
>
Can you clarify which git repo did you build ?


> This means the official release has an issue like you said.
>
There are several issues, yes. Understanding which ones and how you
addressed them, will help the community to address them :)

groet,
Pim

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22376): https://lists.fd.io/g/vpp-dev/message/22376
Mute This Topic: https://lists.fd.io/mt/95817807/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Possible VPP deadlock

2023-01-08 Thread Pim van Pelt via lists.fd.io
Hoi,

I've had a few instances of a recent VPP hanging - API and CLI go
unresponsive, forwarding stops (at least, I think), but the worker threads
are still consuming CPU.
Attaching GDB, I see the main thread is doing the following:

(gdb) bt

#0  0x7f5f6f8f271b in sched_yield () at
../sysdeps/unix/syscall-template.S:78

#1  0x7f5f6fb3df8b in spin_acquire_lock (sl=) at
/home/pim/src/vpp/src/vppinfra/dlmalloc.c:468

#2  mspace_malloc (msp=0x130048040, bytes=72) at
/home/pim/src/vpp/src/vppinfra/dlmalloc.c:4351

#3  0x7f5f6fb66f81 in mspace_memalign (msp=0x130048040,
alignment=, bytes=72) at
/home/pim/src/vpp/src/vppinfra/dlmalloc.c:4667

#4  clib_mem_heap_alloc_inline (heap=, size=72,
align=, os_out_of_memory_on_failure=1) at
/home/pim/src/vpp/src/vppinfra/mem_dlmalloc.c:608

#5  clib_mem_heap_alloc_aligned (heap=, size=72, align=8) at
/home/pim/src/vpp/src/vppinfra/mem_dlmalloc.c:664

#6  0x7f5f6fba5157 in _vec_alloc_internal (n_elts=64, attr=) at /home/pim/src/vpp/src/vppinfra/vec.c:35

#7  0x7f5f6fb848c8 in _vec_resize (vp=, n_add=64,
hdr_sz=0, align=8, elt_sz=) at
/home/pim/src/vpp/src/vppinfra/vec.h:256

#8  serialize_vector_write (m=, s=0x7f5f0dbfebc0) at
/home/pim/src/vpp/src/vppinfra/serialize.c:908

#9  0x7f5f6fb843c1 in serialize_write_not_inline (m=0x7f5f0dbfeb60,
s=, n_bytes_to_write=4, flags=) at
/home/pim/src/vpp/src/vppinfra/serialize.c:734

#10 0x7f5f6fe5a053 in serialize_stream_read_write
(header=0x7f5f0dbfeb60, s=, n_bytes=4, flags=2) at
/home/pim/src/vpp/src/vppinfra/serialize.h:140

#11 serialize_get (m=0x7f5f0dbfeb60, n_bytes=4) at
/home/pim/src/vpp/src/vppinfra/serialize.h:180

#12 serialize_integer (m=0x7f5f0dbfeb60, x=, n_bytes=4) at
/home/pim/src/vpp/src/vppinfra/serialize.h:187

#13 vl_api_serialize_message_table (am=0x7f5f6fe66258 ,
vector=) at /home/pim/src/vpp/src/vlibapi/api_shared.c:210

#14 0x7f5f6fe5a715 in vl_msg_api_trace_save (am=0x130048040,
which=, fp=0x13f0690, is_json=27 '\033') at
/home/pim/src/vpp/src/vlibapi/api_shared.c:410

#15 0x7f5f6fe5c0ea in vl_msg_api_post_mortem_dump () at
/home/pim/src/vpp/src/vlibapi/api_shared.c:880

#16 0x004068c6 in os_panic () at
/home/pim/src/vpp/src/vpp/vnet/main.c:415

#17 0x7f5f6fb3feed in mspace_free (msp=0x130048040, mem=) at /home/pim/src/vpp/src/vppinfra/dlmalloc.c:2954

#18 0x7f5f6fb6bf8c in clib_mem_heap_free (heap=0x0, p=)
at /home/pim/src/vpp/src/vppinfra/mem_dlmalloc.c:768

#19 clib_mem_free (p=) at
/home/pim/src/vpp/src/vppinfra/mem_dlmalloc.c:774

#20 0x7f5f2fa32b40 in ?? ()

#21 0x7f5f3302f848 in ?? ()

#22 0x in ?? ()


When I kill VPP, sometimes an api_post_mortem is emitted (although most of
the time they are empty), but subsequently trying to dump it, makes VPP
crash -

-rw--- 1 ipng ipng 35437 Jan  8 19:08 api_post_mortem.76724

-rw--- 1 ipng ipng 35368 Jan  8 19:08 api_post_mortem.76842

-rw--- 1 ipng ipng 0 Jan  8 19:08 api_post_mortem.76978

-rw--- 1 ipng ipng 0 Jan  8 19:08 api_post_mortem.84008


#0  0x in ?? ()

#1  0x77fada5f in vl_msg_print_trace (msg=0x7fff9db73bd8 "",
ctx=0x7fff53b62ca0)
at /home/pim/src/vpp/src/vlibmemory/vlib_api_cli.c:693

#2  0x766a55bb in vl_msg_traverse_trace (tp=0x7fff9b4e7998,
fn=0x77fad790
, ctx=0x7fff53b62ca0)

at /home/pim/src/vpp/src/vlibapi/api_shared.c:321

#3  0x77fab854 in api_trace_command_fn (vm=0x7fff96000700,
input=0x7fff53b62f30,
cmd=)

at /home/pim/src/vpp/src/vlibmemory/vlib_api_cli.c:727

#4  0x7647fdad in vlib_cli_dispatch_sub_commands (vm=0x7fff96000700,
cm=, input=0x7fff53b62f30,

parent_command_index=) at
/home/pim/src/vpp/src/vlib/cli.c:650

#5  0x7647fb91 in vlib_cli_dispatch_sub_commands (vm=0x7fff96000700,
cm=, input=0x7fff53b62f30,

parent_command_index=) at
/home/pim/src/vpp/src/vlib/cli.c:607

#6  0x7647f0cd in vlib_cli_input (vm=0x7fff96000700,
input=0x7fff53b62f30,
function=, function_arg=)

at /home/pim/src/vpp/src/vlib/cli.c:753

#7  0x764fd5c7 in unix_cli_process_input (cm=,
cli_file_index=0) at /home/pim/src/vpp/src/vlib/unix/cli.c:2616

#8  unix_cli_process (vm=, rt=0x7fff9b69bdc0, f=) at /home/pim/src/vpp/src/vlib/unix/cli.c:2745

#9  0x764a7837 in vlib_process_bootstrap (_a=) at
/home/pim/src/vpp/src/vlib/main.c:1221

#10 0x763f9d94 in clib_calljmp () at
/home/pim/src/vpp/src/vppinfra/longjmp.S:123

#11 0x7fff94700b00 in ?? ()

#12 0x7649f3d0 in vlib_process_startup (vm=0x7fff96000700,
p=0x7fff9b69bdc0,
f=0x0) at /home/pim/src/vpp/src/vlib/main.c:1246

#13 dispatch_process (vm=0x7fff96000700, p=0x7fff9b69bdc0, f=0x0,
last_time_stamp=) at /home/pim/src/vpp/src/vlib/main.c:1302

#14 0x in ?? ()

Has anybody else seen API calls seemingly hang the VPP instance? Is there
an alternative way to pry loose the information in api_post_mortem.* files
? Or any other clues where to narrow down the issue?
It's a rare issue

Re: [vpp-dev] Linux-cp Plugin Bird Routes Not Showing Up in VPP

2023-01-08 Thread Pim van Pelt via lists.fd.io
+Matthew Smith  and +Jon Loeliger  can
you let me know what you think?
Does Netgate value the 'lcp default netns' or ability to create LIPs in a
namespace other than 'dataplane'?
As I described, I think the ability to change these in the API, or set them
in 'lcp create' yields erratic behavior.

groet,
Pim

On Thu, Dec 22, 2022 at 4:28 PM Pim van Pelt  wrote:

> Hoi,
>
>
> On Thu, Dec 22, 2022 at 4:08 PM Matthew Smith via lists.fd.io  netgate@lists.fd.io> wrote:
>
>>
>> On Thu, Dec 22, 2022 at 7:09 AM Petr Boltík 
>> wrote:
>>
>>>
>>> - To make "plugin linux_nl_plugin.so" working, you need to run VPP
>>> inside netns dataplane (same as bird). This can be done by editing VPP
>>> systemd startup file (add something like "
>>> NetworkNamespacePath=/var/run/netns/dataplane" ) and ensuring that
>>> netns "dataplane" will be started first.
>>>
>>
>> I run VPP in the default netns and use FRR & iproute2 in the dataplane
>> netns and it works fine. I test this regularly on AWS, Azure, KVM, and bare
>> metal. I don't set the netns with vppctl CLI commands though, I set it in
>> startup.conf with 'linux-cp { default netns dataplane }'. I will look into
>> whether something is broken with the CLI command.
>>
> I run VPP in default netns and Bird2 & iproute2 in the dataplane netns. I
> set default netns dataplane in startup.conf also.
>
> I think OP has a different problem, because I do see their netlink
> messages arriving otherwise. One test that you can do, is in the network
> namespace, change the link attribute (like ip link set  mtu 1500; or
> ip link set  up; or down; and then see if 'vppctl show int' reflects
> that change. That would demonstrate that end-to-end, netlink messages are
> arriving from the dataplane netns, through kernel, through linux_nl plugin
> and finally into the dataplane.
>
> One plausible explanation for the behavior is that linux_nl starts the
> netlink listener immediately, based on startup.conf, and it does not change
> its mind when you specify 'lcp netns default' on the CLI, in other words:
> it will only listen to one namespace, namely the one it found when it
> started up. I think this is OP's issue, and if so, then 'lcp netns' is
> broken in linux-cp, it can never work, and actually should be considered
> harmful because there will only be one netns listened to, so changing it
> midflight will give erratic results. The same is true for the 'netns'
> argument to lcp create -- the only place where linux_nl will ever pick up
> netlink messages is in the very first namespace it started in, as specified
> in startup.conf.
>
> As a point of comparison - lcpng will start a netlink listener *once the
> first LIP is created*; which is why it will start the listener in either
> what was setup in startup.conf, or what it changed to with 'lcp default
> netns', to any value set before the very first interface pair is created.
> 'lcp default netns' works there, but as with linux_nl, if any LIP is
> created in a netns other than the initial one which has the (one and only)
> netlink listener in it), it will give unexpected results.
>
> I think we should:
> - remove lcp netns default from CLI
> - remove changing the netns from API
> - force use of only startup.conf to start the netlink listener in that,
> and only that, network namespace.
>
> Thoughts ?
>
> --
> Pim van Pelt 
> PBVP1-RIPE - http://www.ipng.nl/
>


-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22434): https://lists.fd.io/g/vpp-dev/message/22434
Mute This Topic: https://lists.fd.io/mt/95817807/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] linux-cp endianness issue

2023-01-11 Thread Pim van Pelt via lists.fd.io
Hoi folks,

I noticed that linux-cp plugin is not quite right with endianness:

Example code:
lcp_add = vpp.api.lcp_itf_pair_add_del_v2(is_add=True, sw_if_index=17,

host_if_type=VppEnum.vl_api_lcp_itf_host_type_t.LCP_API_ITF_HOST_TAP,
host_if_name="loop0", netns="dataplane")
print(lcp_add)

lcp_ret = vpp.api.lcp_itf_pair_get()
print(lcp_ret)


Before (note an incorrect host_sw_if_index in the return, is
*301989888, *expected
*18*):
VPP version is 23.02-rc0~212-gf06a518f8
lcp_itf_pair_add_del_v2_reply(_0=103, context=2, retval=0,
*host_sw_if_index=301989888*)
(lcp_itf_pair_get_reply(_0=105, context=3, retval=0, cursor=4294967295),
[lcp_itf_pair_details(_0=106, context=3, phy_sw_if_index=17,
*host_sw_if_index=18*, vif_index=594, host_if_name='loop0',
host_if_type=,
netns='dataplane')])

After:
VPP version is 23.02-rc0~212-gf06a518f8
lcp_itf_pair_add_del_v2_reply(_0=103, context=2, retval=0,
*host_sw_if_index=18*)
(lcp_itf_pair_get_reply(_0=105, context=3, retval=0, cursor=4294967295),
[lcp_itf_pair_details(_0=106, context=3, phy_sw_if_index=17,
host_sw_if_index=18, vif_index=595, host_if_name='loop0',
host_if_type=,
netns='dataplane')])

See https://gerrit.fd.io/r/c/vpp/+/37894

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22443): https://lists.fd.io/g/vpp-dev/message/22443
Mute This Topic: https://lists.fd.io/mt/96197927/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Error message on starting vpp

2023-01-11 Thread Pim van Pelt via lists.fd.io
Hoi,

Nathan's fix is still pending and starting VPP at HEAD still emits the
warning:
pim@hippo:~/src/vpp$ make run
WARNING: STARTUP_CONF not defined or file doesn't exist.
 Running with minimal startup config:  unix { interactive
cli-listen /run/vpp/cli.sock gid 1000 } dpdk { no-pci } \n
vnet_feature_arc_init:272: feature node 'ip6-lookup' not found (before
'pt', arc 'ip6-output')

I see the other fixes from this thread were merged (thanks!) but what about
the OP? Would be prudent to address before Jan 18th :)

groet,
Pim

On Mon, Dec 19, 2022 at 9:49 AM Nathan Skrzypczak <
nathan.skrzypc...@gmail.com> wrote:

> Hi Xiaodong,
>
> It seems like a '.runs_after' was introduced on a node that does not
> belong to the arc in question. [0] should solve this.
> (CCingJulian as he is the author of the original patch & sr plugin
> maintainers)
>
> Cheers
> -Nathan
>
> [0] https://gerrit.fd.io/r/c/vpp/+/37837
>
> Le sam. 3 déc. 2022 à 19:29, Xiaodong Xu  a écrit :
>
>> Hi VPP experts,
>>
>> I got the following error message when starting vpp recently:
>>
>> 0: vnet_feature_arc_init:272: feature node 'ip6-lookup' not found (before
>> 'pt', arc 'ip6-output')
>>
>> I'm using master branch from VPP git repo. By checking the source code,
>> it seems it might have something to do with the comment
>> https://github.com/FDio/vpp/commit/b79d09bbfa93f0f752f7249ad27a08eae0863a6b
>> and
>> https://github.com/FDio/vpp/commit/39d6deca5f71ee4fe772c10d76ed5b65d1ebec44
>>
>> So I remove the two commits from my local repo and the issue is gone.
>>
>> The message seems to be harmless, but if anyone who is familiar with the
>> commits can take a look, I'd appreciate it.
>>
>> Regards,
>> Xiaodong
>>
>>
>>
>>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22445): https://lists.fd.io/g/vpp-dev/message/22445
Mute This Topic: https://lists.fd.io/mt/95432703/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Understanding VRFs and Linux CP

2023-01-11 Thread Pim van Pelt via lists.fd.io
Hoi Brian,

I think that Linux CP does not consume the netlink message that assigns the
interface to a new VRF (table)- doing it the other way around will likely
work better.

It would be pretty slick if "sudo ip link set dev ge0 master vrf-blue"
could pivot the VPP-side interface into the correct table in the dataplane,
but that message is not consumed.
A previous discussion (and a workaround, which is to put the interface in
the table on the VPP side, and then copy that forward into the Linux side
as you did above), may work for you.

See here: https://lists.fd.io/g/vpp-dev/topic/89678481#20995

If there's a larger interest, I could give it a go, to consume the 'create
vrf V' and 'set interface X in vrf V' netlink messages, although this stuff
can get tricky :)

groet,
Pim

On Wed, Jan 11, 2023 at 8:48 PM Brian Saunders 
wrote:

> Hello All,
>
> I've been playing around with VPP and have a question about VRFs created
> in linux and how they are supposed to appear within the VPP fib when one
> has the Linux CP/NL plugins enabled.  I saw the following post here
> https://lists.fd.io/g/vpp-dev/topic/89678481#21001 which seemed a little
> conflicting on the responses so I just wanted to get a bit of clarification
> on the expected behavior.  Here are the commands that I'm inputting:
>
> vppctl commands:
> create interface vmxnet3 :0b:00.0 bind
> lcp create vmxnet3-0/b/0/0 host-if ge0
>
> linux commands:
> sudo ip link set ge0 up
> sudo ip link add vrf-blue type vrf table 10
> sudo ip link set dev vrf-blue up
> sudo ip link set dev ge0 master vrf-blue
> sudo ip addr add 192.168.1.1/24 dev ge0
>
> From the linux side all is well.  When I go into vppctl I see table 10 but
> 192.168.1.1/24 is not in table 10.  Below if the output from show ip
> fib.  Is this the expected behavior or should 192.168.1.1/24 be in the
> table 10 fib?
>
> vpp# show ver
> vpp v22.10.0-3~gb89dcf824 built by root on ubuntu20 at 2023-01-11T16:05:42
> vpp# show ip fib
> ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto flowlabel ]
> epoch:0 flags:none locks:[default-route:1, ]
> 0.0.0.0/0
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:1 buckets:1 uRPF:0 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 0.0.0.0/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:2 buckets:1 uRPF:1 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 192.168.1.0/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:14 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 192.168.1.0/24
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:13 to:[0:0]]
> [0] [@4]: ipv4-glean: [src:192.168.1.0/24] vmxnet3-0/b/0/0: mtu:9000
> next:1 flags:[] 00505694bf900806
> 192.168.1.1/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:17 buckets:1 uRPF:18 to:[0:0]]
> [0] [@13]: dpo-receive: 192.168.1.1 on vmxnet3-0/b/0/0
> 192.168.1.255/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:16 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 224.0.0.0/4
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:4 buckets:1 uRPF:3 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 240.0.0.0/4
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:3 buckets:1 uRPF:2 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 255.255.255.255/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:5 buckets:1 uRPF:4 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> ipv4-VRF:10, fib_index:1, flow hash:[src dst sport dport proto flowlabel ]
> epoch:0 flags:none locks:[lcp-rt:1, ]
> 0.0.0.0/0
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:18 buckets:1 uRPF:17 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 0.0.0.0/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:19 buckets:1 uRPF:19 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 224.0.0.0/4
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:21 buckets:1 uRPF:21 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 240.0.0.0/4
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:20 buckets:1 uRPF:20 to:[0:0]]
> [0] [@0]: dpo-drop ip4
> 255.255.255.255/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:22 buckets:1 uRPF:23 to:[0:0]]
> [0] [@13]: dpo-receive: 0.0.0.0 on local0
> vpp#
>
> Thanks,
>
> Brian
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22450): https://lists.fd.io/g/vpp-dev/message/22450
Mute This Topic: https://lists.fd.io/mt/96207643/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] span and subint or l2

2023-01-14 Thread Pim van Pelt via lists.fd.io
Hoi folks,

I was diagnosing an issue today and needed to see some traffic that was
traversing an l2xc between a sub-int and a vxlan_tunnel.

Take the following simple config:

create vxlan tunnel src 194.1.163.5 dst 194.1.163.1 instance 11 vni 10502
decap-next l2

create sub GigabitEthernet4/0/0 519 dot1q 519 exact-match

set interface l2 xconnect GigabitEthernet4/0/0.519 vxlan_tunnel11

set interface l2 tag-rewrite GigabitEthernet4/0/0.519 pop 1

set interface l2 xconnect vxlan_tunnel11 GigabitEthernet4/0/0.519


Note - this l2xc works just fine. My initial idea was to SPAN on
vxlan_tunnel11 (l2)
create tap host-if vppspan host-mtu-size 9216
set int state tap0 up
set int span vxlan_tunnel11 l2 destination tap0
(no traffic)

Then I thought I'd take a look at GigabitEthernet4/0/0.519
set int span GigabitEthernet4/0/0.519 destination tap0
(no traffic)

Or in L2 mode:
set int span GigabitEthernet4/0/0.519 l2 destination tap0
(no traffic)

Finally, I applied the SPAN on the underlying GigabitEthernet4/0/0 port:
set int span GigabitEthernet4/0/0 destination tap0
Traffic!

So I'm wondering - is my understanding of l2-input/l2-output SPAN correct,
or does it work in a different way? And, is it feasible for me to SPAN a
sub-int or other sw_index (like the vxlan tunnel, both currently not
working)?

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22466): https://lists.fd.io/g/vpp-dev/message/22466
Mute This Topic: https://lists.fd.io/mt/96273897/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] span and subint or l2

2023-01-14 Thread Pim van Pelt via lists.fd.io
Hoi,

As a followup, here's a trace of the l2 enabled sub-int when SPAN is
enabled in L2. The packet is indeed seen and copied (in bold, below), but
not emitted on tap0:

01:04:06:883962: dpdk-input

  GigabitEthernet10/0/3 rx queue 0

  buffer 0x4be6d8: current data 0, length 46, buffer-pool 0, ref-count 1,
trace handle 0x2

   ext-hdr-valid

  PKT MBUF: port 3, nb_segs 1, pkt_len 46

buf_len 2176, data_len 46, ol_flags 0x0, data_off 128, phys_addr
0x2f59b680

packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0

rss 0x0 fdir.hi 0x0 fdir.lo 0x0

  ARP: fe:54:00:10:10:03 -> ff:ff:ff:ff:ff:ff 802.1q vlan 100

  request, type ethernet/IP4, address size 6/4

  fe:54:00:10:10:03/192.0.2.1 -> 00:00:00:00:00:00/192.0.2.2

01:04:06:883974: ethernet-input

  frame: flags 0x1, hw-if-index 4, sw-if-index 4

  ARP: fe:54:00:10:10:03 -> ff:ff:ff:ff:ff:ff 802.1q vlan 100

01:04:06:883981: l2-input

  l2-input: sw_if_index 12 dst ff:ff:ff:ff:ff:ff src fe:54:00:10:10:03
[span-l2-input l2-input-vtr l2-output ]

*01:04:06:883984: span-l2-input*

*  SPAN: mirrored GigabitEthernet10/0/3.100 -> tap0*

01:04:06:884002: l2-input-vtr

  l2-input-vtr: sw_if_index 12 dst ff:ff:ff:ff:ff:ff src fe:54:00:10:10:03
data 08 06 00 01 08 00 06 04 00 01 fe 54

01:04:06:884005: l2-output

  l2-output: sw_if_index 13 dst ff:ff:ff:ff:ff:ff src fe:54:00:10:10:03
data 08 06 00 01 08 00 06 04 00 01 fe 54

01:04:06:884007: vxlan4-encap

  VXLAN encap to vxlan_tunnel0 vni 100

01:04:06:884010: ip4-rewrite

  tx_sw_if_index 2 dpo-idx 15 : ipv4 via 192.168.11.7
GigabitEthernet10/0/1: mtu:9000 next:7 flags:[]
5254001110005254001010010800 flow hash: 0xd00ea053

  : 5254001110005254001010010800454efd11264bc0a80b00c0a8

  0020: 0b0353a012b5003a08006400fe540010

01:04:06:884019: GigabitEthernet10/0/1-output

  GigabitEthernet10/0/1

  IP4: 52:54:00:10:10:01 -> 52:54:00:11:10:00

  UDP: 192.168.11.0 -> 192.168.11.3

tos 0x00, ttl 253, length 78, checksum 0x264b dscp CS0 ecn NON_ECN

fragment id 0x

  UDP: 21408 -> 4789

length 58, checksum 0x

01:04:06:884023: GigabitEthernet10/0/1-tx

  GigabitEthernet10/0/1 tx queue 0

  buffer 0x4be6d8: current data -46, length 92, buffer-pool 0, ref-count 1,
trace handle 0x2

   ext-hdr-valid

   l2-hdr-offset 4 l3-hdr-offset 18

  PKT MBUF: port 3, nb_segs 1, pkt_len 92

buf_len 2176, data_len 92, ol_flags 0x0, data_off 82, phys_addr
0x2f59b680

packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0

rss 0x0 fdir.hi 0x0 fdir.lo 0x0

  IP4: 52:54:00:10:10:01 -> 52:54:00:11:10:00

  UDP: 192.168.11.0 -> 192.168.11.3

tos 0x00, ttl 253, length 78, checksum 0x264b dscp CS0 ecn NON_ECN

fragment id 0x

  UDP: 21408 -> 4789

length 58, checksum 0x0000

On Sat, Jan 14, 2023 at 8:58 PM Pim van Pelt via lists.fd.io  wrote:

> Hoi folks,
>
> I was diagnosing an issue today and needed to see some traffic that was
> traversing an l2xc between a sub-int and a vxlan_tunnel.
>
> Take the following simple config:
>
> create vxlan tunnel src 194.1.163.5 dst 194.1.163.1 instance 11 vni 10502
> decap-next l2
>
> create sub GigabitEthernet4/0/0 519 dot1q 519 exact-match
>
> set interface l2 xconnect GigabitEthernet4/0/0.519 vxlan_tunnel11
>
> set interface l2 tag-rewrite GigabitEthernet4/0/0.519 pop 1
>
> set interface l2 xconnect vxlan_tunnel11 GigabitEthernet4/0/0.519
>
>
> Note - this l2xc works just fine. My initial idea was to SPAN on
> vxlan_tunnel11 (l2)
> create tap host-if vppspan host-mtu-size 9216
> set int state tap0 up
> set int span vxlan_tunnel11 l2 destination tap0
> (no traffic)
>
> Then I thought I'd take a look at GigabitEthernet4/0/0.519
> set int span GigabitEthernet4/0/0.519 destination tap0
> (no traffic)
>
> Or in L2 mode:
> set int span GigabitEthernet4/0/0.519 l2 destination tap0
> (no traffic)
>
> Finally, I applied the SPAN on the underlying GigabitEthernet4/0/0 port:
> set int span GigabitEthernet4/0/0 destination tap0
> Traffic!
>
> So I'm wondering - is my understanding of l2-input/l2-output SPAN correct,
> or does it work in a different way? And, is it feasible for me to SPAN a
> sub-int or other sw_index (like the vxlan tunnel, both currently not
> working)?
>
> --
> Pim van Pelt 
> PBVP1-RIPE - http://www.ipng.nl/
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22467): https://lists.fd.io/g/vpp-dev/message/22467
Mute This Topic: https://lists.fd.io/mt/96273897/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] span and subint or l2

2023-01-14 Thread Pim van Pelt via lists.fd.io
2.0.2.2 -> 192.0.2.1

tos 0x00, ttl 64, length 84, checksum 0x7618 dscp CS0 ecn NON_ECN

fragment id 0x808d

  ICMP echo_reply checksum 0xac6c id 52958



If I place the span on 'device' I see the packet in both directions, and if
I place it on both devices, I correctly see the packets twice (once with
VLAN 100 on Gi10/0/3, and once without a tag on Gi10/0/2).
a) I suspect that l2-span is broken.
b) it would be nice to be able to add the SPAN to ethernet-input as that
might capture sub-interfaces

groet,
Pim

On Sat, Jan 14, 2023 at 10:17 PM Pim van Pelt  wrote:

> Hoi,
>
> As a followup, here's a trace of the l2 enabled sub-int when SPAN is
> enabled in L2. The packet is indeed seen and copied (in bold, below), but
> not emitted on tap0:
>
> 01:04:06:883962: dpdk-input
>
>   GigabitEthernet10/0/3 rx queue 0
>
>   buffer 0x4be6d8: current data 0, length 46, buffer-pool 0, ref-count 1,
> trace handle 0x2
>
>ext-hdr-valid
>
>   PKT MBUF: port 3, nb_segs 1, pkt_len 46
>
> buf_len 2176, data_len 46, ol_flags 0x0, data_off 128, phys_addr
> 0x2f59b680
>
> packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
>
> rss 0x0 fdir.hi 0x0 fdir.lo 0x0
>
>   ARP: fe:54:00:10:10:03 -> ff:ff:ff:ff:ff:ff 802.1q vlan 100
>
>   request, type ethernet/IP4, address size 6/4
>
>   fe:54:00:10:10:03/192.0.2.1 -> 00:00:00:00:00:00/192.0.2.2
>
> 01:04:06:883974: ethernet-input
>
>   frame: flags 0x1, hw-if-index 4, sw-if-index 4
>
>   ARP: fe:54:00:10:10:03 -> ff:ff:ff:ff:ff:ff 802.1q vlan 100
>
> 01:04:06:883981: l2-input
>
>   l2-input: sw_if_index 12 dst ff:ff:ff:ff:ff:ff src fe:54:00:10:10:03
> [span-l2-input l2-input-vtr l2-output ]
>
> *01:04:06:883984: span-l2-input*
>
> *  SPAN: mirrored GigabitEthernet10/0/3.100 -> tap0*
>
> 01:04:06:884002: l2-input-vtr
>
>   l2-input-vtr: sw_if_index 12 dst ff:ff:ff:ff:ff:ff src
> fe:54:00:10:10:03 data 08 06 00 01 08 00 06 04 00 01 fe 54
>
> 01:04:06:884005: l2-output
>
>   l2-output: sw_if_index 13 dst ff:ff:ff:ff:ff:ff src fe:54:00:10:10:03
> data 08 06 00 01 08 00 06 04 00 01 fe 54
>
> 01:04:06:884007: vxlan4-encap
>
>   VXLAN encap to vxlan_tunnel0 vni 100
>
> 01:04:06:884010: ip4-rewrite
>
>   tx_sw_if_index 2 dpo-idx 15 : ipv4 via 192.168.11.7
> GigabitEthernet10/0/1: mtu:9000 next:7 flags:[]
> 5254001110005254001010010800 flow hash: 0xd00ea053
>
>   :
> 5254001110005254001010010800454efd11264bc0a80b00c0a8
>
>   0020: 0b0353a012b5003a08006400fe540010
>
> 01:04:06:884019: GigabitEthernet10/0/1-output
>
>   GigabitEthernet10/0/1
>
>   IP4: 52:54:00:10:10:01 -> 52:54:00:11:10:00
>
>   UDP: 192.168.11.0 -> 192.168.11.3
>
> tos 0x00, ttl 253, length 78, checksum 0x264b dscp CS0 ecn NON_ECN
>
> fragment id 0x
>
>   UDP: 21408 -> 4789
>
> length 58, checksum 0x
>
> 01:04:06:884023: GigabitEthernet10/0/1-tx
>
>   GigabitEthernet10/0/1 tx queue 0
>
>   buffer 0x4be6d8: current data -46, length 92, buffer-pool 0, ref-count
> 1, trace handle 0x2
>
>ext-hdr-valid
>
>l2-hdr-offset 4 l3-hdr-offset 18
>
>   PKT MBUF: port 3, nb_segs 1, pkt_len 92
>
> buf_len 2176, data_len 92, ol_flags 0x0, data_off 82, phys_addr
> 0x2f59b680
>
>     packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
>
> rss 0x0 fdir.hi 0x0 fdir.lo 0x0
>
>   IP4: 52:54:00:10:10:01 -> 52:54:00:11:10:00
>
>   UDP: 192.168.11.0 -> 192.168.11.3
>
> tos 0x00, ttl 253, length 78, checksum 0x264b dscp CS0 ecn NON_ECN
>
> fragment id 0x
>
>   UDP: 21408 -> 4789
>
> length 58, checksum 0x
>
> On Sat, Jan 14, 2023 at 8:58 PM Pim van Pelt via lists.fd.io  ipng...@lists.fd.io> wrote:
>
>> Hoi folks,
>>
>> I was diagnosing an issue today and needed to see some traffic that was
>> traversing an l2xc between a sub-int and a vxlan_tunnel.
>>
>> Take the following simple config:
>>
>> create vxlan tunnel src 194.1.163.5 dst 194.1.163.1 instance 11 vni 10502
>> decap-next l2
>>
>> create sub GigabitEthernet4/0/0 519 dot1q 519 exact-match
>>
>> set interface l2 xconnect GigabitEthernet4/0/0.519 vxlan_tunnel11
>>
>> set interface l2 tag-rewrite GigabitEthernet4/0/0.519 pop 1
>>
>> set interface l2 xconnect vxlan_tunnel11 GigabitEthernet4/0/0.519
>>
>>
>> Note - this l2xc works just fine. My initial idea was to SPAN on
>> vxlan_tunnel11 (l2)
>> create tap host-if vppspan host-mtu-size 9216
>> set int state tap0 up

[vpp-dev] CLI acl replace + delete

2023-01-15 Thread Pim van Pelt via lists.fd.io
Hoi folks,

I noticed that the acl-plugin will allow to replace an existing ACL using
the API, but not while using the CLI.
As well I see an acl_del API call, but no equivalent CLI. I've added them
in https://gerrit.fd.io/r/c/vpp/+/37924

DBGvpp# set acl-plugin acl permit

ACL index:0

DBGvpp# set acl-plugin acl index 0 deny


DBGvpp# set acl-plugin acl index 1 deny

0: acl_add_list:361: acl-plugin-error: Trying to replace nonexistent ACL 1
(tag cli)

*## Fails because index 1 doesn't exist.*


ACL index:0

DBGvpp# show acl-plugin acl

acl-index 0 count 1 tag {cli}

  0: ipv4 deny src 0.0.0.0/0 dst 0.0.0.0/0 proto 0 sport 0-65535
dport 0-65535

DBGvpp# set acl-plugin interface loop0 input acl 0


DBGvpp# delete acl-plugin acl index 0

delete acl-plugin acl: failed

*## Fails because index 0 is in use*


DBGvpp# set acl-plugin interface loop0 input acl 0 del

DBGvpp# delete acl-plugin acl index 0

Deleted ACL index:0

DBGvpp# show acl-plugin acl
DBGvpp#

Please take a look. I'd like to add ACLs to vppcfg, and this will allow the
planner to do some meaningful work.

groet,
Pim
-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22469): https://lists.fd.io/g/vpp-dev/message/22469
Mute This Topic: https://lists.fd.io/mt/96291919/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] VPP LCP: IS-IS does not work

2023-01-23 Thread Pim van Pelt via lists.fd.io
Hoi,

Linux CP supports  ARP, IPv4 and IPv6. ISIS uses its its own ethertype, as
do other protocols (like LLDP for example). Those will not be punted into
the TAP by the plugin (and it's difficult to uniquely identify the ethernet
frames that should be punted as compared to being handled entirely in the
dataplane).

groet,
Pim


On Mon, Jan 23, 2023 at 4:36 PM  wrote:

> Dear VPP community,
>
> I'm trying to set up IS-IS neighborship with node running VPP22.10 + LCP
> plugin + FRR as control plane software, with no results.
>
> What I can see, looks like VPP does not pass IIH packet between network
> and TAP interface, both directions.
> On node running VPP, when tcpdumping host TAP interface I see outgoing
> IS-IS IIHs:
> 15:12:27.195439 3c:ec:ef:5f:77:8f > 09:00:2b:00:00:05, 802.3, length 1500:
> LLC, dsap OSI (0xfe) Individual, ssap OSI (0xfe) Command, ctrl 0x03: OSI
> NLPID IS-IS (0x83): p2p IIH, src-id ..0001, length 1497
> They are not appears on opposite node (it runs frr/isisd without VPP).
> Only outgoing IIH packets are seen.
> 15:29:13.192912 3c:ec:ef:5f:78:7a > 09:00:2b:00:00:05, 802.3, length 1500:
> LLC, dsap OSI (0xfe) Individual, ssap OSI (0xfe) Command, ctrl 0x03: OSI
> NLPID IS-IS (0x83): p2p IIH, src-id ..0002, length 1497
> 15:29:15.942959 3c:ec:ef:5f:78:7a > 09:00:2b:00:00:05, 802.3, length 1500:
> LLC, dsap OSI (0xfe) Individual, ssap OSI (0xfe) Command, ctrl 0x03: OSI
> NLPID IS-IS (0x83): p2p IIH, src-id ..0002, length 1497
>
> Meanwhile, IP connectivity between the nodes exist. Here you can see ICMP
> exchane, as we can see it on TAP interface of VPP host
> 15:24:15.169021 3c:ec:ef:5f:77:8f > 3c:ec:ef:5f:78:7a, ethertype IPv4
> (0x0800), length 98: 10.114.1.1 > 10.114.1.100: ICMP echo request, id
> 144, seq 12, length 64
> 15:24:15.169275 3c:ec:ef:5f:78:7a > 3c:ec:ef:5f:77:8f, ethertype IPv4
> (0x0800), length 98: 10.114.1.100 > 10.114.1.1: ICMP echo reply, id 144,
> seq 12, length 64
> 15:24:15.329025 3c:ec:ef:5f:77:8f > 3c:ec:ef:5f:78:7a, ethertype IPv4
> (0x0800), length 98: 10.114.1.1 > 10.114.1.100: ICMP echo request, id
> 122, seq 61503, length 64
> 15:24:15.329304 3c:ec:ef:5f:78:7a > 3c:ec:ef:5f:77:8f, ethertype IPv4
> (0x0800), length 98: 10.114.1.100 > 10.114.1.1: ICMP echo reply, id 122,
> seq 61503, length 64
>
> OSPF neighborship also can be established, so problem is IS-IS related.
> tn3# show ipv6 ospf6 neighbor
> Neighbor ID PriDeadTimeState/IfState Duration
> I/F[State]
> 20.20.20.1100:00:38 Full/DR  00:07:21
> Ten0.1914[BDR]
> tn3#
>
> What I found, show node counters says osi-input unknown osi protocol
> increasing.
>
>Count  Node
> Reason   Severity
> 84 lldp-inputlldp packets received on
> disabled i   error
>   4364 dpdk-input  no
> errorerror
> 20 arp-reply   ARP replies
> sentinfo
>  9 arp-reply IP4 source address matches
> local in   error
> 19 arp-reply ARP request IP4 source
> address lear   info
> 43arp-disabled   ARP
> Disabled  error
>   1252 osi-input unknown osi
> protocol  error
>  4 ip6-inputip6 source lookup
> miss error
> 19ip6-local-hop-by-hop   Unknown protocol ip6 local
> h-b-h pa   error
> 10 ip4-localip4 source lookup
> miss error
>  4   ip6-icmp-input  neighbor solicitations for
> unknownerror
>  4   ip6-icmp-input  neighbor advertisements
> sent  info
>106   ip6-icmp-input   neighbor discovery not
> configurederror
> 42 snap-input unknown oui/snap
> protocolerror
> 49   ethernet-input unknown ethernet
> type  error
> 623375   ethernet-input  unknown
> vlan  error
>  1   ethernet-input   subinterface
> downerror
>
> On the other hand, I can see IS-IS protocol in src/vnet/osi/osi.h
>
>
> #define foreach_osi_protocol\
>   _ (null, 0x0) \
>   _ (x_29, 0x01)\
>   _ (x_633, 0x03)   \
>   _ (q_931, 0x08)   \
>   _ (q_933, 0x08)   \
>   _ (q_2931, 0x09)  \
>   _ (q_2119, 0x0c)  \
>   _ (snap, 0x80)\
>   _ (clnp, 0x81)\
>   _ (esis, 0x82)\
>   _ (isis, 0x83) 

Re: [vpp-dev] VPP LCP: IS-IS does not work

2023-01-23 Thread Pim van Pelt via lists.fd.io
Hoi,

I would suggest not matching (only) MAC but (foremost) the ethertype, and
then punting those packets into the TAP, take a look at VLIB_REGISTER_NODE
(lip_punt_node) in src/plugins/linux-cp/lcp_node.c, contributions are
welcome.

groet,
Pim

On Mon, Jan 23, 2023 at 6:06 PM  wrote:

> Hoi Pim,
>
> As for distinguishing  IS-IS packets, I think that should not be really
> difficult,  it's just all the packets with specific DST MACs:
> 09:00:2b:00:00:05, 09:00:2b:00:00:14,09:00:2b:00:00:15.
> It's hard to imagine situation when they are needed to be processed by
> DataPlane.
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22491): https://lists.fd.io/g/vpp-dev/message/22491
Mute This Topic: https://lists.fd.io/mt/96476162/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] VPP Linux-CP/Linux-NL : MPLS?

2023-01-24 Thread Pim van Pelt via lists.fd.io
Hoi,

MPLS is not supported in Linux CP. It is a regularly requested feature, but
not quite as straight forward. Contributions welcome!

groet,
Pim

On Tue, Jan 24, 2023 at 5:16 PM  wrote:

> Hello,
>
> I'm trying to populate MPLS FIB via Linux-CP plugin.
> MPLS records are created via FRR and populated to Linux Kernel routing
> table (I use default ns). Below one can see "push" operation and "swap"
> operation.
> mpls table 0 was created in vpp by "mpls table add 0" command.
> mpls was enabled on all the interfaces, both towards media and taps.
> Still, do not see anything in FIB. Should MPLS tables sync work, or may be,
> I forgot setup something in VPP?
>
> root@tn3:/home/abramov# ip -f mpls route show
> 40050 as to 41000 via inet6 fd00:200::2 dev Ten0.1914 proto static
> root@tn3:/home/abramov# ip -6 route show | grep 4
> fd00:100::4 nhid 209  encap mpls  4 via fd00:200::2 dev Ten0.1914
> proto static metric 20 pref medium
> root@tn3:/home/abramov# vppctl
>
> vpp# show mpls fib 0 40050
> MPLS-VRF:0, fib_index:1 locks:[interface:4, CLI:1, ]
> vpp# show ip6 fib
> ipv6-VRF:0, fib_index:0, flow hash:[src dst sport dport proto flowlabel ]
> epoch:0 flags:none locks:[adjacency:1, default-route:1, lcp-rt:1, ]
> ::/0
>   unicast-ip6-chain
>   [@0]: dpo-load-balance: [proto:ip6 index:6 buckets:1 uRPF:5 to:[0:0]]
> [0] [@0]: dpo-drop ip6
> fd00:100::4/128
>   unicast-ip6-chain
>   [@0]: dpo-load-balance: [proto:ip6 index:17 buckets:1 uRPF:17 to:[0:0]]
> [0] [@5]: ipv6 via fd00:200::2 TenGigabitEthernet1c/0/1.1914: mtu:9000
> next:5 flags:[] 2af08d2cf6163cecef5f778f8100077a86dd
> fd00:200::/64
>   unicast-ip6-chain
>   [@0]: dpo-load-balance: [proto:ip6 index:15 buckets:1 uRPF:14 to:[0:0]]
> [0] [@4]: ipv6-glean: [src:fd00:200::/64]
> TenGigabitEthernet1c/0/1.1914: mtu:9000 next:2 flags:[]
> 3cecef5f778f8100077a86dd
> fd00:200::1/128
>   unicast-ip6-chain
>   [@0]: dpo-load-balance: [proto:ip6 index:16 buckets:1 uRPF:15
> to:[10:848]]
> [0] [@20]: dpo-receive: fd00:200::1 on TenGigabitEthernet1c/0/1.1914
> fd00:200::2/128
>   unicast-ip6-chain
>   [@0]: dpo-load-balance: [proto:ip6 index:18 buckets:1 uRPF:12 to:[0:0]]
> [0] [@5]: ipv6 via fd00:200::2 TenGigabitEthernet1c/0/1.1914: mtu:9000
> next:5 flags:[] 2af08d2cf6163cecef5f778f8100077a86dd
> fe80::/10
>   unicast-ip6-chain
>   [@0]: dpo-load-balance: [proto:ip6 index:7 buckets:1 uRPF:6 to:[8:544]]
> [0] [@14]: ip6-link-local
> vpp# show mpls fib
> MPLS-VRF:0, fib_index:1 locks:[interface:4, CLI:1, ]
> ip4-explicit-null:neos/21 fib:1 index:30 locks:2
>   special refs:1 entry-flags:exclusive,
> src-flags:added,contributing,active,
> path-list:[43] locks:2 flags:exclusive, uPRF-list:31 len:0 itfs:[]
>   path:[53] pl-index:43 mpls weight=1 pref=0 exclusive:
> oper-flags:resolved, cfg-flags:exclusive,
> [@0]: dst-address,unicast lookup in interface's mpls table
>
>  forwarding:   mpls-neos-chain
>   [@0]: dpo-load-balance: [proto:mpls index:33 buckets:1 uRPF:31 to:[0:0]]
> [0] [@4]: dst-address,unicast lookup in interface's mpls table
> ip4-explicit-null:eos/21 fib:1 index:29 locks:2
>   special refs:1 entry-flags:exclusive,
> src-flags:added,contributing,active,
> path-list:[42] locks:2 flags:exclusive, uPRF-list:30 len:0 itfs:[]
>   path:[52] pl-index:42 mpls weight=1 pref=0 exclusive:
> oper-flags:resolved, cfg-flags:exclusive,
> [@0]: dst-address,unicast lookup in interface's ip4 table
>
>  forwarding:   mpls-eos-chain
>   [@0]: dpo-load-balance: [proto:mpls index:32 buckets:1 uRPF:30 to:[0:0]]
> [0] [@3]: dst-address,unicast lookup in interface's ip4 table
> router-alert:neos/21 fib:1 index:27 locks:2
>   special refs:1 entry-flags:exclusive,
> src-flags:added,contributing,active,
> path-list:[40] locks:2 flags:exclusive, uPRF-list:28 len:0 itfs:[]
>   path:[50] pl-index:40 mpls weight=1 pref=0 exclusive:
> oper-flags:resolved, cfg-flags:exclusive,
> [@0]: dpo-punt
>
>  forwarding:   mpls-neos-chain
>   [@0]: dpo-load-balance: [proto:mpls index:30 buckets:1 uRPF:28 to:[0:0]]
> [0] [@2]: dpo-punt
> router-alert:eos/21 fib:1 index:28 locks:2
>   special refs:1 entry-flags:exclusive,
> src-flags:added,contributing,active,
> path-list:[41] locks:2 flags:exclusive, uPRF-list:29 len:0 itfs:[]
>   path:[51] pl-index:41 mpls weight=1 pref=0 exclusive:
> oper-flags:resolved, cfg-flags:exclusive,
> [@0]: dpo-punt
>
>  forwarding:   mpls-eos-chain
>   [@0]: dpo-load-balance: [proto:mpls index:31 buckets:1 uRPF:29 to:[0:0]]
> [0] [@2]: dpo-punt
> ipv6-explicit-null:neos/21 fib:1 index:32 locks:2
>   special refs:1 entry-flags:exclusive,
> src-flags:added,contributing,active,
> path-list:[45] locks:2 flags:exclusive, uPRF-list:33 len:0 itfs:[]
>   path:[55] pl-index:45 mpls weight=1 pref=0 exclusive:
> oper-flags:resolved, cfg-flags:exclusive,
> [@0]: dst-address,unicast lookup in interface's mpls table
>
>  forwarding:   mpls-neos-ch

Re: [vpp-dev] Forwarding Specific Packet with LCP Plugin

2023-02-09 Thread Pim van Pelt via lists.fd.io
Hoi,

Linux CP forwards all (unicast, multicast, ARP) through the TAP tunnel to
the Linux kernel. It's not possible to add a classifier that selectively
forwards some but not all traffic. Matthew mentioned in a thread about NAT
(which kind of wants to do the same thing, perform NAT on some of the
inbound ports using session matching, but forward the rest to Linux), which
has some interesting observations which help explain the current behavior:
https://lists.fd.io/g/vpp-dev/topic/96783537#22553


groet,
Pim

On Thu, Feb 9, 2023 at 11:05 AM Burcu YUKSEL <
burcu.yuk...@ulakhaberlesme.com.tr> wrote:

> Hello Everyone,
>
> We want to transfer the SSH packets coming from Device A to Linux Stack,
> other packets to Application B full duplex. We transferred packets with
> using LCP plugin. However in this case we have transferred all the packets
> to Linux stack. Is there a way to forward only TCP packets with port 22 to
> Linux with LCP?
>
> VPP:
>
> lcp create TwentyFiveGigabitEthernetd8/0/0 host-if vpp-host
> set interface state TwentyFiveGigabitEthernetd8/0/0 up
> set interface ip address TwentyFiveGigabitEthernetd8/0/0 10.20.10.22/24
> ip route add 0.0.0.0/0 via 10.20.10.22 TwentyFiveGigabitEthernetd8/0/0
>
> Linux Server:
>
> sudo ip link set vpp-host up
> sudo ip addr add 10.20.10.22/24 dev vpp-host
> sudo route add default gw 10.20.10.1
>
> Best Regards,
> Burcu
>
> Bu elektronik posta ve onunla iletilen bütün dosyalar sadece göndericisi
> tarafından alması amaçlanan yetkili, gerçek ya da tüzel kişinin kullanımı
> içindir. Eğer söz konusu yetkili alıcı değilseniz, bu elektronik postanın
> içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız
> kesinlikle yasaktır ve bu elektronik postayı derhal silmeniz gerekmektedir.
> Şirketimiz bu mesajın içerdiği bilgilerin doğruluğu veya eksiksiz olduğu
> konusunda herhangi bir garanti vermemektedir. Bu nedenle, bu bilgilerin ne
> şekilde olursa olsun içeriğinden, iletilmesinden, alınmasından ve
> saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca gönderen
> kişiye aittir ve Şirketimizin görüşlerini yansıtmayabilir. Tarafınız ile
> paylaşılan kişisel verilerin, 6698 sayılı Kişisel Verilerin Korunması
> Kanununa uygun olarak işlenmesi gereğini bilginize sunarız.
> --
>
> This e-mail and all files sent with it are intended for authorized natural
> or legal persons, who should be the only persons to open and read them. If
> you are not an authorized recipient, you are strictly prohibited from
> disclosing, copying, forwarding, and using the contents of this e-mail, and
> you must immediately delete it. Our company does not guarantee the accuracy
> or thoroughness of the information contained in this message. It is
> therefore in no way responsible for the content, sending, retrieval and
> storage of this information. The opinions contained in this message are the
> views of the sender only and do not necessarily reflect the views of the
> company. We would like to inform you that any personal data shared with you
> should be processed in accordance with the Law on Protection of Personal
> Data numbered 6698.
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22573): https://lists.fd.io/g/vpp-dev/message/22573
Mute This Topic: https://lists.fd.io/mt/96850285/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] lcpng with dhcp client on Linux

2023-03-01 Thread Pim van Pelt via lists.fd.io
Hoi Baurine,

Do you happen to have the ability to tcpdump on the DHCP server? I am
confident that linux-cp (and the lcpng) will forward this traffic out
because it's a broadcast packet (and all traffic will be handled), but I am
not confident that the packet is (a) arriving at the DHCP server and (b)
being returned or (c) being forwarded through the TAP to your dhclient.

Can you possibly tcpdump on the *DHCP* *server ?*

groet,
Pim

On Wed, Mar 1, 2023 at 8:36 PM Bauruine  wrote:

> Hi Xiaodong
>
> Yes and if i add an ip to the tap in Linux it also shows up in VPP.  I'm
> adding the full config at the end of the mail.
>
> No I can't get an answer that's what I'm trying to achieve.
>
> [stefan@gw02:~]$ sudo dhclient -v ge0-3
> Listening on LPF/ge0-3/00:0d:b9:50:99:0a
> Sending on   LPF/ge0-3/00:0d:b9:50:99:0a
> Sending on   Socket/fallback
> DHCPDISCOVER on ge0-3 to 255.255.255.255 port 67 interval 3
> (xid=0x5538f068)
> DHCPDISCOVER on ge0-3 to 255.255.255.255 port 67 interval 3
> (xid=0x5538f068)
> DHCPDISCOVER on ge0-3 to 255.255.255.255 port 67 interval 7
> (xid=0x5538f068)
>
> [stefan@gw02:~]$ grep -v "\#" /etc/vpp/startup.conf | grep -v -e '^$'
> unix {
>   nodaemon
>   log /var/log/vpp/vpp.log
>   full-coredump
>   cli-listen /run/vpp/cli.sock
>   gid vpp
>   exec /etc/vpp/bootstrap.vpp
> }
> api-trace {
>   on
> }
> api-segment {
>   gid vpp
> }
> socksvr {
>   default
> }
> cpu {
> main-core 1
> workers 2
> skip-cores 0
> }
> plugins {
> plugin lcpng_nl_plugin.so { enable }
> plugin lcpng_if_plugin.so { enable }
> }
> logging {
>default-syslog-log-level info
>class linux-cp/if { rate-limit 1 level debug syslog-level debug }
>class linux-cp/nl { rate-limit 1 level debug syslog-level debug }
> }
> lcpng {
>   lcp-sync
>   lcp-auto-subint
> }
> [stefan@gw02:~]$ grep -v -e '^$' /etc/vpp/bootstrap.vpp
> set interface state GigabitEthernet3/0/0 up
> lcp create GigabitEthernet3/0/0 host-if ge0-3
>
>
> On 01.03.23 20:08, Xiaodong Xu wrote:
>
> Hi Stefan,
>
> Did you also enable 'linux-nl' plugin, in addition to 'linux-cp'? I
> suppose 'linux-nl' is the one which syncs IP addresses/routes from Linux to
> VPP.
>
> BTW, were you able to get the IP address / route after you ran the dhcp
> client on the tap interface? If not what do the error / log messages look
> like?
>
> Xiaodong
>
> On Wed, Mar 1, 2023 at 10:42 AM Bauruine  wrote:
>
>> Hi
>>
>> I would like to use VPP with the lcpng plugin as a home gateway where I
>> have to use dhcp to get an IP from my ISP. If I use the dhcp plugin of
>> VPP it works and I can see an IP address on the interface on Linux but
>> no route which was to be expected as lcpng doesn't sync routes from VPP
>> to Linux.
>>
>> Is it possible to use a dhcp client on Linux to get the IP and routes on
>> Linux where they are synced back to VPP? I naively tried "lcp create
>> GigabitEthernet3/0/0 host-if ge0-3" in VPP and then "dhclient -v ge0-3"
>> on Linux without success. Is there anything I have to configure or is
>> this not possible? I'm using VPP 23.02 with lcpng master.
>>
>> Any help is highly appreciated.
>>
>> Best regards,
>>
>> Stefan
>>
>>
>>
>>
>>
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22643): https://lists.fd.io/g/vpp-dev/message/22643
Mute This Topic: https://lists.fd.io/mt/97322107/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] lcpng with dhcp client on Linux

2023-03-01 Thread Pim van Pelt via lists.fd.io
Hoi,

aha- the response is going to an IPv4 address that the server has assigned
to you (192.168.25.1.67 > 192.168.25.36.68) and because that address is not
configured in VPP, it will not relay it to the TAP.
For isc-dhclient, I think you can use -B (
https://linux.die.net/man/8/dhclient) to ask it to tell the dhcp-server to
*broadcast* it's reply. Does that help (can you show a tcpdump of that
transaction) ?

groet,
Pim

On Thu, Mar 2, 2023 at 12:05 AM Bauruine  wrote:

> Grüezi Pim
>
> Thank you for the reply.
>
> I rewired it to a DHCP server under my control and did a tcpdump on it
> while running dhclient -v ge0-3.
>
> 23:56:25.067464 00:0d:b9:50:99:0a > ff:ff:ff:ff:ff:ff, ethertype IPv4
> (0x0800), length 342: (tos 0x10, ttl 128, id 0, offset 0, flags [none],
> proto UDP (17), length 328)
> 0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from
> 00:0d:b9:50:99:0a, length 300, xid 0xbba5cf6a, secs 48, Flags [none]
> (0x)
>   Client-Ethernet-Address 00:0d:b9:50:99:0a
>   Vendor-rfc1048 Extensions
> Magic Cookie 0x63825363
> DHCP-Message (53), length 1: Discover
> Hostname (12), length 10: "gw02"
> Parameter-Request (55), length 13:
>   Subnet-Mask (1), BR (28), Time-Zone (2), Default-Gateway (3)
>   Domain-Name (15), Domain-Name-Server (6), Unknown (119),
> Hostname (12)
>   Netbios-Name-Server (44), Netbios-Scope (47), MTU (26),
> Classless-Static-Route (121)
>   NTP (42)
> 23:56:25.072057 00:0d:b9:50:9a:ad > 00:0d:b9:50:99:0a, ethertype IPv4
> (0x0800), length 342: (tos 0x10, ttl 128, id 0, offset 0, flags [none],
> proto UDP (17), length 328)
> 192.168.25.1.67 > 192.168.25.36.68: [udp sum ok] BOOTP/DHCP, Reply,
> length 300, xid 0xbba5cf6a, secs 48, Flags [none] (0x)
>   Your-IP 192.168.25.36
>   Server-IP 192.168.25.1
>   Client-Ethernet-Address 00:0d:b9:50:99:0a
>   Vendor-rfc1048 Extensions
> Magic Cookie 0x63825363
> DHCP-Message (53), length 1: Offer
> Server-ID (54), length 4: 192.168.25.1
> Lease-Time (51), length 4: 43200
> Subnet-Mask (1), length 4: 255.255.255.0
> Default-Gateway (3), length 4: 192.168.25.1
> Domain-Name (15), length 15: "local.tuxli.ch."
>     Domain-Name-Server (6), length 4: 192.168.1.1
>
> I'm not sure how to do a "tcpdump" in VPP. On the TAP interface I can't
> see a response.
>
> On 01.03.23 23:20, Pim van Pelt via lists.fd.io wrote:
>
> Hoi Baurine,
>
> Do you happen to have the ability to tcpdump on the DHCP server? I am
> confident that linux-cp (and the lcpng) will forward this traffic out
> because it's a broadcast packet (and all traffic will be handled), but I am
> not confident that the packet is (a) arriving at the DHCP server and (b)
> being returned or (c) being forwarded through the TAP to your dhclient.
>
> Can you possibly tcpdump on the *DHCP* *server ?*
>
> groet,
> Pim
>
> On Wed, Mar 1, 2023 at 8:36 PM Bauruine  wrote:
>
>> Hi Xiaodong
>>
>> Yes and if i add an ip to the tap in Linux it also shows up in VPP.  I'm
>> adding the full config at the end of the mail.
>>
>> No I can't get an answer that's what I'm trying to achieve.
>>
>> [stefan@gw02:~]$ sudo dhclient -v ge0-3
>> Listening on LPF/ge0-3/00:0d:b9:50:99:0a
>> Sending on   LPF/ge0-3/00:0d:b9:50:99:0a
>> Sending on   Socket/fallback
>> DHCPDISCOVER on ge0-3 to 255.255.255.255 port 67 interval 3
>> (xid=0x5538f068)
>> DHCPDISCOVER on ge0-3 to 255.255.255.255 port 67 interval 3
>> (xid=0x5538f068)
>> DHCPDISCOVER on ge0-3 to 255.255.255.255 port 67 interval 7
>> (xid=0x5538f068)
>>
>> [stefan@gw02:~]$ grep -v "\#" /etc/vpp/startup.conf | grep -v -e '^$'
>> unix {
>>   nodaemon
>>   log /var/log/vpp/vpp.log
>>   full-coredump
>>   cli-listen /run/vpp/cli.sock
>>   gid vpp
>>   exec /etc/vpp/bootstrap.vpp
>> }
>> api-trace {
>>   on
>> }
>> api-segment {
>>   gid vpp
>> }
>> socksvr {
>>   default
>> }
>> cpu {
>> main-core 1
>> workers 2
>> skip-cores 0
>> }
>> plugins {
>> plugin lcpng_nl_plugin.so { enable }
>> plugin lcpng_if_plugin.so { enable }
>> }
>> logging {
>>default-syslog-log-level info
>>class linux-cp/if { rate-limit 1 level debug syslog-level debug }
>>class linux-cp/nl { rate-limit 1 level debug syslog-level debug }
>> }
>> lcpng {
>>   lcp-sync
>>   lcp-a

Re: [vpp-dev] How to fetch statistic related data from vpp.

2023-03-02 Thread Pim van Pelt via lists.fd.io
Hoi,

Can you be more specific on 'statistic data extraction' What numbers/data
are you looking for?
Take a look at the 'stats segment' which you might address read-only using
/run/vpp/stats.sock or mount as a FUSE filesystem with
https://s3-docs.fd.io/vpp/22.06/developer/extras/vpp_stats_fs.html or
inspect with a commandline tool *vpp_get_stats* or via Prometheus in
*vpp_prometheus_exporter*

groet,
Pim

On Thu, Mar 2, 2023 at 5:46 PM Dibas Das  wrote:

> Hello community,
>
> I need your help regarding statistic data extraction in vpp.
>
> Any suggestion or reference would be helpful.
>
>
> Thanks,
> Dibas
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22650): https://lists.fd.io/g/vpp-dev/message/22650
Mute This Topic: https://lists.fd.io/mt/97342920/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] failure while building VPP v23.02 in centos 7 VM

2023-03-10 Thread Pim van Pelt via lists.fd.io
Hoi,

Preferred/supported build platform is Ubuntu LTS. It'll build well on
Ubuntu Focal and Jammy. I additionally build and run on Debian Bullseye,
which works well.

groet,
Pim

On Fri, Mar 10, 2023 at 7:41 AM SANDEEP KUMAR 
wrote:

> Thanks for the reply
> Can you let me know which OS type and version is recommended for VPP
> v23.02?
>
> Thanks & Regards,
> Sandeep Kumar
>
> On Fri, Mar 10, 2023 at 12:49 AM Dave Wallace 
> wrote:
>
>> Hi Sandeep,
>>
>> The VPP community no longer supports building on CentOS-7.  The build
>> infrastructure for centos/redhat/rocky OS distros was left in place after
>> support ended, but there are no active maintainers for this build infra nor
>> are there any CI jobs to ensure that it still works.
>>
>> You may get lucky and a community member may chime in, but for the most
>> part you are on your own wrt. getting currently supported VPP releases to
>> build on CentOS-7.
>>
>> Thanks,
>> -daw-
>>
>> On 3/9/2023 11:56 AM, SANDEEP KUMAR wrote:
>>
>> Hi All,
>>
>> I am trying to build VPP v23.02 but getting an issue while performing the 
>> *make
>> install-ext-deps* step in centos 7 VM, so please look at the following
>> issue and help me to resolve it.
>>
>> *Prerequisites:*
>> sudo yum groupinstall "Development Tools"
>> sudo yum install -y numactl-devel libarchive-devel bzip2-devel
>> libpcap-devel libhugetlbfs-utils pciutils pkgconfig libtool ethtool
>> sudo yum -y install libibverbs
>> sudo yum -y groupinstall "Infiniband Support"
>> sudo yum install -y numactl-devel librdmacm-devel libmnl-devel libatomic
>>
>> #Download and install nasm
>> wget https://www.nasm.us/pub/nasm/releasebuilds/2.15/nasm-2.15.tar.gz
>> tar -xzvf nasm-2.15.tar.gz
>> cd nasm-2.15/
>> sh autogen.sh
>> sh configure --prefix=/usr/local/
>> make
>> sudo make install
>> sudo ldconfig
>>
>> #Download and install the latest libpcap
>> git clone https://github.com/the-tcpdump-group/libpcap.git
>> cd libpcap
>> git checkout libpcap-1.10.0
>> ./autogen.sh
>> ./configure
>> make
>> make install
>> sudo ldconfig
>>
>> #Download and build clang with 10.x version
>> git clone -b llvmorg-10.0.1  --depth 1
>> https://github.com/llvm/llvm-project.git
>> cd llvm-project
>> mkdir build && cd build
>> cmake -G "Unix Makefiles"
>> -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra"
>> -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release ../llvm
>> make -j 8
>> sudo make install
>> sudo ldconfig
>>
>> To download the pre-compiled cmake v3.23
>> wget
>> https://github.com/Kitware/CMake/releases/download/v3.23.0-rc4/cmake-3.23.0-rc4-linux-x86_64.tar.gz
>> tar -xzvf cmake-3.23.0-rc4-linux-x86_64.tar.gz
>> cd cmake-3.23.0-rc4-linux-x86_64
>> cp -v ./bin/cmake /usr/local/bin
>> cp -r ./share/cmake-3.23 /usr/local/share
>> sudo ldconfig
>>
>> *Using gcc version 9.3.x while build VPP v23.02*
>> sudo yum install -y centos-release-scl
>> sudo yum install -y devtoolset-9
>> scl enable devtoolset-9 bash
>> [root@localhost vpp]# gcc --version
>> gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
>> Copyright (C) 2019 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>> *Using centos 7 and kernel used*
>> [root@localhost vpp]#* cat /etc/os-release*
>> NAME="CentOS Linux"
>> VERSION="7 (Core)"
>> ID="centos"
>> ID_LIKE="rhel fedora"
>> VERSION_ID="7"
>> PRETTY_NAME="CentOS Linux 7 (Core)"
>> ANSI_COLOR="0;31"
>> CPE_NAME="cpe:/o:centos:centos:7"
>> HOME_URL="https://www.centos.org/";
>> BUG_REPORT_URL="https://bugs.centos.org/";
>>
>> CENTOS_MANTISBT_PROJECT="CentOS-7"
>> CENTOS_MANTISBT_PROJECT_VERSION="7"
>> REDHAT_SUPPORT_PRODUCT="centos"
>> REDHAT_SUPPORT_PRODUCT_VERSION="7"
>>
>> [root@localhost vpp]# *uname -r*
>> 3.10.0-1160.71.1.el7.x86_64
>>
>>
>> *Git clone VPP and build VPP v23.02*
>> git clone https://gerrit.fd.io/r/vpp
>> cd vpp
>> git tag
>> git checkout v23.02
>> make install-deps
>>
>> Following issue coming while performing make install-ext-deps step
>> *make install-ext-deps*
>> *...*
>> *...*
>> *..*
>> Installing
>> /home/centos/download_vpp/vpp/build/external/rpm/tmp/build-dpdk/meson-private/libdpdk.pc
>> to
>> /home/centos/download_vpp/vpp/build/external/rpm/BUILDROOT/vpp-ext-deps-23.02-8.
>> x86_64/opt/vpp/external/x86_64/lib/pkgconfig
>> Running custom install script '/bin/sh
>> /home/centos/download_vpp/vpp/build/external/rpm/tmp/src-dpdk/config/../buildtools/symlink-drivers-solibs.sh
>> lib dpdk/pmds-22.2'
>> --- installing quicly 0.1.4-vpp - log:
>> /home/centos/download_vpp/vpp/build/external/rpm/tmp/quicly.install.log
>> mkdir -p downloads
>> Downloading
>> https://github.com/xdp-project/xdp-tools/releases/download/v1.2.9/xdp-tools-1.2.9.tar.gz
>>   % Total% Received % Xferd  Average Speed   TimeTime Time
>>  Current
>>  Dload  Upload   Total   SpentLeft
>>  Speed
>>   0 00 00

Re: [vpp-dev] VPP LCP Route Not Reflecting After Interface State Change

2023-03-26 Thread Pim van Pelt via lists.fd.io
Hoi,

Does the same behavior happen with linux_cp_plugin and linux_nl_plugin
enabled instead? I saw a change in linux_cp that will walk the fib and
remove routes associated with down interfaces; and I think this is because
FRR does not remove them while Bird does. Can you try with
linux_cp/linux_nl please?

Relevant reading:
https://gerrit.fd.io/r/c/vpp/+/35529
https://gerrit.fd.io/r/c/vpp/+/35530
https://gerrit.fd.io/r/c/vpp/+/35531

groet,
Pim

On Sun, Mar 26, 2023 at 5:33 PM Christopher Adigun 
wrote:

>
> *Hi,*
>
> *I am facing an issue with the LCP route update when a particular
> interface changes state (i.e. when I manually shut it down and when I bring
> it up).*
>
> *Before shutting interface down, below is the state both in FRR and Linux
> table:*
>
> *FRR table:*
>
> ingress-node-vpp-58dcb69b5f-g9rzp:/# vtysh
>
> Hello, this is FRRouting (version 8.5_git).
> Copyright 1996-2005 Kunihiro Ishiguro, et al.
>
> ingress-node-vpp-58dcb69b5f-g9rzp# show ip route
> Codes: K - kernel route, C - connected, S - static, R - RIP,
>O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
>T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
>f - OpenFabric,
>> - selected route, * - FIB route, q - queued, r - rejected, b -
> backup
>t - trapped, o - offload failure
>
> K>* 0.0.0.0/0 [0/0] via 169.254.1.1, eth0, 00:29:12
> C>* 10.0.0.142/32 is directly connected, eth0, 00:29:12
> O   10.0.5.0/24 [110/10] is directly connected, dpdk0, weight 1, 00:29:12
> C>* 10.0.5.0/24 is directly connected, dpdk0, 00:29:12
>
> *O>* 10.0.9.0/24  [110/40] via 192.168.100.2, gre0,
> weight 1, 00:24:19  *  via 192.168.100.6, gre1, weight
> 1, 00:24:19*
> K>* 169.254.1.1/32 [0/0] is directly connected, eth0, 00:29:12
> O   192.168.100.0/30 [110/10] is directly connected, gre0, weight 1,
> 00:24:31
> C>* 192.168.100.0/30 is directly connected, gre0, 00:24:31
> O   192.168.100.4/30 [110/10] is directly connected, gre1, weight 1,
> 00:24:33
> C>* 192.168.100.4/30 is directly connected, gre1, 00:24:33
> O>* 192.168.100.8/30 [110/20] via 192.168.100.2, gre0, weight 1, 00:24:19
> O>* 192.168.100.12/30 [110/20] via 192.168.100.6, gre1, weight 1, 00:24:19
> O>* 192.168.100.16/30 [110/30] via 192.168.100.2, gre0, weight 1, 00:24:19
> O>* 192.168.100.20/30 [110/30] via 192.168.100.6, gre1, weight 1, 00:24:19
>
> *Linux Table:*
> ingress-node-vpp-58dcb69b5f-g9rzp:/# ip r
> default via 169.254.1.1 dev eth0
> 10.0.5.0/24 dev dpdk0 proto kernel scope link src 10.0.5.16
>
>
> *10.0.9.0/24  nhid 22 proto ospf metric 20
> nexthop via 192.168.100.2 dev gre0 weight 1nexthop via
> 192.168.100.6 dev gre1 weight 1*
> 169.254.1.1 dev eth0 scope link
> 192.168.100.0/30 dev gre0 proto kernel scope link src 192.168.100.1
> 192.168.100.4/30 dev gre1 proto kernel scope link src 192.168.100.5
> 192.168.100.8/30 nhid 18 via 192.168.100.2 dev gre0 proto ospf metric 20
> 192.168.100.12/30 nhid 23 via 192.168.100.6 dev gre1 proto ospf metric 20
> 192.168.100.16/30 nhid 18 via 192.168.100.2 dev gre0 proto ospf metric 20
> 192.168.100.20/30 nhid 23 via 192.168.100.6 dev gre1 proto ospf metric 20
>
> *When I manually shut gre0 down, it is removed from the nexthop:*
>
> ingress-node-vpp-58dcb69b5f-g9rzp:/# vtysh
>
> Hello, this is FRRouting (version 8.5_git).
> Copyright 1996-2005 Kunihiro Ishiguro, et al.
>
> ingress-node-vpp-58dcb69b5f-g9rzp#
> ingress-node-vpp-58dcb69b5f-g9rzp#
> ingress-node-vpp-58dcb69b5f-g9rzp# show ip route
> Codes: K - kernel route, C - connected, S - static, R - RIP,
>O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
>T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
>f - OpenFabric,
>> - selected route, * - FIB route, q - queued, r - rejected, b -
> backup
>t - trapped, o - offload failure
>
> K>* 0.0.0.0/0 [0/0] via 169.254.1.1, eth0, 00:37:00
> C>* 10.0.0.142/32 is directly connected, eth0, 00:37:00
> O   10.0.5.0/24 [110/10] is directly connected, dpdk0, weight 1, 00:37:00
> C>* 10.0.5.0/24 is directly connected, dpdk0, 00:37:00
> *O>* 10.0.9.0/24  [110/40] via 192.168.100.6, gre1,
> weight 1, 00:00:06*
> K>* 169.254.1.1/32 [0/0] is directly connected, eth0, 00:37:00
> O>* 192.168.100.0/30 [110/60] via 192.168.100.6, gre1, weight 1, 00:00:06
> O   192.168.100.4/30 [110/10] is directly connected, gre1, weight 1,
> 00:32:21
> C>* 192.168.100.4/30 is directly connected, gre1, 00:32:21
> O>* 192.168.100.8/30 [110/50] via 192.168.100.6, gre1, weight 1, 00:00:06
> O>* 192.168.100.12/30 [110/20] via 192.168.100.6, gre1, weight 1, 00:32:07
> O>* 192.168.100.16/30 [110/40] via 192.168.100.6, gre1, weight 1, 00:00:06
> O>* 192.168.100.20/30 [110/30] via 192.168.100.6, gre1, weight 1, 00:32:07
>
> ingress-node-vpp-58dcb69b5f-g9rzp:/# ip link set dev gre0 down
> ingress-node-vpp-58dcb69b5f-g9rzp:/#
> ingress-node-vpp-58dcb69b5f-g9rzp:/#
> ingress-node-vpp-58dcb69b5f-g9rzp:/#
> ing