Hi, Thanks for the help. Now I am receiving the UDP punt packets in the UDP application running on Linux. However I am not able to send back the packets from UDP applications, the packets are getting dropped on VPP. Below is the trace -
*vpp> trace add tuntap-rx 10* 00:02:49:998097: ip4-input-no-checksum UDP: 70.1.1.51 -> 70.1.1.58 tos 0x00, ttl 64, length 128, checksum 0x7596 fragment id 0x7668 UDP: 50000 -> 5000 length 108, checksum 0xec09 00:02:49:998098: ip4-drop UDP: 70.1.1.51 -> 70.1.1.58 tos 0x00, ttl 64, length 128, checksum 0x7596 fragment id 0x7668 UDP: 50000 -> 5000 length 108, checksum 0xec09 00:02:49:998099: error-drop ip4-input: ip4 adjacency drop I browsed the code of* ip4_input_inline *and found that next0 value is always filled as *5* in below function. *#define vlib_validate_buffer_enqueue_x1(vm,node,next_index,to_next,n_left_to_next,bi0,next0)* next0(5) means ip4_drop :- *ip4-input-no-checksum error-drop [0] tuntap-rx* * error-punt [1] tapcli-rx* * ip4-lookup [2] dpdk-input* * ip4-lookup-multicast [3] handoff-dispatch* * ip4-icmp-error [4]* * ip4-drop [5] * next0 variable is filled as 5 by the function *vnet_get_config_data. *Please let me know what is the purpose of net_get_config_data and how it determines the next node?? *Regards* *Prerit* On Fri, Nov 18, 2016 at 8:21 PM, John Lo (loj) <l...@cisco.com> wrote: > The tuntap-tx node in VPP does not save any data to support packet trace. > That’s why you do see any packet trace after error-punt. -John > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Dave Barach (dbarach) > *Sent:* Friday, November 18, 2016 8:23 AM > *To:* Prerit Jain <prerit.j...@gmail.com> > > *Cc:* vpp-dev@lists.fd.io > *Subject:* Re: [vpp-dev] Fwd: Punting UDP packets to Kernel > > > > You saw the packets w/ tcpdump, right? > > > > Thanks… Dave > > > > *From:* Prerit Jain [mailto:prerit.j...@gmail.com <prerit.j...@gmail.com>] > > *Sent:* Friday, November 18, 2016 8:15 AM > *To:* Dave Barach (dbarach) <dbar...@cisco.com> > *Cc:* vpp-dev@lists.fd.io > *Subject:* Re: [vpp-dev] Fwd: Punting UDP packets to Kernel > > > > > > You mean that *ip4-udp-punt *node will directly write to tuntap > interface for sending the packet to Kernel. > > > > On Fri, Nov 18, 2016 at 5:54 PM, Dave Barach (dbarach) <dbar...@cisco.com> > wrote: > > Expected behavior. > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Prerit Jain > *Sent:* Friday, November 18, 2016 5:33 AM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] Fwd: Punting UDP packets to Kernel > > > > > > > > Thanks Dave. > > > > After adding below code in /etc/vpp/startup.conf > > tuntap { > > enable > > } > > > > I am able to capture the packets in kernel using tcpdump. However still > the packet flow is terminating in *error-punt *in trace > > *...* > > *00:06:52:855592: ip4-local* > > * UDP: 70.1.1.58 -> 70.1.1.51* > > * tos 0x00, ttl 64, length 1028, checksum 0xcf79* > > * fragment id 0x1901* > > * UDP: 5000 -> 4500* > > * length 1008, checksum 0x8d26* > > *00:06:52:855592: ip4-udp-lookup* > > * UDP: src-port 5000 dst-port 4500* > > *00:06:52:855593: error-punt* > > * ip4-udp-punt: udp port punt* > > > > I do not see the node "tuntap-tx" in trace. While punting packet to > kernel, the packet will not pass through "tuntap-tx" ?? > > > > > > > > On Thu, Nov 17, 2016 at 11:30 PM, Dave Barach (dbarach) <dbar...@cisco.com> > wrote: > > See .../vnet/vnet/unix/tuntap.c vs. .../vnet/vnet/unix/tapcli.c. > > > > Only the tuntap device is capable of punting packets to the linux stack > through a tun interface. You picked the wrong one. > > > > Note that tuntap must be enabled explicitly from the vpp command line. > > > > Thanks… Dave > > > > *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Prerit Jain > *Sent:* Thursday, November 17, 2016 7:08 AM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] Punting UDP packets to Kernel > > > > > > I want to send UDP packets with port 4500 to Kernel. > > > > For that I send UDP packets from external interface (70.1.1.58:port 5000) > to VPP host (70.1.1.51: 4500) and did below configuration. > > > > Set up the punt environment- > > * set punt udp 4500* > > Created the tap interface - > > * tap connect tap-0* > > > > *In the below capture VPP trace, the packet are not going beyond the node > (**ip4-udp-punt) **to kernel.* > > > > *00:06:52:855590: dpdk-input* > > * GigabitEthernet1/0/2 rx queue 0* > > * buffer 0x174fcf: current data 14, length 1028, free-list 0, totlen-nifb > 0, trace 0x9* > > * PKT MBUF: port 0, nb_segs 1, pkt_len 1042* > > * buf_len 2176, data_len 1042, ol_flags 0x0, data_off 128, phys_addr > 0xd753b2c0* > > * packet_type 0x211* > > * Packet Types* > > * RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet* > > * RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers* > > * RTE_PTYPE_L4_UDP (0x0200) UDP packet* > > * IP4: ec:f4:bb:d5:68:a6 -> ec:f4:bb:c4:4d:46* > > * UDP: 70.1.1.58 -> 70.1.1.51* > > * tos 0x00, ttl 64, length 1028, checksum 0xcf79* > > * fragment id 0x1901* > > * UDP: 5000 -> 4500* > > * length 1008, checksum 0x8d26* > > *00:06:52:855591: ip4-input-no-checksum* > > * UDP: 70.1.1.58 -> 70.1.1.51* > > * tos 0x00, ttl 64, length 1028, checksum 0xcf79* > > * fragment id 0x1901* > > * UDP: 5000 -> 4500* > > * length 1008, checksum 0x8d26* > > *00:06:52:855592: ip4-lookup* > > * fib 0 dpo-idx 5 flow hash: 0x00000000* > > * UDP: 70.1.1.58 -> 70.1.1.51* > > * tos 0x00, ttl 64, length 1028, checksum 0xcf79* > > * fragment id 0x1901* > > * UDP: 5000 -> 4500* > > * length 1008, checksum 0x8d26* > > *00:06:52:855592: ip4-local* > > * UDP: 70.1.1.58 -> 70.1.1.51* > > * tos 0x00, ttl 64, length 1028, checksum 0xcf79* > > * fragment id 0x1901* > > * UDP: 5000 -> 4500* > > * length 1008, checksum 0x8d26* > > *00:06:52:855592: ip4-udp-lookup* > > * UDP: src-port 5000 dst-port 4500* > > *00:06:52:855593: error-punt* > > * ip4-udp-punt: udp port punt* > > > > > > >
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev