Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-393

Subinterface is still used after deletion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 17.01
    • None
    • None
    • None

      i have created pbb subinterface for encapsulating packets with pbb. then i deleted it and try to send another packet. subint was still used and also i still can see xconnect to it. also help for delete subif is not updated (see at the end)

      my setup was:
      set int ip address GigabitEthernet0/8/0 11.0.1.11/24
      set int ip address GigabitEthernet0/a/0 11.0.3.1/24
      set int state GigabitEthernet0/8/0 up
      set int state GigabitEthernet0/a/0 up

      vxlan_add_del_tunnel src 11.0.1.11 dst 11.0.1.111 vni 24

      lisp enable
      lisp locator-set add ls1 iface GigabitEthernet0/a/0 p 1 w 1
      lisp eid-table add eid 11.0.1.0/24 locator-set ls1
      lisp map-resolver add 11.0.3.100

      tap_connect tapname tap1 mac 01:01:01:aa:aa:aa
      tap_connect tapname tap2 mac 02:02:02:aa:aa:aa
      sw_interface_set_flags sw_if_index 5 admin-up link-up
      sw_interface_set_flags sw_if_index 6 admin-up link-up

      create_subif sw_if_index 5 sub_id 11 dot1ah dmac 02:02:02:aa:aa:ab smac 00:50:56:af:ad:63 vlanid 111 sid 666 push
      sw_interface_set_l2_xconnect rx_sw_if_index 3 tx_sw_if_index 7

      sudo brctl addbr vpp_br
      sudo ip addr flush dev tap1
      sudo ip addr flush dev tap2
      sudo brctl addif vpp_br tap1
      sudo brctl addif vpp_br tap2
      sudo brctl show
      sudo ifconfig vpp_br up
      sudo ip addr flush dev vpp_br

      for delete:
      delete_subif sw_if_index 7

      log from vpp after subint deletion:

      vpp# sh int
      Name Idx State Counter Count
      GigabitEthernet0/8/0 1 up rx packets 6
      rx bytes 552
      ip4 6
      GigabitEthernet0/a/0 2 up
      lisp_gpe0 4 up
      local0 0 down
      tap-0 5 up rx packets 11
      rx bytes 938
      tx packets 5
      tx bytes 320
      drops 11
      punts 8
      ip6 11
      tap-1 6 up rx packets 16
      rx bytes 1258
      drops 16
      punts 8
      ip6 11
      vxlan_tunnel0 3 up rx packets 6
      rx bytes 252
      drops 1
      vpp# clear trace
      vpp# sh trace
      ------------------- Start of thread 0 vpp_main -------------------
      Packet 1

      00:36:45:656851: dpdk-input
      GigabitEthernet0/8/0 rx queue 0
      buffer 0x4d19: current data 0, length 92, free-list 0, totlen-nifb 0, trace 0x0
      PKT MBUF: port 0, nb_segs 1, pkt_len 92
      buf_len 2176, data_len 92, ol_flags 0x0, data_off 128, phys_addr 0x736f3700
      packet_type 0x0
      IP4: 11:11:11:11:11:11 -> 08:00:27:15:8b:91
      UDP: 11.0.1.111 -> 11.0.1.11
      tos 0x00, ttl 64, length 78, checksum 0x6225
      fragment id 0x0001
      UDP: 1337 -> 4789
      length 58, checksum 0xb181
      00:36:45:656881: ethernet-input
      IP4: 11:11:11:11:11:11 -> 08:00:27:15:8b:91
      00:36:45:656887: ip4-input
      UDP: 11.0.1.111 -> 11.0.1.11
      tos 0x00, ttl 64, length 78, checksum 0x6225
      fragment id 0x0001
      UDP: 1337 -> 4789
      length 58, checksum 0xb181
      00:36:45:656889: ip4-lookup
      fib 0 adj-idx 4 : 11.0.1.11/24 flow hash: 0x00000000
      UDP: 11.0.1.111 -> 11.0.1.11
      tos 0x00, ttl 64, length 78, checksum 0x6225
      fragment id 0x0001
      UDP: 1337 -> 4789
      length 58, checksum 0xb181
      00:36:45:656891: ip4-local
      UDP: 11.0.1.111 -> 11.0.1.11
      tos 0x00, ttl 64, length 78, checksum 0x6225
      fragment id 0x0001
      UDP: 1337 -> 4789
      length 58, checksum 0xb181
      00:36:45:656893: ip4-udp-lookup
      UDP: src-port 1337 dst-port 4789
      00:36:45:656895: vxlan4-input
      VXLAN: tunnel 0 vni 24 next 1 error 0
      00:36:45:656899: l2-input
      l2-input: sw_if_index 3 dst 00:50:56:af:9a:2e src 00:50:56:af:ad:63
      00:36:45:656901: l2-output
      l2-output: sw_if_index 8 dst 00:50:56:af:9a:2e src 00:50:56:af:ad:63
      00:36:45:656902: tap-0-output
      tap-0.11
      DOT1AH: 00:50:56:af:ad:63 -> 02:02:02:aa:aa:aa
      PBB header : B_tag 006F (vid 111, dei 0, pcp 0), I_tag 0000029A (sid 666, res 0, dei 0, pcp 0)

      Packet 2

      00:36:45:656941: tapcli-rx
      tap-1
      00:36:45:656948: ethernet-input
      DOT1AH: 00:50:56:af:ad:63 -> 02:02:02:aa:aa:aa
      PBB header : B_tag 006F (vid 111, dei 0, pcp 0), I_tag 0000029A (sid 666, res 0, dei 0, pcp 0)
      00:36:45:656950: error-drop
      ethernet-input: unknown vlan

      ----------------

      vpp# sh int addr
      GigabitEthernet0/8/0 (up):
      11.0.1.11/24
      GigabitEthernet0/a/0 (up):
      l2 bridge bd_id 10 shg 0
      11.0.3.1/24
      GigabitEthernet0/a/0.11 (dn):
      l2_lisp_gpe111 (up):
      l2 bridge bd_id 10 shg 0
      lisp_gpe0 (up):
      local0 (dn):
      tap-0 (up):
      tap-1 (up):
      vxlan_tunnel0 (up):
      l2 xconnect tap-0.11
      vpp#

      -----------------------------------------

      vat# help delete_subif
      usage: delete_subif sub_sw_if_index <nn> sub_if_id <nn>

      vat# delete_subif sub_sw_if_index 8 sub_if_id 11
      missing sw_if_index
      delete_subif error: Misc

      vat# delete_subif sw_if_index 8

      {
      "retval": 0
      }

            sk1u06b3 Pavel Kotucek
            amarcine Andrej Marcinek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: