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

2023-02-08 Thread Gennady Abramov
Hello Stanislav,

Sorry for late answer, I was temporary deprived of my testbed :-)

So, applied patches:
1. Last patch attached to this thread
2. Patch from Gerrit from above.

Looks everything working now. OSI/IS-IS packets are passed to CP, routing 
protocol working.
Issue with VPP crash after .1q subif via auto-subint disappeared.

Issue with spontaneous host interface down when lcp lcp-sync enabled also was 
never repeated, but I am not sure if it is related to is-is or not. Colleagues 
reported it was seen on unpatched version, but this was not confirmed and since 
that OS kernel was changed.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22568): https://lists.fd.io/g/vpp-dev/message/22568
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 LCP: IS-IS does not work

2023-02-02 Thread Stanislav Zaikin
Hello Gennady,

Could you try again with this patch[0]?

[0] - https://gerrit.fd.io/r/c/vpp/+/38118

On Wed, 1 Feb 2023 at 19:38, Gennady Abramov  wrote:

> Hello Stanislav,
>
> Here is it!
>
> 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)
> (gdb) f 9
> #9  0x7fffaf404b6a in lcp_router_link_add (rl=0x5a38e0,
> ctx=0x7fffbb9add18) at
> /home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_router.c:423
> 423   if (vnet_create_sub_interface
> (lip->lip_host_sw_if_index, vlan, 18,
> (gdb) info locals
> lip = 0x7fffbb9abd70
> if_name = 0x0
> sub_phy_sw_if_index = 3
> sub_host_sw_if_index = 8
> vlan = 1914
> ns = 0x0
> if_namev = 0xf90b93202e1d7baf  0xf90b93202e1d7baf>
> lipi = 0
> up = 0
> vnm = 0x77f696e8 
> (gdb) p lipi
> $1 = 0
> (gdb) p *lip
> $2 = {lip_host_sw_if_index = 1745050366, lip_phy_sw_if_index = 32767,
> lip_host_name = 0x43 ,
> lip_vif_index = 1,
>   lip_namespace = 0x50005 "", lip_host_type = (LCP_ITF_HOST_TUN |
> unknown: 4294967294), lip_phy_adjs = {adj_index = {0, 0}}, lip_flags =
> (unknown: 0),
>   lip_rewrite_len = 0 '\000', lip_create_ts = 0}
> (gdb)
> 
>
>

-- 
Best regards
Stanislav Zaikin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22537): https://lists.fd.io/g/vpp-dev/message/22537
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 LCP: IS-IS does not work

2023-02-01 Thread Gennady Abramov
Hello Stanislav,

Here is it!

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)
(gdb) f 9
#9  0x7fffaf404b6a in lcp_router_link_add (rl=0x5a38e0, ctx=0x7fffbb9add18) 
at /home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_router.c:423
423   if (vnet_create_sub_interface (lip->lip_host_sw_if_index, 
vlan, 18,
(gdb) info locals
lip = 0x7fffbb9abd70
if_name = 0x0
sub_phy_sw_if_index = 3
sub_host_sw_if_index = 8
vlan = 1914
ns = 0x0
if_namev = 0xf90b93202e1d7baf 
lipi = 0
up = 0
vnm = 0x77f696e8 
(gdb) p lipi
$1 = 0
(gdb) p *lip
$2 = {lip_host_sw_if_index = 1745050366, lip_phy_sw_if_index = 32767, 
lip_host_name = 0x43 , 
lip_vif_index = 1,
lip_namespace = 0x50005 "", lip_host_type = (LCP_ITF_HOST_TUN | unknown: 
4294967294), lip_phy_adjs = {adj_index = {0, 0}}, lip_flags = (unknown: 0),
lip_rewrite_len = 0 '\000', lip_create_ts = 0}
(gdb)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22534): https://lists.fd.io/g/vpp-dev/message/22534
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 LCP: IS-IS does not work

2023-02-01 Thread Stanislav Zaikin
Hi Gennady,

Could you execute the following commands in gdb and show the output?
f 9
info locals
p lipi
p *lip

On Tue, 31 Jan 2023 at 11:16, Gennady Abramov  wrote:

> Hello Stanislav,
>
> The is-is itself is working, thank you!
> tn3# show isis neighbor
> Area myisis:
>   System Id   Interface   L  StateHoldtime SNPA
>  tn1 Ten0.1914   3  Up28   2020.2020.2020
>
> Unfortunately, both lcp lcp-auto-subint and lcp lcp-sync still looks
> broken. Note, I've applied your patches to 22.10 version as master branch
> was not stable enough; so if it is needed, I can also test on master.
> 1. LCP auto-subint:
> DBGvpp# set interface state TenGigabitEthernet1c/0/1 up
> DBGvpp# lcp lcp-auto-subint on
> DBGvpp# lcp lcp-
> lcp-auto-subint  lcp-sync
> DBGvpp# lcp lcp-sync on
> DBGvpp# lcp create 1 host-if Ten0
> DBGvpp# show lcp
> lcp default netns ''
> 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] TenGigabitEthernet1c/0/1 tap1 Ten0 1304 type tap
> DBGvpp#
> Then VPP crashes:
>
> Jan 31 10:05:57 tn3 vnet[1233293]:
> /home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:60
> (vnet_get_sw_interface) assertion `! pool_is_free
> (vnm->interface_main.sw_interfaces, _e)' fails
> Jan 31 10:05:57 tn3 systemd-udevd[1233343]: ethtool: autonegotiation is
> unset or enabled, the speed and duplex are not writable.
> Jan 31 10:05:57 tn3 vnet[1233293]: received signal SIGABRT, PC
> 0x7f81e45b800b
> Jan 31 10:05:57 tn3 systemd-udevd[1233343]: Using default interface naming
> scheme 'v245'.
> Jan 31 10:05:57 tn3 vnet[1233293]: #0  0x7f81e4ab1c92
> unix_signal_handler + 0x1f2
> Jan 31 10:05:57 tn3 vnet[1233293]: #1  0x7f81e49af420 0x7f81e49af420
> Jan 31 10:05:57 tn3 vnet[1233293]: #2  0x7f81e45b800b gsignal + 0xcb
> Jan 31 10:05:57 tn3 vnet[1233293]: #3  0x7f81e4597859 abort + 0x12b
> Jan 31 10:05:57 tn3 vnet[1233293]: #4  0x004072f3 0x4072f3
> Jan 31 10:05:57 tn3 vnet[1233293]: #5  0x7f81e48e9109 debugger + 0x9
> Jan 31 10:05:57 tn3 vnet[1233293]: #6  0x7f81e48e8eca _clib_error +
> 0x2da
> Jan 31 10:05:57 tn3 vnet[1233293]: #7  0x7f81e4c94f68
> vnet_get_sw_interface + 0xa8
> Jan 31 10:05:57 tn3 vnet[1233293]: #8  0x7f81e4c94f9b
> vnet_get_sup_sw_interface + 0x1b
> Jan 31 10:05:57 tn3 vnet[1233293]: #9  0x7f81e4c9500b
> vnet_get_sup_hw_interface + 0x1b
> Jan 31 10:05:57 tn3 vnet[1233293]: #10 0x7f81e4c98bca
> vnet_create_sub_interface + 0x5a
> Jan 31 10:05:57 tn3 vnet[1233293]: #11 0x7f819ce8db6a
> lcp_router_link_add + 0x5ea
> Jan 31 10:05:57 tn3 vnet[1233293]: #12 0x7f819ce98fc3 nl_link_add +
> 0xd3
> Jan 31 10:05:57 tn3 vnet[1233293]: #13 0x7f819ce986a0
> nl_route_dispatch + 0xe0
> Jan 31 10:05:57 tn3 vnet[1233293]: #14 0x7f819cf29f52 0x7f819cf29f52
>
>
> 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  0x76b0c859 in __GI_abort () at abort.c:79
> #2  0x004072f3 in os_panic () at
> /home/abramov/vpp-p3-lcp/src/vpp/vnet/main.c:417
> #3  0x76e5e109 in debugger () at
> /home/abramov/vpp-p3-lcp/src/vppinfra/error.c:84
> #4  0x76e5deca in _clib_error (how_to_die=2, function_name=0x0,
> line_number=0, fmt=0x77cc8208 "%s:%d (%s) assertion `%s' fails") at
> /home/abramov/vpp-p3-lcp/src/vppinfra/error.c:143
> #5  0x7720af68 in vnet_get_sw_interface (vnm=0x77f696e8
> , sw_if_index=1650550633) at
> /home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:60
> #6  0x7720af9b in vnet_get_sup_sw_interface (vnm=0x77f696e8
> , sw_if_index=1650550633) at
> /home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:83
> #7  0x7720b00b in vnet_get_sup_hw_interface (vnm=0x77f696e8
> , sw_if_index=1650550633) at
> /home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:94
> #8  0x7720ebca in vnet_create_sub_interface
> (sw_if_index=1650550633, id=1914, flags=18, inner_vlan_id=0,
> outer_vlan_id=1914, sub_sw_if_index=0x7fffac7ad980) at
> /home/abramov/vpp-p3-lcp/src/vnet/ethernet/interface.c:1063
> #9  0x7fffaf404b6a in lcp_router_link_add (rl=0x5a3450,
> ctx=0x7fffbb9b18c8) at
> /home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_router.c:423
> #10 0x7fffaf40ffc3 in nl_link_add (rl=0x5a3450, arg=0x7fffbb9b18c8) at
> /home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_nl.c:280
> #11 0x7fffaf40f6a0 in nl_route_dispatch (obj=0x5a3450,
> arg=0x7fffbb9b18c8) at
> /home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_nl.c:323
> #12 0x7fffaf4a0f52 in ?? () from /lib/x86_64-linux-gnu/libnl-3.so.200
> #13 0x7fffaf441990 in ?? () from
> /lib/x86_64-linux-gnu/libnl-route-3.so.200
> #14 0x7fffaf49db52 in nl_cache_parse () from
> /lib/x86_64-linux-gnu/libnl-3.so.2

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

2023-01-31 Thread Gennady Abramov
Hello Stanislav,

The is-is itself is working, thank you!
tn3# show isis neighbor
Area myisis:
System Id   Interface   L  State    Holdtime SNPA
tn1 Ten0.1914   3  Up    28   2020.2020.2020

Unfortunately, both lcp lcp-auto-subint and lcp lcp-sync still looks broken. 
Note, I've applied your patches to 22.10 version as master branch was not 
stable enough; so if it is needed, I can also test on master.
1. LCP auto-subint:
DBGvpp# set interface state TenGigabitEthernet1c/0/1 up
DBGvpp# lcp lcp-auto-subint on
DBGvpp# lcp lcp-
lcp-auto-subint  lcp-sync
DBGvpp# lcp lcp-sync on
DBGvpp# lcp create 1 host-if Ten0
DBGvpp# show lcp
lcp default netns ''
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] TenGigabitEthernet1c/0/1 tap1 Ten0 1304 type tap
DBGvpp#
Then VPP crashes:

Jan 31 10:05:57 tn3 vnet[1233293]: 
/home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:60 (vnet_get_sw_interface) 
assertion `! pool_is_free (vnm->interface_main.sw_interfaces, _e)' fails
Jan 31 10:05:57 tn3 systemd-udevd[1233343]: ethtool: autonegotiation is unset 
or enabled, the speed and duplex are not writable.
Jan 31 10:05:57 tn3 vnet[1233293]: received signal SIGABRT, PC 0x7f81e45b800b
Jan 31 10:05:57 tn3 systemd-udevd[1233343]: Using default interface naming 
scheme 'v245'.
Jan 31 10:05:57 tn3 vnet[1233293]: #0  0x7f81e4ab1c92 unix_signal_handler + 
0x1f2
Jan 31 10:05:57 tn3 vnet[1233293]: #1  0x7f81e49af420 0x7f81e49af420
Jan 31 10:05:57 tn3 vnet[1233293]: #2  0x7f81e45b800b gsignal + 0xcb
Jan 31 10:05:57 tn3 vnet[1233293]: #3  0x7f81e4597859 abort + 0x12b
Jan 31 10:05:57 tn3 vnet[1233293]: #4  0x004072f3 0x4072f3
Jan 31 10:05:57 tn3 vnet[1233293]: #5  0x7f81e48e9109 debugger + 0x9
Jan 31 10:05:57 tn3 vnet[1233293]: #6  0x7f81e48e8eca _clib_error + 0x2da
Jan 31 10:05:57 tn3 vnet[1233293]: #7  0x7f81e4c94f68 vnet_get_sw_interface 
+ 0xa8
Jan 31 10:05:57 tn3 vnet[1233293]: #8  0x7f81e4c94f9b 
vnet_get_sup_sw_interface + 0x1b
Jan 31 10:05:57 tn3 vnet[1233293]: #9  0x7f81e4c9500b 
vnet_get_sup_hw_interface + 0x1b
Jan 31 10:05:57 tn3 vnet[1233293]: #10 0x7f81e4c98bca 
vnet_create_sub_interface + 0x5a
Jan 31 10:05:57 tn3 vnet[1233293]: #11 0x7f819ce8db6a lcp_router_link_add + 
0x5ea
Jan 31 10:05:57 tn3 vnet[1233293]: #12 0x7f819ce98fc3 nl_link_add + 0xd3
Jan 31 10:05:57 tn3 vnet[1233293]: #13 0x7f819ce986a0 nl_route_dispatch + 
0xe0
Jan 31 10:05:57 tn3 vnet[1233293]: #14 0x7f819cf29f52 0x7f819cf29f52

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  0x76b0c859 in __GI_abort () at abort.c:79
#2  0x004072f3 in os_panic () at 
/home/abramov/vpp-p3-lcp/src/vpp/vnet/main.c:417
#3  0x76e5e109 in debugger () at 
/home/abramov/vpp-p3-lcp/src/vppinfra/error.c:84
#4  0x76e5deca in _clib_error (how_to_die=2, function_name=0x0, 
line_number=0, fmt=0x77cc8208 "%s:%d (%s) assertion `%s' fails") at 
/home/abramov/vpp-p3-lcp/src/vppinfra/error.c:143
#5  0x7720af68 in vnet_get_sw_interface (vnm=0x77f696e8 
, sw_if_index=1650550633) at 
/home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:60
#6  0x7720af9b in vnet_get_sup_sw_interface (vnm=0x77f696e8 
, sw_if_index=1650550633) at 
/home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:83
#7  0x7720b00b in vnet_get_sup_hw_interface (vnm=0x77f696e8 
, sw_if_index=1650550633) at 
/home/abramov/vpp-p3-lcp/src/vnet/interface_funcs.h:94
#8  0x7720ebca in vnet_create_sub_interface (sw_if_index=1650550633, 
id=1914, flags=18, inner_vlan_id=0, outer_vlan_id=1914, 
sub_sw_if_index=0x7fffac7ad980) at 
/home/abramov/vpp-p3-lcp/src/vnet/ethernet/interface.c:1063
#9  0x7fffaf404b6a in lcp_router_link_add (rl=0x5a3450, ctx=0x7fffbb9b18c8) 
at /home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_router.c:423
#10 0x7fffaf40ffc3 in nl_link_add (rl=0x5a3450, arg=0x7fffbb9b18c8) at 
/home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_nl.c:280
#11 0x7fffaf40f6a0 in nl_route_dispatch (obj=0x5a3450, arg=0x7fffbb9b18c8) 
at /home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_nl.c:323
#12 0x7fffaf4a0f52 in ?? () from /lib/x86_64-linux-gnu/libnl-3.so.200
#13 0x7fffaf441990 in ?? () from /lib/x86_64-linux-gnu/libnl-route-3.so.200
#14 0x7fffaf49db52 in nl_cache_parse () from 
/lib/x86_64-linux-gnu/libnl-3.so.200
#15 0x7fffaf4a2984 in nl_msg_parse () from 
/lib/x86_64-linux-gnu/libnl-3.so.200
#16 0x7fffaf40c4c4 in nl_route_process_msgs () at 
/home/abramov/vpp-p3-lcp/src/plugins/linux-cp/lcp_nl.c:344
#17 0x7fffaf40b721 in nl_route_process (vm=0x7fffb6ae8740, 
node=0x7fffb8794380, frame=0x0) at 
/home/abramov/vpp-p3-lcp/src/plugins/linu

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

