Hoi,

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

01:04:06:883962: dpdk-input

  GigabitEthernet10/0/3 rx queue 0

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

                   ext-hdr-valid

  PKT MBUF: port 3, nb_segs 1, pkt_len 46

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

    packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0

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

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

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

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

01:04:06:883974: ethernet-input

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

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

01:04:06:883981: l2-input

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

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

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

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

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

01:04:06:884005: l2-output

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

01:04:06:884007: vxlan4-encap

  VXLAN encap to vxlan_tunnel0 vni 100

01:04:06:884010: ip4-rewrite

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

  00000000: 52540011100052540010100108004500004e00000000fd11264bc0a80b00c0a8

  00000020: 0b0353a012b5003a00000800000000006400fffffffffffffe540010

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

  GigabitEthernet10/0/1

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

  UDP: 192.168.11.0 -> 192.168.11.3

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

    fragment id 0x0000

  UDP: 21408 -> 4789

    length 58, checksum 0x0000

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

  GigabitEthernet10/0/1 tx queue 0

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

                   ext-hdr-valid

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

  PKT MBUF: port 3, nb_segs 1, pkt_len 92

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

    packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0

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

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

  UDP: 192.168.11.0 -> 192.168.11.3

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

    fragment id 0x0000

  UDP: 21408 -> 4789

    length 58, checksum 0x0000

On Sat, Jan 14, 2023 at 8:58 PM Pim van Pelt via lists.fd.io <pim=
ipng...@lists.fd.io> wrote:

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

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

Reply via email to