Hello,

I have a custom node which registered certain protocols (it's basically an
old good "router" plugin).
After "ip4-local" node VPP sends the packet to this node. But there is no
information about TX interface, and I need TX sw_if_index to push my packet
to the corresponding tap device.

If I've understood correctly vnet_buffer(b0)->sw_if_index[VLIB_TX] is set
to fib index.
How can I get TX sw_if_index of the destination address after the lookup?

00:00:39:579495: memif-input
  memif: hw_if_index 1 next-index 4
    slot: ring 0
00:00:39:587518: ethernet-input
  frame: flags 0x1, hw-if-index 1, sw-if-index 1
  MPLS: 02:fe:13:14:0e:36 -> 02:fe:4c:84:cc:01
00:00:39:587526: mpls-input
  MPLS: next mpls-lookup[1]  label 1111 ttl 64 exp 0
00:00:39:587530: mpls-lookup
  MPLS: next [6], lookup fib index 0, LB index 33 hash 0 label 1111 eos 1
00:00:39:587534: ip4-mpls-label-disposition-pipe
  rpf-id:-1 ip4, pipe
00:00:39:587539: lookup-ip4-dst
     fib-index:1 addr:1.1.1.1 load-balance:28
00:00:39:587543: ip4-local
    TCP: 100.0.0.2 -> 1.1.1.1
      tos 0x00, ttl 63, length 60, checksum 0x1f25 dscp CS0 ecn NON_ECN
      fragment id 0xb693, flags DONT_FRAGMENT
    TCP: 40740 -> 169
      seq. 0x66669613 ack 0x00000000
      flags 0x02 SYN, tcp header: 40 bytes
      window 64240, checksum 0x0939
00:00:39:587552: tap-inject-tx
  tap_inject_tx rx_sw_if 1 tx_sw_if 1 tap fd 23


-- 
Best regards
Stanislav Zaikin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18581): https://lists.fd.io/g/vpp-dev/message/18581
Mute This Topic: https://lists.fd.io/mt/80032473/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to