2023-01-27 Thread Stanislav Zaikin
I really hoped that there's a better and shorter solution, but I couldn't
find it.
You can try with this ugly patch with a (lot of) copy-paste from
lip_punt_node :)

On Thu, 26 Jan 2023 at 14:14,  wrote:

> Hi Stanislav,
>
> Situation is better now, but still only half of the problem solved :-)
> OSI IS-IS packets passed from network to tap, but not passed from tap to
> network.
> These are on TAP interface, where:78 is VPP-based router, :7a is non-VPP
> peer, both directions are seen:
> 13:03:22.911887 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 ..0001, length 1497
> 13:03:23.433773 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
> ,
> These are on opposite side of link, (Linux IS-IS router without VPP), only
> outgoing packets are seen:
> 13:08:54.796588 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 ..0001, length 1497
> 13:08:57.662629 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 ..0001, length 1497
>
>
> Also, it looks like lcp auto-subint is broken ; VPP aborts on ip link add
>  on TAP device, instead of creating subif. I'll provide back
> trace later on
>
> Jan 26 12:57:04 tn3 vnet[1133419]: unix_signal_handler:191: received
> signal SIGWINCH, PC 0x7fdd59a34f41
> Jan 26 12:57:11 tn3 vnet[1133419]: received signal SIGWINCH, PC
> 0x7fdd59a34f41
> Jan 26 12:57:11 tn3 vnet[1133419]: #0  0x7fdd59a95c92
> unix_signal_handler + 0x1f2
> Jan 26 12:57:11 tn3 vnet[1133419]: #1  0x7fdd59993420 0x7fdd59993420
> Jan 26 12:57:11 tn3 vnet[1133419]: #2  0x7fdd5a5b8f00
> virtio_refill_vring_split + 0x60
> Jan 26 12:57:11 tn3 vnet[1133419]: #3  0x7fdd5a5b7f52
> virtio_device_input_inline + 0x2f2
> Jan 26 12:57:11 tn3 vnet[1133419]: #4  0x7fdd5a5b7acb
> virtio_input_node_fn_skx + 0x19b
> Jan 26 12:57:11 tn3 vnet[1133419]: #5  0x7fdd59a3515d dispatch_node +
> 0x33d
> Jan 26 12:57:11 tn3 vnet[1133419]: #6  0x7fdd59a30c72
> vlib_main_or_worker_loop + 0x632
> Jan 26 12:57:11 tn3 vnet[1133419]: #7  0x7fdd59a3277a vlib_main_loop +
> 0x1a
> Jan 26 12:57:11 tn3 vnet[1133419]: #8  0x7fdd59a3229a vlib_main + 0x60a
> Jan 26 12:57:11 tn3 vnet[1133419]: #9  0x7fdd59a94a14 thread0 + 0x44
> Jan 26 12:57:11 tn3 vnet[1133419]: #10 0x7fdd598e43d8 0x7fdd598e43d8
> 
>
>

