Dear Guy,

The clib_socket(...) APIs use system calls to send/receive data via the Linux 
network stack. Linux is blissfully unaware of vpp interfaces, so it can't work.

To receive ip-udp-for-us-to-a-dst-port packets on a vpp interface, register a 
graph node to process packets. See.../src/vnet/vxlan/vxlan.c:vxlan_init(...) 
for an example.

The API you'll need to use is udp_register_dst_port(...).

HTH... Dave

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Guy Doucet -X (gudoucet - FLEXTRONICS CANADA DESIGN SERVICES INC at 
Cisco)
Sent: Friday, May 12, 2017 3:33 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] using clib_socket interface to receive udp stream

Hi,

I am trying to use the clib_socket interface to process a udp multical stream 
being received by fd.io interface.

I followed the example in test_socket.c. I am registering for the stream as 
follows:

s->config = "232.0.0.1:5001";
..
error = clib_socket_init (s);
..
error = clib_socket_rx (s, 100);

The packets being received are as follows:

03:16:18:555288: dpdk-input
  GigabitEthernet6/0/3 rx queue 0
  buffer 0x1bf26a1: current data 14, length 1428, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x9
  PKT MBUF: port 0, nb_segs 1, pkt_len 1442
    buf_len 2176, data_len 1442, ol_flags 0x180, data_off 128, phys_addr 
0x72696740
    packet_type 0x211
    Packet Offload Flags
      PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
      PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
    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: 00:02:c5:1b:51:07 -> 01:00:5e:00:00:01
  UDP: 10.10.10.33 -> 232.0.0.1
    tos 0x00, ttl 64, length 1428, checksum 0x392d
    fragment id 0x0000, flags DONT_FRAGMENT
  UDP: 1000 -> 5001
    length 1408, checksum 0x0000
03:16:18:555289: ip4-input-no-checksum
  UDP: 10.10.10.33 -> 232.0.0.1
    tos 0x00, ttl 64, length 1428, checksum 0x392d
    fragment id 0x0000, flags DONT_FRAGMENT
  UDP: 1000 -> 5001
    length 1408, checksum 0x0000
03:16:18:555296: ip4-mfib-forward-lookup
  fib 0 entry 0
03:16:18:555297: ip4-mfib-forward-rpf
  entry 0 -1
03:16:18:555297: ip4-drop
    UDP: 10.10.10.33 -> 232.0.0.1
      tos 0x00, ttl 64, length 1428, checksum 0x392d
      fragment id 0x0000, flags DONT_FRAGMENT
    UDP: 1000 -> 5001
      length 1408, checksum 0x0000
03:16:18:555297: error-drop
  ip4-input: ip4 adjacency drop


I get an error on the receive. (d612a0e0).

Anyone have any ideas what could be going wrong.

Thanks,
Guy

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev
  • ... Guy Doucet -X (gudoucet - FLEXTRONICS CANADA DESIGN SERVICES INC at Cisco)
    • ... Dave Barach (dbarach)

Reply via email to