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 <vnet/devices/netlink.h>
 #include <vlibapi/api_helper_macros.h>
 #include <vnet/ipsec/ipsec_punt.h>
+#include <vnet/osi/osi.h>

 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, <agv...@gmail.com> 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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to