-- 
Best regards
Stanislav Zaikin
diff --git a/src/plugins/linux-cp/lcp_node.c b/src/plugins/linux-cp/lcp_node.c
index b00049884..c119b8bd7 100644
--- a/src/plugins/linux-cp/lcp_node.c
+++ b/src/plugins/linux-cp/lcp_node.c
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+#include "vnet/osi/osi.h"
 #include 
 #include 
 
@@ -935,6 +936,147 @@ VNET_FEATURE_INIT (lcp_arp_host_arp_feat, static) = {
   .runs_before = VNET_FEATURES ("arp-reply"),
 };
 
+typedef struct l2_punt_trace_t_
+{
+  u8 direction;
+  u32 phy_sw_if_index;
+  u32 host_sw_if_index;
+} l2_punt_trace_t;
+
+static u8 *
+format_l2_punt_trace (u8 *s, va_list *args)
+{
+  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
+  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
+  l2_punt_trace_t *t = va_arg (*args, l2_punt_trace_t *);
+
+  if (t->direction)
+{
+  s = format (s, "l2-punt: %u -> %u", t->host_sw_if_index,
+		  t->phy_sw_if_index);
+}
+  else
+{
+  s = format (s, "l2-punt: %u -> %u", t->phy_sw_if_index,
+		  t->host_sw_if_index);
+}
+
+  return s;
+}
+
+VLIB_NODE_FN (l2_punt_node)
+(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
+{
+  u32 n_left_from, *from, *to_next, n_left_to_next;
+  lip_punt_next_t next_index;
+
+  next_index = node->cached_next_index;
+  n_left_from = frame->n_vectors;
+  from = vlib_frame_vector_args (frame);
+
+  while (n_left_from > 0)
+{
+  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
+
+  while (n_left_from > 0 && n_left_to_next > 0)
+	{
+	  vlib_buffer_t *b0;
+	  const lcp_itf_pair_t *lip0 = NULL;
+	  u32 next0 = ~0;
+	  u32 bi0, lipi0;
+	  u32 sw_if_index0;
+	  u8 direction = 0;
+	  u8 len0;
+
+	  bi0 = to_next[0] = from[0];
+
+	  from += 1;
+	  to_next += 1;
+	  n_left_from -= 1;
+	  n_left_to_next -= 1;
+	  next0 = LIP_PUNT_NEXT_DROP;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+
+	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
+	  lipi0 = lcp_itf_pair_find_by_phy (sw_if_index0);
+	  if (lipi0 == INDEX_INVALID)
+	{
+	  lipi0 = lcp_itf_pair_find_by_host (sw_if_index0);
+	  if (lipi0 == INDEX_INVALID)
+		goto trace0;
+
+	  direction = 1;
+	}
+
+	

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

2023-01-26 Thread agv100
Hi Stanislav,

Situation is better now, but still only half of the problem solved :-)
OSI IS-IS packets passed from network to tap, but not passed from tap to 
network.
These are on TAP interface, where:78 is VPP-based router, :7a is non-VPP peer, 
both directions are seen:
13:03:22.911887 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 ..0001, length 1497
13:03:23.433773 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
,
These are on opposite side of link, (Linux IS-IS router without VPP), only 
outgoing packets are seen:
13:08:54.796588 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 ..0001, length 1497
13:08:57.662629 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 ..0001, length 1497

Also, it looks like lcp auto-subint is broken ; VPP aborts on ip link add  on TAP device, instead of creating subif. I'll provide back trace later 
on

Jan 26 12:57:04 tn3 vnet[1133419]: unix_signal_handler:191: received signal 
SIGWINCH, PC 0x7fdd59a34f41
Jan 26 12:57:11 tn3 vnet[1133419]: received signal SIGWINCH, PC 0x7fdd59a34f41
Jan 26 12:57:11 tn3 vnet[1133419]: #0  0x7fdd59a95c92 unix_signal_handler + 
0x1f2
Jan 26 12:57:11 tn3 vnet[1133419]: #1  0x7fdd59993420 0x7fdd59993420
Jan 26 12:57:11 tn3 vnet[1133419]: #2  0x7fdd5a5b8f00 
virtio_refill_vring_split + 0x60
Jan 26 12:57:11 tn3 vnet[1133419]: #3  0x7fdd5a5b7f52 
virtio_device_input_inline + 0x2f2
Jan 26 12:57:11 tn3 vnet[1133419]: #4  0x7fdd5a5b7acb 
virtio_input_node_fn_skx + 0x19b
Jan 26 12:57:11 tn3 vnet[1133419]: #5  0x7fdd59a3515d dispatch_node + 0x33d
Jan 26 12:57:11 tn3 vnet[1133419]: #6  0x7fdd59a30c72 
vlib_main_or_worker_loop + 0x632
Jan 26 12:57:11 tn3 vnet[1133419]: #7  0x7fdd59a3277a vlib_main_loop + 0x1a
Jan 26 12:57:11 tn3 vnet[1133419]: #8  0x7fdd59a3229a vlib_main + 0x60a
Jan 26 12:57:11 tn3 vnet[1133419]: #9  0x7fdd59a94a14 thread0 + 0x44
Jan 26 12:57:11 tn3 vnet[1133419]: #10 0x7fdd598e43d8 0x7fdd598e43d8

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22511): https://lists.fd.io/g/vpp-dev/message/22511
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 LCP: IS-IS does not work

2023-01-25 Thread Stanislav Zaikin
Could you check again with the following patch? The previous didn't work
because the linker couldn't find a symbol with the node (apparently, linux
cp plugin divided into 2 parts: a library and a plugin).

I replayed a pcap containing some OSI frames and got this trace:

00:00:18:025096: virtio-input
  virtio: hw_if_index 1 next-index 4 vring 0 len 1514
hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0
csum_offset 0 num_buffers 1
00:00:18:025161: ethernet-input
  frame: flags 0x1, hw-if-index 1, sw-if-index 1
  0x05dc: c2:03:29:a9:00:00 -> 01:80:c2:00:00:15
00:00:18:025187: llc-input
  LLC osi_layer5 -> osi_layer5
00:00:18:025198: *osi-input*
  OSI isis
00:00:18:025214: *linux-cp-punt*
  lip-punt: 1 -> 2
00:00:18:025236: tap1-output
  tap1 flags 0x00180005
  0x05dc: c2:03:29:a9:00:00 -> 01:80:c2:00:00:15
00:00:18:025255: tap1-tx
buffer 0x9f947: current data 0, length 1514, buffer-pool 0, ref-count
1, trace handle 0x1
l2-hdr-offset 0 l3-hdr-offset 14
  hdr-sz 0 l2-hdr-offset 0 l3-hdr-offset 14 l4-hdr-offset 0 l4-hdr-sz 0
  0x05dc: c2:03:29:a9:00:00 -> 01:80:c2:00:00:15

diff --git a/src/plugins/linux-cp/lcp_interface.c
b/src/plugins/linux-cp/lcp_interface.c
index eef06ecfa..81ec6f9ec 100644
--- a/src/plugins/linux-cp/lcp_interface.c
+++ b/src/plugins/linux-cp/lcp_interface.c
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 

 vlib_log_class_t lcp_itf_pair_logger;

@@ -1206,6 +1207,10 @@ lcp_interface_init (vlib_main_t *vm)

   lcp_itf_pair_logger = vlib_log_register_class ("linux-cp", "itf");

+  vlib_node_t *lip_punt_node = vlib_get_node_by_name (vm, (u8 *)
"linux-cp-punt");
+  if (lip_punt_node)
+osi_register_input_protocol (OSI_PROTOCOL_isis, lip_punt_node->index);
+
   return NULL;
 }

On Wed, 25 Jan 2023 at 16:11,  wrote:

> Hi Stanislav!
>
> Here is it!
>
> 00:31:48:504910: dpdk-input
>   TenGigabitEthernet1c/0/1 rx queue 0
>   buffer 0x9ad69: current data 0, length 1518, buffer-pool 0, ref-count 1,
> trace handle 0xb
>   ext-hdr-valid
>   PKT MBUF: port 0, nb_segs 1, pkt_len 1518
> buf_len 2176, data_len 1518, ol_flags 0x180, data_off 128, phys_addr
> 0x188b5ac0
> packet_type 0x1 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
> rss 0x0 fdir.hi 0x0 fdir.lo 0x0
> Packet Offload Flags
>   PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
>   PKT_RX_IP_CKSUM_NONE (0x0090) no IP cksum of RX pkt.
>   PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
>   PKT_RX_L4_CKSUM_NONE (0x0108) no L4 cksum of RX pkt.
> Packet Types
>   RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet
>   0x05dc: 3c:ec:ef:5f:78:7a -> 09:00:2b:00:00:05 802.1q vlan 1914
> 00:31:48:504913: ethernet-input
>   frame: flags 0x3, hw-if-index 1, sw-if-index 1
>   0x05dc: 3c:ec:ef:5f:78:7a -> 09:00:2b:00:00:05 802.1q vlan 1914
> 00:31:48:504917: llc-input
>   LLC osi_layer5 -> osi_layer5
> 00:31:48:504918: osi-input
>   OSI isis
> 00:31:48:504919: error-drop
>   rx:TenGigabitEthernet1c/0/1.1914
> 00:31:48:504920: drop
>   osi-input: unknown osi protocol
> 
>
>

