All this happen in case where tap interface is set to some bridge-domain !
If i create tap interface and set mactime on it,
vnet_feature_start_device_input_x1 is hit and next node is correct

root@ucpe-vpp:~# vppctl show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:06:51:715004: virtio-input
  virtio: hw_if_index 16 next-index 6 vring 0 len 42
    hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0
csum_offset 0 num_buffers 1
00:06:51:715033: mactime
  MACTIME: src mac 3e:61:12:f3:46:9d device mac-3e:61:12:f3:46:9d result
pass

00:06:51:715039: ethernet-input
  ARP: 3e:61:12:f3:46:9d -> ff:ff:ff:ff:ff:ff
00:06:51:715044: arp-input
  request, type ethernet/IP4, address size 6/4
  3e:61:12:f3:46:9d/12.12.12.1 -> 00:00:00:00:00:00/12.12.12.2
00:06:51:715049: arp-disabled
  request, type ethernet/IP4, address size 6/4
  3e:61:12:f3:46:9d/12.12.12.1 -> 00:00:00:00:00:00/12.12.12.2
00:06:51:715051: error-drop
  rx:tap0
00:06:51:715054: drop
  arp-disabled: ARP Disabled on this interface

But when assign interface to bridge-domain
X,  vnet_feature_start_device_input_x1 still is hit but next node simply
skip mactime

vpp# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:09:01:266614: virtio-input
  virtio: hw_if_index 16 next-index 4 vring 0 len 42
    hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0
csum_offset 0 num_buffers 1
00:09:01:266621: ethernet-input
  ARP: 3e:61:12:f3:46:9d -> ff:ff:ff:ff:ff:ff
00:09:01:266624: l2-input
  l2-input: sw_if_index 16 dst ff:ff:ff:ff:ff:ff src 3e:61:12:f3:46:9d
00:09:01:266626: l2-learn
  l2-learn: sw_if_index 16 dst ff:ff:ff:ff:ff:ff src 3e:61:12:f3:46:9d
bd_index 12
00:09:01:266631: error-drop
  rx:tap0
00:09:01:266635: drop
  l2-flood: L2 replication complete

Display of features of tap0 still shows that mactime is on device-input



On Tue, Nov 12, 2019 at 11:31 AM Damjan Marion <dmar...@me.com> wrote:

