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 <future...@gmail.com>
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:
> <LOOPBACK,UP,LOWER_UP> 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 <http://127.0.0.1/8> scope host lo       valid_lft forever
> preferred_lft forever    inet6 ::1/128 scope host       valid_lft forever
> preferred_lft forever2: loop0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000
> qdisc mq state UP group default qlen 1000    link/ether de:ad:00:00:00:00
> brd ff:ff:ff:ff:ff:ff    inet 192.168.163.2/32 <http://192.168.163.2/32>
> scope global loop0       valid_lft forever preferred_lft forever    inet6
> fe80::dcad:ff:fe00:0/64 scope link tentative       valid_lft forever
> preferred_lft forever3: xe0-1: <BROADCAST,MULTICAST> mtu 9001 qdisc mq
> state DOWN group default qlen 1000    link/ether 02:40:0a:84:e3:83 brd
> ff:ff:ff:ff:ff:ff    inet 10.0.5.10/24 <http://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               Idx    State  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
> local0                            0     down          0/0/0/0
> loop0                             3      up          9000/0/0/0     tx
> packets                 65118
>                                                                     tx
> bytes                 2746724
>                                                                     drops
>                      32559
>                                                                     ip6
>                        133
> n6                                2      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 14:22:38:560 notice     nl/nl          Processed 21 messages
> 2022/12/22 14:22:38:560 notice     dpdk           ena_mtu_set(): MTU set
> to: 9004
> 2022/12/22 14:22:38:560 notice     dpdk           ena_mtu_set(): MTU set
> to: 9005
> 2022/12/22 14:22:38:567 info       dpdk           Interface n6 stopped
> 2022/12/22 14:22:38:569 info       dpdk           Probe for interrupt mode
> for device n6. Success.
> 2022/12/22 14:22:38:569 info       *dpdk           Interface n6 started*
> 2022/12/22 14:22:38:570 notice     nl/nl          Processed 21 messages
> 2022/12/22 14:22:38:570 notice     dpdk           ena_mtu_set(): MTU set
> to: 9004
> 2022/12/22 14:22:38:570 notice     dpdk           ena_mtu_set(): MTU set
> to: 9005
> 2022/12/22 14:22:38:577 info      * dpdk           Interface n6 stopped*
> 2022/12/22 14:22:38:580 info       dpdk           Probe for interrupt mode
> for device n6. Success.
> 2022/12/22 14:22:38:580 info       dpdk           Interface n6 started
> 2022/12/22 14:22:38:580 notice     nl/nl          Processed 21 messages
> 2022/12/22 14:22:38:580 notice     dpdk           ena_mtu_set(): MTU set
> to: 9004
> 2022/12/22 14:22:38:580 notice     dpdk           ena_mtu_set(): MTU set
> to: 9005
> 2022/12/22 14:22:38:588 info      * dpdk           Interface n6 stopped*
> 2022/12/22 14:22:38:590 info       dpdk           Probe for interrupt mode
> for device n6. Success.
> 2022/12/22 14:22:38:590 info       dpdk           Interface n6 started
> 2022/12/22 14:22:38:590 notice     nl/nl          Processed 21 messages
> 2022/12/22 14:22:38:590 notice     dpdk           ena_mtu_set(): MTU set
> to: 9004
> 2022/12/22 14:22:38:590 notice     dpdk           ena_mtu_set(): MTU set
> to: 9005
> 2022/12/22 14:22:38:598 info       dpdk           Interface n6 stopped
> 2022/12/22 14:22:38:600 info       dpdk           Probe for interrupt mode
> for device n6. Success.
> 2022/12/22 14:22:38:600 info       dpdk           Interface n6 started
> 2022/12/22 14:22:38:601 notice     nl/nl          Processed 21 messages
> 2022/12/22 14:22:38:601 notice     dpdk           ena_mtu_set(): MTU set
> to: 9004
> 2022/12/22 14:22:38:601 notice     dpdk           ena_mtu_set(): MTU set
> to: 9005
> 2022/12/22 14:22:38:608 info       dpdk           Interface n6 stopped
>
> *This behavior is the same when I am running vpp without using a specific
> namespace (i.e. namespace 0), the xe0-1 (i.e. n6 in vpp) interface does not
> come up*
>
> N.B --- If I disable the linux_nl_plugin.so, the interfaces works without
> any issues
>
>
> On Thu, Dec 22, 2022 at 8:09 AM Petr Boltík <petr.bol...@gmail.com> wrote:
>
>> 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 <
>> 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: <LOOPBACK,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP
>>> group default qlen 1000    link/ether de:ad:00:00:00:00 brd
>>> ff:ff:ff:ff:ff:ff    inet 192.168.163.2/32 <http://192.168.163.2/32> scope
>>> global loop0       valid_lft forever preferred_lft forever    inet6
>>> fe80::dcad:ff:fe00:0/64 scope link       valid_lft forever preferred_lft
>>> forever3: xe0-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state
>>> UNKNOWN group default qlen 1000    link/ether 02:40:0a:84:e3:83 brd
>>> ff:ff:ff:ff:ff:ff    inet 10.0.5.10/24 <http://10.0.5.10/24> scope global
>>> xe0-1       valid_lft forever preferred_lft forever    inet6
>>> 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 <petr.bol...@gmail.com>
>>> 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 <pim=
>>>> 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 0000:00:09.0 {name n6}
>>>>>>  dev 0000: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 <p...@ipng.nl>
>>>>> PBVP1-RIPE - http://www.ipng.nl/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22370): https://lists.fd.io/g/vpp-dev/message/22370
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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to