-- 
Best regards
Stanislav Zaikin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22510): https://lists.fd.io/g/vpp-dev/message/22510
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 LCP: IS-IS does not work

2023-01-25 Thread agv100
Hi Stanislav!

Here is it!

00:31:48:504910: dpdk-input
TenGigabitEthernet1c/0/1 rx queue 0
buffer 0x9ad69: current data 0, length 1518, buffer-pool 0, ref-count 1, trace 
handle 0xb
ext-hdr-valid
PKT MBUF: port 0, nb_segs 1, pkt_len 1518
buf_len 2176, data_len 1518, ol_flags 0x180, data_off 128, phys_addr 0x188b5ac0
packet_type 0x1 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
rss 0x0 fdir.hi 0x0 fdir.lo 0x0
Packet Offload Flags
PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
PKT_RX_IP_CKSUM_NONE (0x0090) no IP cksum of RX pkt.
PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
PKT_RX_L4_CKSUM_NONE (0x0108) no L4 cksum of RX pkt.
Packet Types
RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet
0x05dc: 3c:ec:ef:5f:78:7a -> 09:00:2b:00:00:05 802.1q vlan 1914
00:31:48:504913: ethernet-input
frame: flags 0x3, hw-if-index 1, sw-if-index 1
0x05dc: 3c:ec:ef:5f:78:7a -> 09:00:2b:00:00:05 802.1q vlan 1914
00:31:48:504917: llc-input
LLC osi_layer5 -> osi_layer5
00:31:48:504918: osi-input
OSI isis
00:31:48:504919: error-drop
rx:TenGigabitEthernet1c/0/1.1914
00:31:48:504920: drop
osi-input: unknown osi protocol

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22509): https://lists.fd.io/g/vpp-dev/message/22509
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 LCP: IS-IS does not work

2023-01-24 Thread Stanislav Zaikin
That's not surprising, could you also show me a trace? (trace add
dpdk-input 10 and then show trace with ISIS packet)

On Tue, 24 Jan 2023 at 16:25,  wrote:

