vpp icon indicating copy to clipboard operation
vpp copied to clipboard

[VPP-1685] vpp ping dropping icmp reply

Open vvalderrv opened this issue 10 months ago • 4 comments

Description

On latest master (I am testing 9febbcdc), ping from cli seems to ignore icmp replies which get dropped:

  1. create veth & assign Linux host IP

    ~# sudo ip link add dev vm1 type veth peer name vm2

    ~# sudo ifconfig vm2 1.1.1.2/24 up

  2. run VPP, disabling rdma to be sure

    ~# $PWD/build-root/install-vpp_debug-native/vpp/bin/vpp "unix { interactive } plugins

    Unknown macro: { plugin rdma_plugin.so { disable } }

    "

    DBGvpp# create host-interface name vm1

    DBGvpp# set int ip addr host-vm1 1.1.1.1/24

    DBGvpp# set int st host-vm1 up

    DBGvpp# clear trace

    DBGvpp# trace add af-packet-input 10

    DBGvpp# ping 1.1.1.2

    Statistics: 5 sent, 0 received, 100% packet loss

    DBGvpp# sh tr

                                      • Start of thread 0 vpp_main -------------------

                                        Packet 1

                                      																	</li>
                                      																
                                      																</li>
                                      															
                                      															</li>
                                      														
                                      														</li>
                                      													
                                      													</li>
                                      												
                                      												</li>
                                      											
                                      											</li>
                                      										
                                      										</li>
                                      									
                                      									</li>
                                      								
                                      								</li>
                                      							
                                      							</li>
                                      						
                                      						</li>
                                      					
                                      					</li>
                                      				
                                      				</li>
                                      			
                                      			</li>
                                      		
                                      		</li>
                                      	
                                      	</li>
                                      
                                      </li>
                                      

00:00:01:043605: af-packet-input

af_packet: hw_if_index 1 next-index 4

tpacket2_hdr:

  status 0x20000001 len 42 snaplen 42 mac 66 net 80

  sec 0x5ce6a84c nsec 0x28be2a1f vlan 0 vlan_tpid 0

00:00:01:044117: ethernet-input

ARP: f2:dc:63:9b:18:c2 -> 02:fe:61:ef:48:39

00:00:01:044171: arp-input

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

f2:dc:63:9b:18:c2/1.1.1.2 -> 02:fe:61:ef:48:39/1.1.1.1

00:00:01:044969: error-drop

rx:host-vm1

00:00:01:044980: drop

arp-input: ARP request IP4 source address learned

Packet 2

00:00:02:050854: af-packet-input

af_packet: hw_if_index 1 next-index 4

tpacket2_hdr:

  status 0x20000001 len 110 snaplen 110 mac 66 net 80

  sec 0x5ce6a84d nsec 0x294bbace vlan 0 vlan_tpid 0

00:00:02:051362: ethernet-input

IP4: f2:dc:63:9b:18:c2 -> 02:fe:61:ef:48:39

00:00:02:051380: ip4-input

ICMP: 1.1.1.2 -> 1.1.1.1

tos 0x00, ttl 64, length 96, checksum 0xd847

fragment id 0x9e51

ICMP echo_reply checksum 0x8665

00:00:02:051415: ip4-lookup

fib 0 dpo-idx 5 flow hash: 0x00000000

ICMP: 1.1.1.2 -> 1.1.1.1

tos 0x00, ttl 64, length 96, checksum 0xd847

fragment id 0x9e51

ICMP echo_reply checksum 0x8665

00:00:02:051430: ip4-local

ICMP: 1.1.1.2 -> 1.1.1.1

  tos 0x00, ttl 64, length 96, checksum 0xd847

  fragment id 0x9e51

ICMP echo_reply checksum 0x8665

00:00:02:051437: ip4-icmp-input

ICMP: 1.1.1.2 -> 1.1.1.1

tos 0x00, ttl 64, length 96, checksum 0xd847

fragment id 0x9e51

ICMP echo_reply checksum 0x8665

00:00:02:051444: vpe-icmp4-oam

OAM: rx from address 1.1.1.2, target index -1

00:00:02:051451: error-drop

rx:host-vm1

00:00:02:051458: drop

vpe-icmp4-oam: icmp4 replies dropped (no registration)

Assignee

Benoît Ganne

Reporter

Benoît Ganne

Comments

  • bganne (Thu, 23 May 2019 19:42:08 +0000): The order of initialization changed recently and oam got initialized after ping, overwriting next node with its own for icmp reply. So oam was broken for a long time but nobody noticed.
  • nranns (Thu, 23 May 2019 17:20:52 +0000): "vpe-icmp4-oam" how did that get there?
  • bganne (Thu, 23 May 2019 14:26:40 +0000): This was initially reported by Thomas on real HW with rdma driver: https://gist.github.com/tfherbert/c5b1ece10b1d37ca9df0752925f7f53c

Original issue: https://jira.fd.io/browse/VPP-1685

vvalderrv avatar Feb 02 '25 04:02 vvalderrv