>
>
> > On 12 Nov 2019, at 10:19, Dimitar Ivanov <d...@telco.com> wrote:
> >
> > Sorry for missing post to vpp-dev.
> > So i'm using correct TAP interface.
>
> yes, Looks like a bug. Somebidy will need to debug it.
> If you have time and gdb skills, try to find out if
> vnet_feature_start_device_input_x1 in src/vnet/devices/virtio/node.c is hit…
>
> From the trace you can see that next-index is 4.
>
> "show node virtio-input" will likely tell you that next-index 4 is
> ethernet-input.
>
> vnet_feature_start_device_input_x1 i supposed to change next-index to
> whatever next-index for mactime is…
>
>
> > Here is some trace with activated mactime on tap0
> >
> > vpp# show trace
> > Limiting display to 50 packets. To display more specify max.
> > ------------------- Start of thread 0 vpp_main -------------------
> > Packet 1
> >
> > 00:02:42:141421: virtio-input
> >  virtio: hw_if_index 2 next-index 4 vring 0 len 98
> >    hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0
> > csum_offset 0 num_buffers 1
> > 00:02:42:141425: ethernet-input
> >  IP4: 52:54:00:30:80:22 -> 74:d4:35:9d:21:ac
> > 00:02:42:141426: l2-input
> >  l2-input: sw_if_index 2 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> > 00:02:42:141427: l2-learn
> >  l2-learn: sw_if_index 2 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> bd_index 1
> > 00:02:42:141428: l2-fwd
> >  l2-fwd:   sw_if_index 2 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> > bd_index 1 result [0x1000000000001, 1] none
> > 00:02:42:141430: l2-output
> >  l2-output: sw_if_index 1 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> > data 08 00 45 00 00 54 37 57 00 00 40 01
> > 00:02:42:141430: host-data0-output
> >  host-data0 l2_hdr_offset_valid l3_hdr_offset_valid
> >  IP4: 52:54:00:30:80:22 -> 74:d4:35:9d:21:ac
> >  ICMP: 10.3.72.59 -> 10.3.72.254
> >    tos 0x00, ttl 64, length 84, checksum 0x9e13
> >    fragment id 0x3757
> >  ICMP echo_reply checksum 0x1f49
> >
> > Packet 2
> >
> > 00:02:43:142927: virtio-input
> >  virtio: hw_if_index 2 next-index 4 vring 0 len 98
> >    hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0
> csum_offset
> > 0 num_buffers 1
> > 00:02:43:142931: ethernet-input
> >  IP4: 52:54:00:30:80:22 -> 74:d4:35:9d:21:ac
> > 00:02:43:142932: l2-input
> >  l2-input: sw_if_index 2 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> > 00:02:43:142934: l2-learn
> >  l2-learn: sw_if_index 2 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> bd_index 1
> > 00:02:43:142935: l2-fwd
> >  l2-fwd:   sw_if_index 2 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> bd_index 1
> > result [0x1000000000001, 1] none
> > 00:02:43:142936: l2-output
> >  l2-output: sw_if_index 1 dst 74:d4:35:9d:21:ac src 52:54:00:30:80:22
> data 08 0
> > 0 45 00 00 54 38 0b 00 00 40 01
> > 00:02:43:142937: host-data0-output
> >  host-data0 l2_hdr_offset_valid l3_hdr_offset_valid
> >  IP4: 52:54:00:30:80:22 -> 74:d4:35:9d:21:ac
> >  ICMP: 10.3.72.59 -> 10.3.72.254
> >    tos 0x00, ttl 64, length 84, checksum 0x9d5f
> >    fragment id 0x380b
> >  ICMP echo_reply checksum 0x3841
> >
> > Here is a features configured:
> >
> > vpp# show interface tap0 features
> > Feature paths configured on tap0...
> >
> > nsh-eth-output:
> >  none configured
> >
> > nsh-output:
> >  none configured
> >
> > mpls-output:
> >  none configured
> >
> > mpls-input:
> >  mpls-not-enabled
> >
> > arp:
> >  arp-disabled
> >
> > ip6-drop:
> >  none configured
> >
> > ip6-punt:
> >  none configured
> >
> > ip6-local:
> >  none configured
> >
> > ip6-output:
> >  none configured
> >
> > ip6-multicast:
> >  ip6-not-enabled
> >
> > ip6-unicast:
> >  ip6-not-enabled
> >
> > ip4-drop:
> >  none configured
> >
> > ip4-punt:
> >  none configured
> >
> > ip4-local:
> >  none configured
> >
> > ip4-output:
> >  none configured
> >
> > ip4-multicast:
> >  ip4-not-enabled
> >
> > ip4-unicast:
> >  ip4-not-enabled
> >
> > l2-output-nonip:
> >  none configured
> >
> > l2-input-nonip:
> >  none configured
> >
> > l2-output-ip6:
> >  none configured
> >
> > l2-input-ip6:
> >  none configured
> >
> > l2-output-ip4:
> >  none configured
> >
> > l2-input-ip4:
> >  none configured
> >
> > ethernet-output:
> >  none configured
> >
> > interface-output:
> >  mactime-tx
> >
> > device-input:
> >  mactime
> >
> > l2-input:
> >            LEARN (l2-learn)
> >              FWD (l2-fwd)
> >         UU_FLOOD (l2-flood)
> >            FLOOD (l2-flood)
> >
> > l2-output:
> >           OUTPUT (interface-output)
> >
> > vpp# show node counters
> >   Count                    Node                  Reason
> >     10971               mactime-tx               Permitted packets
> >     14413                l2-output               L2 output packets
> >     14510                l2-learn                L2 learn packets
> >       147                l2-learn                L2 learn misses
> >        17                l2-learn                L2 mac moves
> >     14510                l2-input                L2 input packets
> >        13                 l2-fwd                 Reflection Drop
> >     12872                l2-flood                L2 flood packets
> >        84                l2-flood                L2 replication complete
> >
> > As is seen from counters there is no mactime (rx part) counters.
> >
> > Any ideas ?
> >
> > On Tue, Nov 12, 2019 at 10:25 AM Damjan Marion <dmar...@me.com> wrote:
> >>
> >>
> >>
> >>> On 12 Nov 2019, at 08:57, Dimitar Ivanov <d...@telco.com> wrote:
> >>>
> >>> Hi All,
> >>> I need a help in investigation of one problem with TAP interface. I
> try to develop plugin that inspects packets send from Host Linux via TAP
> interface and take some actions on them. Scenario is like this:
> >>> Linux Host Tap -->vpp tap0 --> other vpp interface. My node is set to
> be visited before 'ethernet-input'. Strange is that when Linux starts to
> send packets over tap interface my node is not called. I have checked
> counters of all nodes and see that event ethernet-input node counters are
> not increment. Only nodes that are activated (regarding counters) are
> l2-input, l2-fwd and etc.
> >>> I was with impression that my code is not correct. In order to isolate
> mistakes from my side, i have activate mactime feature on same interface.
> The result was that mactime-tx is activated, but mactime - not. What is
> special on tap interface and why flow is not same like other interfaces ?
> Do You have some suggestion how to install my node in order to be on RX
> flow of TAP interface ? VPP version is v19.08.1. -=-=-=-=-=-=-=-=-=-=-=-
> >>> Links: You receive all messages sent to this group.
> >>
> >> It may be that you are using old tap code which doesn’t support
> device-input feature arc.
> >>
> >> Do you use “create tap ...” command?
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#14569): https://lists.fd.io/g/vpp-dev/message/14569
> > Mute This Topic: https://lists.fd.io/mt/54144964/675642
> > Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480514
> > Group Owner: vpp-dev+ow...@lists.fd.io
> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [dmar...@me.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14573): https://lists.fd.io/g/vpp-dev/message/14573
Mute This Topic: https://lists.fd.io/mt/54144964/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
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