> Hi Stanislav,
>
> Unfortunately, your patch didn't help. VPP builds, but IS-IS packets still
> cannot be passed between the CP and the wire.
>
> Furthermore, it looks like LCP lcp-auto-subint feature was broken:
>
> root@tn3:/home/abramov/vpp# vppctl
> _____   _  ___
>  __/ __/ _ \  (_)__| | / / _ \/ _ \
>  _/ _// // / / / _ \   | |/ / ___/ ___/
>  /_/ /(_)_/\___/   |___/_/  /_/
>
> vpp#
> vpp#
> vpp#
> vpp# show interface
>   Name   IdxState  MTU (L3/IP4/IP6/MPLS)
> Counter  Count
> TenGigabitEthernet1c/0/1  1 down 9000/0/0/0
> local00 down  0/0/0/0
> vpp# set interface state TenGigabitEthernet1c/0/1 up
> vpp# lcp create 1 host-if Ten0
> vpp# show interface
>   Name   IdxState  MTU (L3/IP4/IP6/MPLS)
> Counter  Count
> TenGigabitEthernet1c/0/1  1  up  9000/0/0/0 rx
> packets  2451
> rx
> bytes  228627
> tx
> packets 7
> tx
> bytes 746
>
> drops   2451
>
> ip49
>
> ip62
> local00 down  0/0/0/0
> tap1  2  up  9000/0/0/0 rx
> packets 7
> rx
> bytes 746
>
> ip67
> vpp# quit
> root@tn3:/home/abramov/vpp# ip link set Ten0 up
> root@tn3:/home/abramov/vpp# vppctl
> _____   _  ___
>  __/ __/ _ \  (_)__| | / / _ \/ _ \
>  _/ _// // / / / _ \   | |/ / ___/ ___/
>  /_/ /(_)_/\___/   |___/_/  /_/
>
> vpp# lcp lcp
> lcp-auto-subint  lcp-sync
> vpp# lcp lcp-auto-subint on
> vpp# lcp lcp-sync on
> vpp# show lcp
> lcp default netns ''
> 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] TenGigabitEthernet1c/0/1 tap1 Ten0 1248 type tap
> vpp# quit
> root@tn3:/home/abramov/vpp# ip link add Ten0.1914 link Ten0 type vlan id
> 1914
> root@tn3:/home/abramov/vpp# ip link set Ten0.1914 up
> root@tn3:/home/abramov/vpp# vppctl
> _____   _  ___
>  __/ __/ _ \  (_)__| | / / _ \/ _ \
>  _/ _// // / / / _ \   | |/ / ___/ ___/
>  /_/ /(_)_/\___/   |___/_/  /_/
>
> vpp# show int
>   Name   IdxState  MTU (L3/IP4/IP6/MPLS)
> Counter  Count
> TenGigabitEthernet1c/0/1  1  up  9000/0/0/0 rx
> packets 16501
> rx
> bytes 1519839
> tx
> packets 7
> tx
> bytes 746
>
> drops  16501
>
> ip4   39
>
> ip68
> local00 down  0/0/0/0
> tap1  2  up  9000/0/0/0 rx
> packets17
> rx
> bytes   19710
>
> drops 10
>
> ip67
>
>
> vpp# show node counters
>Count  Node
> Reason   Severity
> 10 lldp-inputlldp packets received on
> disabled i   error
>516 dpdk-input  no
> errorerror
> 21arp-disabled   ARP
> Disabled  error
> 74 osi-input unknown osi
> protocol  error
>  5 snap-input unknown oui/snap
> protocolerror
> 11   ethernet-input unknown ethernet
> type  error
>  74127   ethernet-input  unknown
> vlan  error
>145   ethernet-input   subinterface
> downerror
> vpp#
> 
>
>

-- 
Best regards
Stanislav Zaikin

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

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

2023-01-24 Thread agv100
Hi Stanislav,

Unfortunately, your patch didn't help. VPP builds, but IS-IS packets still 
cannot be passed between the CP and the wire.

Furthermore, it looks like LCP lcp-auto-subint feature was broken:

root@tn3:/home/abramov/vpp# vppctl
___    _    _   _  ___
__/ __/ _ \  (_)__    | | / / _ \/ _ \
_/ _// // / / / _ \   | |/ / ___/ ___/
/_/ /(_)_/\___/   |___/_/  /_/

vpp#
vpp#
vpp#
vpp# show interface
Name   Idx    State  MTU (L3/IP4/IP6/MPLS) Counter  
Count
TenGigabitEthernet1c/0/1  1 down 9000/0/0/0
local0    0 down  0/0/0/0
vpp# set interface state TenGigabitEthernet1c/0/1 up
vpp# lcp create 1 host-if Ten0
vpp# show interface
Name   Idx    State  MTU (L3/IP4/IP6/MPLS) Counter  
Count
TenGigabitEthernet1c/0/1  1  up  9000/0/0/0 rx packets  
    2451
rx bytes  228627
tx packets 7
tx bytes 746
drops   2451
ip4    9
ip6    2
local0    0 down  0/0/0/0
tap1  2  up  9000/0/0/0 rx packets  
   7
rx bytes 746
ip6    7
vpp# quit
root@tn3:/home/abramov/vpp# ip link set Ten0 up
root@tn3:/home/abramov/vpp# vppctl
___    _    _   _  ___
__/ __/ _ \  (_)__    | | / / _ \/ _ \
_/ _// // / / / _ \   | |/ / ___/ ___/
/_/ /(_)_/\___/   |___/_/  /_/

vpp# lcp lcp
lcp-auto-subint  lcp-sync
vpp# lcp lcp-auto-subint on
vpp# lcp lcp-sync on
vpp# show lcp
lcp default netns ''
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] TenGigabitEthernet1c/0/1 tap1 Ten0 1248 type tap
vpp# quit
root@tn3:/home/abramov/vpp# ip link add Ten0.1914 link Ten0 type vlan id 1914
root@tn3:/home/abramov/vpp# ip link set Ten0.1914 up
root@tn3:/home/abramov/vpp# vppctl
___    _    _   _  ___
__/ __/ _ \  (_)__    | | / / _ \/ _ \
_/ _// // / / / _ \   | |/ / ___/ ___/
/_/ /(_)_/\___/   |___/_/  /_/

