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

2022-12-22 Thread Christopher Adigun
The repo I used for the lcp is https://github.com/pimvanpelt/lcpng.git

I used the following dockerfile to build the image:





































*FROM ubuntu:20.04ENV DEBIAN_FRONTEND noninteractiveRUN apt-get update &&
apt-get install -y --no-install-recommends \
apt-transport-https \ca-certificates \curl
\gnupg \iproute2 \
iputils-ping \git \libmnl-dev \
make \libmnl-dev \gcc \
build-essential \python3 \sudo \&&
rm -rf /var/lib/apt/lists/*RUN set -eux; \mkdir ~/src;cd ~/src; \
  git clone https://gerrit.fd.io/r/vpp ; \
  cd vpp;git checkout remotes/origin/stable/2202; \cd ~/src;git
clone https://github.com/pimvanpelt/lcpng.git;ln
 -s ~/src/lcpng
~/src/vpp/src/plugins/lcpng;cd ~/src/vpp; \yes | make
install-deps;yes | make install-ext-deps;yes | make build-release;yes |
make pkg-deb; \dpkg -i build-root/*.deb; \dpkg-query -f
'${Version}\n' -W vpp > /software-versions; \rm -rf
build-root/*.deb; \rm -rf /var/lib/apt/lists/*; \cd ~; \
rm -rf /vpp;RUN mkdir -p /var/log/vppCMD ["/usr/bin/vpp", "-c",
"/etc/vpp/startup.conf"]*

I used the sample startup.conf from your blog article
https://ipng.ch/s/articles/2021/12/23/vpp-playground.html

plugins {
  plugin lcpng_nl_plugin.so { enable }
  plugin lcpng_if_plugin.so { enable }
}

lcpng {
  lcp-sync
  lcp-auto-subint
}


On Thu, Dec 22, 2022 at 4:21 PM Pim van Pelt via lists.fd.io  wrote:

> 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 (#22377): https://lists.fd.io/g/vpp-dev/message/22377
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]
-=-=-=-=-=-=-=-=-=-=-=-



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

2022-12-22 Thread Christopher Adigun
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.

This means the official release has an issue like you said.

Thanks for your help!

On Thu, Dec 22, 2022 at 12:05 PM Petr Boltík  wrote:

>
>
> čt 22. 12. 2022 v 17:45 odesílatel Christopher Adigun 
> napsal:
>
>> Can you share the git commit id that you used for your 22.10 because I
>> have tried  *configuration in startup.conf "linux-cp { default netns
>> dataplane }"* but it is still not working.
>>
>> I have also tried *22.06* and *23.02-rc0~127*, it's the same issue.
>>
>>
> What is not working? Syncing routes or the interface is still down? If you
> configure netns in the startup.conf below the plugin section, you should be
> to see configured netns in "vppctl show lcp".
>
> linux-nl 22.06
> https://s3-docs.fd.io/vpp/22.06/aboutvpp/releasenotes/v22.06.html
>
> If you are interested, you can try my or pim integration.
>
>
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22375): https://lists.fd.io/g/vpp-dev/message/22375
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 Petr Boltík
čt 22. 12. 2022 v 17:45 odesílatel Christopher Adigun 
napsal:

> Can you share the git commit id that you used for your 22.10 because I
> have tried  *configuration in startup.conf "linux-cp { default netns
> dataplane }"* but it is still not working.
>
> I have also tried *22.06* and *23.02-rc0~127*, it's the same issue.
>
>
What is not working? Syncing routes or the interface is still down? If you
configure netns in the startup.conf below the plugin section, you should be
to see configured netns in "vppctl show lcp".

linux-nl 22.06
https://s3-docs.fd.io/vpp/22.06/aboutvpp/releasenotes/v22.06.html

If you are interested, you can try my or pim integration.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22374): https://lists.fd.io/g/vpp-dev/message/22374
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 Christopher Adigun
Can you share the git commit id that you used for your 22.10 because I have
tried  *configuration in startup.conf "linux-cp { default netns dataplane
}"* but it is still not working.

I have also tried *22.06* and *23.02-rc0~127*, it's the same issue.

Also which version of vpp was the *linux_nl_plugin.so* added? Trying to see
if I can build the image manually and test.

On Thu, Dec 22, 2022 at 10:36 AM Petr Boltík  wrote:

> Hi Matt
>
> I can confirm for VPP 22.10
> - command "vppctl lcp default netns dataplane" enable synchronizing
> interfaces, synchronizing routes fail
> - configuration in startup.conf "linux-cp { default netns dataplane }"
> works fine for interfaces and routing
>
> Petr
>
> čt 22. 12. 2022 v 16:08 odesílatel Matthew Smith via lists.fd.io  netgate@lists.fd.io> napsal:
>
>>
>> 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.
>>
>> -Matt
>>
>>
>>
>>> čt 22. 12. 2022 v 13:53 odesílatel Christopher Adigun <
>>> future...@gmail.com> napsal:
>>>
 Hi Petr,

 Thanks for the response, bird is actually running in the dataplane ns:

 root@nat-gw-697d886cb4-xn62q:/etc/bird# *ip netns exec dataplane ip a*
 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
 group default qlen 1000
 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
 inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
 inet6 ::1/128 scope host
valid_lft forever preferred_lft forever











 *2: loop0:  mtu 9000 qdisc mq state UP
 group default qlen 1000link/ether de:ad:00:00:00:00 brd
 ff:ff:ff:ff:ff:ffinet 192.168.163.2/32  scope
 global loop0   valid_lft forever preferred_lft foreverinet6
 fe80::dcad:ff:fe00:0/64 scope link   valid_lft forever preferred_lft
 forever3: xe0-1:  mtu 9001 qdisc mq state
 UNKNOWN group default qlen 1000link/ether 02:40:0a:84:e3:83 brd
 ff:ff:ff:ff:ff:ffinet 10.0.5.10/24  scope global
 xe0-1   valid_lft forever preferred_lft foreverinet6
 fe80::40:aff:fe84:e383/64 scope link   valid_lft forever preferred_lft
 forever*
 root@nat-gw-697d886cb4-xn62q:/etc/bird#
 root@nat-gw-697d886cb4-xn62q:/etc/bird#
 root@nat-gw-697d886cb4-xn62q:/etc/bird# ip netns exec *dataplane *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

 One other thing, I am running this in a kubernetes POD, maybe this
 might be affecting something.

 Also can you clarify how to perform *plugin "linux_nl_plugin.so"
 ignore "lcp default netns" configuration?* Should this be placed in
 the startup.conf or init.conf?
 I want to test without netns, I tried the following in the startup
 config but vpp was crashing

 plugin "linux_nl_plugin.so" {
   ignore "lcp default netns"
 }

 I also tried using the full command in init.conf but that did not work.


 On Thu, Dec 22, 2022 at 4:22 AM Petr Boltík 
 wrote:

> Hi,
>
> there can be a few misconfigurations:
> 1. "lcp default netns dataplane" start synchronizing
> interfaces/address/etc inside netns "dataplane" (netns "dataplane" must
> exist) - NOT synchronizing routes
> 2. plugin "linux_nl_plugin.so" ignore "lcp default netns"
> configuration =>  "linux_nl_plugin.so" will synchronize VPP with default
> namespace "0"
>
> Solution with netns:
> 0. Create netns "dataplane" with systemd
> 1. run VPP inside netns "dataplane" (edit systemd, start after
> previous point)
> 2. run Bird inside netns "dataplane" (edit systemd, start after
> previous point)
> 3. do not use "lcp default netns dataplane", it is controlled by VPP
> netns
>
> For running without netns only skip "lcp default netns dataplane".
>
> Petr
>
> čt 22. 12. 2022 v 10:07 odesílatel Pim van Pelt via lists.fd.io  ipng...@lists.fd.io> napsal:
>
>> Hoi,
>>
>> Is bird running in the 'dataplane' network namespace ?
>>
>> groet,
>> Pim
>>
>> On Thu, Dec 22, 2022 at 12:52 AM Christopher Adigun <
>> 

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

2022-12-22 Thread Petr Boltík
Hi Matt

I can confirm for VPP 22.10
- command "vppctl lcp default netns dataplane" enable synchronizing
interfaces, synchronizing routes fail
- configuration in startup.conf "linux-cp { default netns dataplane }"
works fine for interfaces and routing

Petr

čt 22. 12. 2022 v 16:08 odesílatel Matthew Smith via lists.fd.io  napsal:

>
> 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.
>
> -Matt
>
>
>
>> čt 22. 12. 2022 v 13:53 odesílatel Christopher Adigun <
>> future...@gmail.com> napsal:
>>
>>> Hi Petr,
>>>
>>> Thanks for the response, bird is actually running in the dataplane ns:
>>>
>>> root@nat-gw-697d886cb4-xn62q:/etc/bird# *ip netns exec dataplane ip a*
>>> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
>>> group default qlen 1000
>>> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>>> inet 127.0.0.1/8 scope host lo
>>>valid_lft forever preferred_lft forever
>>> inet6 ::1/128 scope host
>>>valid_lft forever preferred_lft forever
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *2: loop0:  mtu 9000 qdisc mq state UP
>>> group default qlen 1000link/ether de:ad:00:00:00:00 brd
>>> ff:ff:ff:ff:ff:ffinet 192.168.163.2/32  scope
>>> global loop0   valid_lft forever preferred_lft foreverinet6
>>> fe80::dcad:ff:fe00:0/64 scope link   valid_lft forever preferred_lft
>>> forever3: xe0-1:  mtu 9001 qdisc mq state
>>> UNKNOWN group default qlen 1000link/ether 02:40:0a:84:e3:83 brd
>>> ff:ff:ff:ff:ff:ffinet 10.0.5.10/24  scope global
>>> xe0-1   valid_lft forever preferred_lft foreverinet6
>>> fe80::40:aff:fe84:e383/64 scope link   valid_lft forever preferred_lft
>>> forever*
>>> root@nat-gw-697d886cb4-xn62q:/etc/bird#
>>> root@nat-gw-697d886cb4-xn62q:/etc/bird#
>>> root@nat-gw-697d886cb4-xn62q:/etc/bird# ip netns exec *dataplane *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
>>>
>>> One other thing, I am running this in a kubernetes POD, maybe this might
>>> be affecting something.
>>>
>>> Also can you clarify how to perform *plugin "linux_nl_plugin.so" ignore
>>> "lcp default netns" configuration?* Should this be placed in the
>>> startup.conf or init.conf?
>>> I want to test without netns, I tried the following in the startup
>>> config but vpp was crashing
>>>
>>> plugin "linux_nl_plugin.so" {
>>>   ignore "lcp default netns"
>>> }
>>>
>>> I also tried using the full command in init.conf but that did not work.
>>>
>>>
>>> On Thu, Dec 22, 2022 at 4:22 AM Petr Boltík 
>>> wrote:
>>>
 Hi,

 there can be a few misconfigurations:
 1. "lcp default netns dataplane" start synchronizing
 interfaces/address/etc inside netns "dataplane" (netns "dataplane" must
 exist) - NOT synchronizing routes
 2. plugin "linux_nl_plugin.so" ignore "lcp default netns" configuration
 =>  "linux_nl_plugin.so" will synchronize VPP with default namespace "0"

 Solution with netns:
 0. Create netns "dataplane" with systemd
 1. run VPP inside netns "dataplane" (edit systemd, start after previous
 point)
 2. run Bird inside netns "dataplane" (edit systemd, start after
 previous point)
 3. do not use "lcp default netns dataplane", it is controlled by VPP
 netns

 For running without netns only skip "lcp default netns dataplane".

 Petr

 čt 22. 12. 2022 v 10:07 odesílatel Pim van Pelt via lists.fd.io >>> ipng...@lists.fd.io> napsal:

> Hoi,
>
> Is bird running in the 'dataplane' network namespace ?
>
> groet,
> Pim
>
> On Thu, Dec 22, 2022 at 12:52 AM Christopher Adigun <
> future...@gmail.com> 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

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 Petr Boltík
I'm so sorry ... this is a new issue. I don't know why the lcp tap
interface goes down.

Can you start it manually?
1. remove command:
lcp default netns 'dataplane' (do not use it when VPP already runs in a
specific namespace)
lcp lcp-sync on
lcp lcp-auto-subint on
2. add ip address inside VPP
vppctl set interface ip address n6 10.0.5.10/24
vppctl set interface state n6 up
vppctl lcp create n6 host-if n6
3. configure linux
ip netns exec dataplane ip addr add 10.0.5.10/24 dev n6
ip netns exec dataplane ip link set dev n6 up

If it does not work, I have no idea. I have never met this issue.

Petr

čt 22. 12. 2022 v 15:34 odesílatel Christopher Adigun 
napsal:

> Now when I start both bird and vpp in the dataplane netns, the dpdk
> interface goes into down state in the dataplane nents:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *root@nat-gw-55896dc777-cxld2:/vpp# ip netns exec dataplane ip a1: lo:
>  mtu 65536 qdisc noqueue state UNKNOWN group default
> qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet
> 127.0.0.1/8  scope host lo   valid_lft forever
> preferred_lft foreverinet6 ::1/128 scope host   valid_lft forever
> preferred_lft forever2: loop0:  mtu 9000
> qdisc mq state UP group default qlen 1000link/ether de:ad:00:00:00:00
> brd ff:ff:ff:ff:ff:ffinet 192.168.163.2/32 
> scope global loop0   valid_lft forever preferred_lft foreverinet6
> fe80::dcad:ff:fe00:0/64 scope link tentative   valid_lft forever
> preferred_lft forever3: xe0-1:  mtu 9001 qdisc mq
> state DOWN group default qlen 1000link/ether 02:40:0a:84:e3:83 brd
> ff:ff:ff:ff:ff:ffinet 10.0.5.10/24  scope global
> xe0-1   valid_lft forever preferred_lft forever*
>
> In VPP, all the interfaces are up:
>
> vpp# show int
>   Name   IdxState  MTU (L3/IP4/IP6/MPLS)
> Counter  Count
> internet  1  up  9001/0/0/0 rx
> packets 7
> rx
> bytes 294
> tx
> packets 1
> tx
> bytes  42
> drops
>  7
> local00 down  0/0/0/0
> loop0 3  up  9000/0/0/0 tx
> packets 65118
> tx
> bytes 2746724
> drops
>  32559
> ip6
>133
> n62  up  9001/0/0/0 rx
> packets 5
> rx
> bytes 306
> tx
> packets 1
> tx
> bytes  90
> drops
>  2
> ip4
>  3
>
> tx-error   1
> tap2  5  up  9001/0/0/0 rx
> packets 2
> rx
> bytes 176
> tx
> packets 3
> tx
> bytes 222
> drops
>  1
> ip6
>  2
> tap3  4  up  9000/0/0/0 rx
> packets   133
> rx
> bytes   11470
> ip6
>133
> vpp#
> vpp#
> vpp# show lcp
> lcp default netns 'dataplane'
> lcp lcp-auto-subint on
> lcp lcp-sync on
> lcp del-static-on-link-down off
> lcp del-dynamic-on-link-down off
> itf-pair: [0] loop0 tap3 loop0 2 type tap netns dataplane
> itf-pair: [1] n6 tap2 xe0-1 3 type tap netns dataplane
>
> But in the vpp logs, n6 interfaces keeps going off
>
> 2022/12/22 14:22:38:540 notice nl/nl  Processed 21 messages
> 2022/12/22 14:22:38:540 

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

2022-12-22 Thread Matthew Smith via lists.fd.io
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.

-Matt



> čt 22. 12. 2022 v 13:53 odesílatel Christopher Adigun 
> napsal:
>
>> Hi Petr,
>>
>> Thanks for the response, bird is actually running in the dataplane ns:
>>
>> root@nat-gw-697d886cb4-xn62q:/etc/bird# *ip netns exec dataplane ip a*
>> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group
>> default qlen 1000
>> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>> inet 127.0.0.1/8 scope host lo
>>valid_lft forever preferred_lft forever
>> inet6 ::1/128 scope host
>>valid_lft forever preferred_lft forever
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *2: loop0:  mtu 9000 qdisc mq state UP
>> group default qlen 1000link/ether de:ad:00:00:00:00 brd
>> ff:ff:ff:ff:ff:ffinet 192.168.163.2/32  scope
>> global loop0   valid_lft forever preferred_lft foreverinet6
>> fe80::dcad:ff:fe00:0/64 scope link   valid_lft forever preferred_lft
>> forever3: xe0-1:  mtu 9001 qdisc mq state
>> UNKNOWN group default qlen 1000link/ether 02:40:0a:84:e3:83 brd
>> ff:ff:ff:ff:ff:ffinet 10.0.5.10/24  scope global
>> xe0-1   valid_lft forever preferred_lft foreverinet6
>> fe80::40:aff:fe84:e383/64 scope link   valid_lft forever preferred_lft
>> forever*
>> root@nat-gw-697d886cb4-xn62q:/etc/bird#
>> root@nat-gw-697d886cb4-xn62q:/etc/bird#
>> root@nat-gw-697d886cb4-xn62q:/etc/bird# ip netns exec *dataplane *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
>>
>> One other thing, I am running this in a kubernetes POD, maybe this might
>> be affecting something.
>>
>> Also can you clarify how to perform *plugin "linux_nl_plugin.so" ignore
>> "lcp default netns" configuration?* Should this be placed in the
>> startup.conf or init.conf?
>> I want to test without netns, I tried the following in the startup config
>> but vpp was crashing
>>
>> plugin "linux_nl_plugin.so" {
>>   ignore "lcp default netns"
>> }
>>
>> I also tried using the full command in init.conf but that did not work.
>>
>>
>> On Thu, Dec 22, 2022 at 4:22 AM Petr Boltík 
>> wrote:
>>
>>> Hi,
>>>
>>> there can be a few misconfigurations:
>>> 1. "lcp default netns dataplane" start synchronizing
>>> interfaces/address/etc inside netns "dataplane" (netns "dataplane" must
>>> exist) - NOT synchronizing routes
>>> 2. plugin "linux_nl_plugin.so" ignore "lcp default netns" configuration
>>> =>  "linux_nl_plugin.so" will synchronize VPP with default namespace "0"
>>>
>>> Solution with netns:
>>> 0. Create netns "dataplane" with systemd
>>> 1. run VPP inside netns "dataplane" (edit systemd, start after previous
>>> point)
>>> 2. run Bird inside netns "dataplane" (edit systemd, start after previous
>>> point)
>>> 3. do not use "lcp default netns dataplane", it is controlled by VPP
>>> netns
>>>
>>> For running without netns only skip "lcp default netns dataplane".
>>>
>>> Petr
>>>
>>> čt 22. 12. 2022 v 10:07 odesílatel Pim van Pelt via lists.fd.io >> ipng...@lists.fd.io> napsal:
>>>
 Hoi,

 Is bird running in the 'dataplane' network namespace ?

 groet,
 Pim

 On Thu, Dec 22, 2022 at 12:52 AM Christopher Adigun <
 future...@gmail.com> 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 

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

2022-12-22 Thread Christopher Adigun
Now when I start both bird and vpp in the dataplane netns, the dpdk
interface goes into down state in the dataplane nents:

















*root@nat-gw-55896dc777-cxld2:/vpp# ip netns exec dataplane ip a1: lo:
 mtu 65536 qdisc noqueue state UNKNOWN group default
qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet
127.0.0.1/8  scope host lo   valid_lft forever
preferred_lft foreverinet6 ::1/128 scope host   valid_lft forever
preferred_lft forever2: loop0:  mtu 9000
qdisc mq state UP group default qlen 1000link/ether de:ad:00:00:00:00
brd ff:ff:ff:ff:ff:ffinet 192.168.163.2/32 
scope global loop0   valid_lft forever preferred_lft foreverinet6
fe80::dcad:ff:fe00:0/64 scope link tentative   valid_lft forever
preferred_lft forever3: xe0-1:  mtu 9001 qdisc mq
state DOWN group default qlen 1000link/ether 02:40:0a:84:e3:83 brd
ff:ff:ff:ff:ff:ffinet 10.0.5.10/24  scope global
xe0-1   valid_lft forever preferred_lft forever*

In VPP, all the interfaces are up:

vpp# show int
  Name   IdxState  MTU (L3/IP4/IP6/MPLS)
Counter  Count
internet  1  up  9001/0/0/0 rx
packets 7
rx
bytes 294
tx
packets 1
tx
bytes  42
drops
   7
local00 down  0/0/0/0
loop0 3  up  9000/0/0/0 tx
packets 65118
tx
bytes 2746724
drops
   32559
ip6
 133
n62  up  9001/0/0/0 rx
packets 5
rx
bytes 306
tx
packets 1
tx
bytes  90
drops
   2
ip4
   3

tx-error   1
tap2  5  up  9001/0/0/0 rx
packets 2
rx
bytes 176
tx
packets 3
tx
bytes 222
drops
   1
ip6
   2
tap3  4  up  9000/0/0/0 rx
packets   133
rx
bytes   11470
ip6
 133
vpp#
vpp#
vpp# show lcp
lcp default netns 'dataplane'
lcp lcp-auto-subint on
lcp lcp-sync on
lcp del-static-on-link-down off
lcp del-dynamic-on-link-down off
itf-pair: [0] loop0 tap3 loop0 2 type tap netns dataplane
itf-pair: [1] n6 tap2 xe0-1 3 type tap netns dataplane

But in the vpp logs, n6 interfaces keeps going off

2022/12/22 14:22:38:540 notice nl/nl  Processed 21 messages
2022/12/22 14:22:38:540 notice dpdk   ena_mtu_set(): MTU set
to: 9004
2022/12/22 14:22:38:540 notice dpdk   ena_mtu_set(): MTU set
to: 9005
2022/12/22 14:22:38:547 info   dpdk   Interface n6 stopped
2022/12/22 14:22:38:549 info   dpdk   Probe for interrupt mode
for device n6. Success.
2022/12/22 14:22:38:549 info   dpdk   Interface n6 started
2022/12/22 14:22:38:550 notice nl/nl  Processed 21 messages
2022/12/22 14:22:38:550 notice dpdk   ena_mtu_set(): MTU set
to: 9004
2022/12/22 14:22:38:550 notice dpdk   ena_mtu_set(): MTU set
to: 9005
2022/12/22 14:22:38:557 info   dpdk   Interface n6 stopped
2022/12/22 14:22:38:559 info   dpdk   Probe for interrupt mode
for device n6. Success.
2022/12/22 14:22:38:559 info *  dpdk   Interface n6 started*
2022/12/22 

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

2022-12-22 Thread agv100
Hello,

The current build (22.10, cross-compiled via SolidRun toolchain) crashes 
without dependency to optimization level, and, with debug enabled. shows the 
following:

Thread 1 "vpp_main" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0xf6d7caac in __GI_abort () at abort.c:79
#2  0x00406fe4 in os_panic () at /work/build/vpp/src/vpp/vnet/main.c:416
#3  0xf6fa6514 in debugger () at /work/build/vpp/src/vppinfra/error.c:84
#4  0xf6fa6874 in _clib_error (how_to_die=2, 
function_name=0xf7173978 <__FUNCTION__.32141> 
"vlib_buffer_validate_alloc_free", line_number=333,
fmt=0xf7173438 "%s %U buffer 0x%x") at 
/work/build/vpp/src/vppinfra/error.c:143
#5  0xf70c1218 in vlib_buffer_validate_alloc_free (vm=0xb6d5c740, 
buffers=0xb4bac810, n_buffers=1, expected_state=VLIB_BUFFER_KNOWN_ALLOCATED)
at /work/build/vpp/src/vlib/buffer.c:332
#6  0xf716afc4 in vlib_buffer_pool_put (vm=0xb6d5c740, 
buffer_pool_index=0 '\000', buffers=0xb4bac810, n_buffers=1)
at /work/build/vpp/src/vlib/buffer_funcs.h:731
#7  0xf716b75c in vlib_buffer_free_inline (vm=0xb6d5c740, 
buffers=0xb88bd1d4, n_buffers=0, maybe_next=1) at 
/work/build/vpp/src/vlib/buffer_funcs.h:917
#8  0xf716b7c8 in vlib_buffer_free (vm=0xb6d5c740, 
buffers=0xb88bd1d0, n_buffers=1) at 
/work/build/vpp/src/vlib/buffer_funcs.h:936
#9  0xf716c424 in process_drop_punt (vm=0xb6d5c740, 
node=0xb7844300, frame=0xb88bd1c0, disposition=ERROR_DISPOSITION_DROP)
at /work/build/vpp/src/vlib/drop.c:235
#10 0xf716c4fc in error_drop_node_fn_cortexa72 (vm=0xb6d5c740, 
node=0xb7844300, frame=0xb88bd1c0) at 
/work/build/vpp/src/vlib/drop.c:251
#11 0xf70f512c in dispatch_node (vm=0xb6d5c740, 
node=0xb7844300, type=VLIB_NODE_TYPE_INTERNAL, 
dispatch_state=VLIB_NODE_STATE_POLLING, frame=0xb88bd1c0,
last_time_stamp=233164692224) at /work/build/vpp/src/vlib/main.c:960
#12 0xf70f585c in dispatch_pending_node (vm=0xb6d5c740, 
pending_frame_index=4, last_time_stamp=233164692224) at 
/work/build/vpp/src/vlib/main.c:1119
#13 0xf70f6be8 in vlib_main_or_worker_loop (vm=0xb6d5c740, 
is_main=1) at /work/build/vpp/src/vlib/main.c:1588
#14 0xf70f71ec in vlib_main_loop (vm=0xb6d5c740) at 
/work/build/vpp/src/vlib/main.c:1716
#15 0xf70f7d1c in vlib_main (vm=0xb6d5c740, input=0xb4badfc8) 
at /work/build/vpp/src/vlib/main.c:2010
#16 0xf7145044 in thread0 (arg=281473749206848) at 
/work/build/vpp/src/vlib/unix/main.c:667
#17 0xf6fb84c0 in clib_calljmp () at 
/work/build/vpp/src/vppinfra/longjmp.S:809
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22367): https://lists.fd.io/g/vpp-dev/message/22367
Mute This Topic: https://lists.fd.io/mt/95380982/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 Petr Boltík
Hi,

- there is no " ignore lcp default netns" declaration in startup.conf or
init.conf. If you start VPP(systemctl vpp start) with no netns configured,
plugin linux_nl_plugin.so will not sync correct routing table and fail.
- If you run the entire VPP process inside netns dataplane, you can skip
configuration line "lcp default netns dataplane".
- 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.

Petr.



čt 22. 12. 2022 v 13:53 odesílatel Christopher Adigun 
napsal:

> Hi Petr,
>
> Thanks for the response, bird is actually running in the dataplane ns:
>
> root@nat-gw-697d886cb4-xn62q:/etc/bird# *ip netns exec dataplane ip a*
> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group
> default qlen 1000
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
>valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host
>valid_lft forever preferred_lft forever
>
>
>
>
>
>
>
>
>
>
>
> *2: loop0:  mtu 9000 qdisc mq state UP
> group default qlen 1000link/ether de:ad:00:00:00:00 brd
> ff:ff:ff:ff:ff:ffinet 192.168.163.2/32  scope
> global loop0   valid_lft forever preferred_lft foreverinet6
> fe80::dcad:ff:fe00:0/64 scope link   valid_lft forever preferred_lft
> forever3: xe0-1:  mtu 9001 qdisc mq state
> UNKNOWN group default qlen 1000link/ether 02:40:0a:84:e3:83 brd
> ff:ff:ff:ff:ff:ffinet 10.0.5.10/24  scope global
> xe0-1   valid_lft forever preferred_lft foreverinet6
> fe80::40:aff:fe84:e383/64 scope link   valid_lft forever preferred_lft
> forever*
> root@nat-gw-697d886cb4-xn62q:/etc/bird#
> root@nat-gw-697d886cb4-xn62q:/etc/bird#
> root@nat-gw-697d886cb4-xn62q:/etc/bird# ip netns exec *dataplane *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
>
> One other thing, I am running this in a kubernetes POD, maybe this might
> be affecting something.
>
> Also can you clarify how to perform *plugin "linux_nl_plugin.so" ignore
> "lcp default netns" configuration?* Should this be placed in the
> startup.conf or init.conf?
> I want to test without netns, I tried the following in the startup config
> but vpp was crashing
>
> plugin "linux_nl_plugin.so" {
>   ignore "lcp default netns"
> }
>
> I also tried using the full command in init.conf but that did not work.
>
>
> On Thu, Dec 22, 2022 at 4:22 AM Petr Boltík  wrote:
>
>> Hi,
>>
>> there can be a few misconfigurations:
>> 1. "lcp default netns dataplane" start synchronizing
>> interfaces/address/etc inside netns "dataplane" (netns "dataplane" must
>> exist) - NOT synchronizing routes
>> 2. plugin "linux_nl_plugin.so" ignore "lcp default netns" configuration
>> =>  "linux_nl_plugin.so" will synchronize VPP with default namespace "0"
>>
>> Solution with netns:
>> 0. Create netns "dataplane" with systemd
>> 1. run VPP inside netns "dataplane" (edit systemd, start after previous
>> point)
>> 2. run Bird inside netns "dataplane" (edit systemd, start after previous
>> point)
>> 3. do not use "lcp default netns dataplane", it is controlled by VPP netns
>>
>> For running without netns only skip "lcp default netns dataplane".
>>
>> Petr
>>
>> čt 22. 12. 2022 v 10:07 odesílatel Pim van Pelt via lists.fd.io > ipng...@lists.fd.io> napsal:
>>
>>> 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 

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

2022-12-22 Thread Christopher Adigun
Hi Petr,

Thanks for the response, bird is actually running in the dataplane ns:

root@nat-gw-697d886cb4-xn62q:/etc/bird# *ip netns exec dataplane ip a*
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever











*2: loop0:  mtu 9000 qdisc mq state UP
group default qlen 1000link/ether de:ad:00:00:00:00 brd
ff:ff:ff:ff:ff:ffinet 192.168.163.2/32  scope
global loop0   valid_lft forever preferred_lft foreverinet6
fe80::dcad:ff:fe00:0/64 scope link   valid_lft forever preferred_lft
forever3: xe0-1:  mtu 9001 qdisc mq state
UNKNOWN group default qlen 1000link/ether 02:40:0a:84:e3:83 brd
ff:ff:ff:ff:ff:ffinet 10.0.5.10/24  scope global
xe0-1   valid_lft forever preferred_lft foreverinet6
fe80::40:aff:fe84:e383/64 scope link   valid_lft forever preferred_lft
forever*
root@nat-gw-697d886cb4-xn62q:/etc/bird#
root@nat-gw-697d886cb4-xn62q:/etc/bird#
root@nat-gw-697d886cb4-xn62q:/etc/bird# ip netns exec *dataplane *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

One other thing, I am running this in a kubernetes POD, maybe this might be
affecting something.

Also can you clarify how to perform *plugin "linux_nl_plugin.so" ignore
"lcp default netns" configuration?* Should this be placed in the
startup.conf or init.conf?
I want to test without netns, I tried the following in the startup config
but vpp was crashing

plugin "linux_nl_plugin.so" {
  ignore "lcp default netns"
}

I also tried using the full command in init.conf but that did not work.


On Thu, Dec 22, 2022 at 4:22 AM Petr Boltík  wrote:

> Hi,
>
> there can be a few misconfigurations:
> 1. "lcp default netns dataplane" start synchronizing
> interfaces/address/etc inside netns "dataplane" (netns "dataplane" must
> exist) - NOT synchronizing routes
> 2. plugin "linux_nl_plugin.so" ignore "lcp default netns" configuration
> =>  "linux_nl_plugin.so" will synchronize VPP with default namespace "0"
>
> Solution with netns:
> 0. Create netns "dataplane" with systemd
> 1. run VPP inside netns "dataplane" (edit systemd, start after previous
> point)
> 2. run Bird inside netns "dataplane" (edit systemd, start after previous
> point)
> 3. do not use "lcp default netns dataplane", it is controlled by VPP netns
>
> For running without netns only skip "lcp default netns dataplane".
>
> Petr
>
> čt 22. 12. 2022 v 10:07 odesílatel Pim van Pelt via lists.fd.io  ipng...@lists.fd.io> napsal:
>
>> 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:
>>> 

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

2022-12-22 Thread Petr Boltík
Hi,

there can be a few misconfigurations:
1. "lcp default netns dataplane" start synchronizing interfaces/address/etc
inside netns "dataplane" (netns "dataplane" must exist) - NOT synchronizing
routes
2. plugin "linux_nl_plugin.so" ignore "lcp default netns" configuration =>
"linux_nl_plugin.so" will synchronize VPP with default namespace "0"

Solution with netns:
0. Create netns "dataplane" with systemd
1. run VPP inside netns "dataplane" (edit systemd, start after previous
point)
2. run Bird inside netns "dataplane" (edit systemd, start after previous
point)
3. do not use "lcp default netns dataplane", it is controlled by VPP netns

For running without netns only skip "lcp default netns dataplane".

Petr

čt 22. 12. 2022 v 10:07 odesílatel Pim van Pelt via lists.fd.io  napsal:

> 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 (#22363): https://lists.fd.io/g/vpp-dev/message/22363
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,

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] Way to send api message from vpp to govpp

2022-12-22 Thread Benoit Ganne (bganne) via lists.fd.io
> We want to push some monitoring information from vpp to govpp based on
> some condition. Please help me to know if there is any procedure through
> which we can meet this requirement as there is no request from agent in
> this case.

You can register for events, see src/vnet/ip-neighbor/ip_neighbor.api 
want_ip_neighbor_events_v2 for example.

Best
ben

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22360): https://lists.fd.io/g/vpp-dev/message/22360
Mute This Topic: https://lists.fd.io/mt/95821406/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]
-=-=-=-=-=-=-=-=-=-=-=-