vpp# show int
Name   Idx    State  MTU (L3/IP4/IP6/MPLS) Counter  
Count
TenGigabitEthernet1c/0/1  1  up  9000/0/0/0 rx packets  
   16501
rx bytes 1519839
tx packets 7
tx bytes 746
drops  16501
ip4   39
ip6    8
local0    0 down  0/0/0/0
tap1  2  up  9000/0/0/0 rx packets  
  17
rx bytes   19710
drops 10
ip6    7

vpp# show node counters
Count  Node  Reason   
Severity
10 lldp-input    lldp packets received on disabled i   error
516 dpdk-input  no error    
error
21    arp-disabled   ARP Disabled  error
74 osi-input unknown osi protocol  error
5 snap-input unknown oui/snap protocol    error
11   ethernet-input unknown ethernet type  error
74127   ethernet-input  unknown vlan  
error
145   ethernet-input   subinterface down    
error
vpp#

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22501): https://lists.fd.io/g/vpp-dev/message/22501
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 LCP: IS-IS does not work

2023-01-23 Thread Stanislav Zaikin
Hello folks,

In old router plugin it was done with the following snippet:
```
#include 
...
osi_register_input_protocol (OSI_PROTOCOL_isis, im->tx_node_index);
```

So, I'd give it a try to register this protocol for `lip_punt_node`
(`lcp_router_init` seems quite suitable). Something like this:
diff --git a/src/plugins/linux-cp/lcp.h b/src/plugins/linux-cp/lcp.h
index 4ddaa3898..51f6b1b3e 100644
--- a/src/plugins/linux-cp/lcp.h
+++ b/src/plugins/linux-cp/lcp.h
@@ -52,6 +52,8 @@ u8 lcp_get_del_static_on_link_down (void);
 void lcp_set_del_dynamic_on_link_down (u8 is_del);
 u8 lcp_get_del_dynamic_on_link_down (void);

+extern vlib_node_registration_t lip_punt_node;
+
 #endif

 /*
diff --git a/src/plugins/linux-cp/lcp_router.c
b/src/plugins/linux-cp/lcp_router.c
index 3534b597e..1f2c126d9 100644
--- a/src/plugins/linux-cp/lcp_router.c
+++ b/src/plugins/linux-cp/lcp_router.c
@@ -37,6 +37,7 @@
 #include 

 #include "lcp_nl_evpn.h"
+#include "vnet/osi/osi.h"

 typedef struct lcp_router_table_t_
 {
@@ -1416,6 +1417,8 @@ lcp_router_init (vlib_main_t *vm)
   lcp_rt_fib_src_dynamic = fib_source_allocate (
 "lcp-rt-dynamic", FIB_SOURCE_PRIORITY_HI + 1, FIB_SOURCE_BH_API);

+  osi_register_input_protocol( OSI_PROTOCOL_isis, lip_punt_node.index);
+
   return (NULL);
 }

It compiles, but I haven't checked anything since I'm too lazy to configure
ISIS.

On Mon, 23 Jan 2023 at 18:14, Pim van Pelt via lists.fd.io  wrote:

> 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/
>
> 
>
>

-- 
Best regards
Stanislav Zaikin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22494): https://lists.fd.io/g/vpp-dev/message/22494
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 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 LCP: IS-IS does not work

2023-01-23 Thread agv100
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.

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

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

2023-01-23 Thread agv100
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 Pri    DeadTime    State/IfState Duration I/F[State]
20.20.20.1    1    00: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-input    lldp packets received on disabled i   error
4364 dpdk-input  no error    
error
20 arp-reply   ARP replies sent    info
9 arp-reply IP4 source address matches local in   error
19 arp-reply ARP request IP4 source address lear   info
43    arp-disabled   ARP Disabled  error
1252 osi-input unknown osi protocol  
error
4 ip6-input    ip6 source lookup miss error
19    ip6-local-hop-by-hop   Unknown protocol ip6 local h-b-h pa   error
10 ip4-local    ip4 source lookup miss error
4   ip6-icmp-input  neighbor solicitations for unknown    error
4   ip6-icmp-input  neighbor advertisements sent  info
106   ip6-icmp-input   neighbor discovery not configured    
error
42 snap-input unknown oui/snap protocol    error
49   ethernet-input unknown ethernet type  error
623375   ethernet-input  unknown vlan  
error
1   ethernet-input   subinterface down    error

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)    \
_ (idrp, 0x85)    \
_ (x25_esis, 0x8a)    \
_ (iso10030, 0x8c)    \
_ (iso11577, 0x8d)    \
_ (ip6, 0x8e) \
_ (compressed, 0xb0)  \
_ (sndcf, 0xc1)   \
_ (ip4, 0xcc) \
_ (ppp, 0xcf)

So protocol should not be "unknown".

Any ideas where I need to look at to fix the issue with IS-IS?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#22488): https://lists.fd.io/g/vpp-dev/message/2248