UDP Sockets

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English

The following table shows typical output for a UDP socket

Table 1. Stackdump Output: UDP Socket
Sample Output Description
UDP Socket configuration:
4:1 Stack:socket id.
lcl=192.168.1.2:38142 Local ip:port address.
rmt=192.168.1.1:42638 Remote ip:port address.
UDP Connection is UDP.
lock: 20000000 LOCKED

Internal socket lock status, as a hexadecimal number, followed by status names including:

  • LOCKED
  • CONTENDED.
rx_wake=000e69b0

Internal sequence value that is incremented each time a receive queue is ‘woken’.

(RQ) indicates that a wake has been requested.

tx_wake=000e69b1

Internal sequence value that is incremented each time a transmit queue is ‘woken’.

(RQ) indicates that a wake has been requested.

flags:

Flags (if any), including:

  • WK_TX, WK_RX
  • TCP_PP
  • ORPH
  • ACCEPTQ
  • DEFERRED
  • AVOID_INT
  • O_ASYNC, O_NONBLOCK, O_NDELAY, O_APPEND, O_CLOEXEC
  • CACHE, PASSIVE_CACHE, CACHE_NO_FD
  • OS_BACKED
  • NONB_UNSYNCED.
ul_poll: User-level poll():
  • 0 spin cycles
  • in spin cycles
  • 0 (usec)
  • in μs.
uid=0 User id that owns this socket.
s_flags: FILTER

Socket flags, including:

  • CORK
  • SHUTRD, SHUTWR
  • TCP_NODELAY
  • ACK
  • REUSE
  • KALIVE
  • BCAST
  • OOBIN
  • LINGER
  • DONTROUTE
  • FILTER
  • BOUND, ABOUND, PBOUND
  • SNDBUF, RCVBUF
  • SW_FILTER_FULL
  • TRANSPARENT
  • SCALACTIVE, SCALPASSIVE
  • MAC_FILTER
  • REUSEPORT
  • BOUND_ALIEN
  • CONNECT_MUST_BIND
  • PMTU_DO
  • ALWAYS_DF
  • IP_TTL
  • DEFERRED_BIND
  • V6ONLY
  • NOMCAST.
rcvbuf=129024 Socket receive buffer size.
sndbuf=129024 Socket send buffer size.
bindtodev=-1(01,0:0) Device to which the socket is bound, given as an interface, or -1 if unbound. This is followed by an (interface index, hardware port:vlan) tuple.
ttl=64 Initial TTL value.
rcvtimeo_ms=0 Timeout value (microseconds) before an error is generated for receive functions, as set by SO_RCVTIMEO.
sndtimeo_ms=0 Timeout value (microseconds) before an error is generated for send functions, as set by SO_SNDTIMEO.
sigown=0 The PID receiving signals from this socket.
cmsg=

Current message flags, including:

  • NO_MCAST_TX.
rx_errno=0 Zero whilst data can still arrive, otherwise contains error code.
tx_errno=0 Zero if transmit can still happen, otherwise contains error code.
so_error=0 Current socket error, or zero if no error.
os_sock=0 0 if the socket is handled by Onload, 1 if the socket is handled by the OS and not by Onload.
TX Socket is being used for transmit.
epoll3: ready_list_id 0 List of ready sockets from the epoll3 set.
udpflags: FILT MCAST_LOOP RXOS

UDP flags currently set for this socket, including:

  • FILT
  • MCAST_LOOP
  • IMP_BIND
  • EFSND
  • LAST_RCV_ON
  • BIND
  • MC_B2D
  • NO_MC_B2D
  • PEEKOS
  • SO_TS
  • MC
  • MC_FILT
  • NO_UC_FILT.
rcv: Receive data:
  • q_pkts=0
  • Number of packets currently in receive queue.
  • reap=2
  • Number of packet buffers in the process of being freed for reuse.
  • tot_pkts=944560
  • Total number of packet buffers used.
  • Note any packets that are delivered to multiple receive queues get wrapped in an additional 0-length buffer, to reference those queues.
rcv: Further receive data:
  • oflow_drop=0(0%)
  • Number of packets dropped because the buffer is full.
  • mem_drop=0
  • Number of packets dropped due to running out of packet buffer memory.
  • eagain=0
  • Number of times the application tried to read from a socket when there is no data ready. This value can be ignored on the receive side.
  • pktinfo=0
  • Number of times an IP_PKTINFO control message was received.
  • q_max_pkts=0
  • Maximum depth reached by the receive queue (packets).
rcv: Further receive data:
  • os=0(0%)
  • Number of packets received via the operating system, both as a number and as a percentage of total packets received.
  • os_slow=0
  • Number of packets received via the operating system slow path.
  • os_error=0
  • Number of times a recv() function call via the operating system returned an error.
snd: Send data:
  • q=0+0
  • Number of bytes sent to the interface but not yet transmitted, + number of bytes waiting because the interface lock is contended in sendmsg().
  • ul=944561
  • Number of packets sent via Onload.
  • os=0(0%)
  • Number of packets sent via the operating system, both as a number and as a percentage of total packets sent.
snd: Send data…
  • LOCK
…about locks:
  • cp=1(0%)
  • Count of locks held while updating the control plane.
  • pkt=737815(99%)
  • Count of locks to get a packet buffer.
  • snd=3(0%)
  • Count of locks held when sending.
  • poll=0(0%)
  • Count of locks held to poll the stack.
  • defer=1(0%)
  • Count of sends deferred to the lock holder.
snd: Send data…
  • MCAST
…about multicast:
  • if=9
  • The interfaces being used by the UDP stack.
  • src=172.16.128.28
  • Source IP address for multicast.
  • ttl=1
  • Initial TTL value.
snd: Send data…
  • TO
…about unconnected sends:
  • n=737820
  • Total number of UDP packets sent on this socket via Onload.
  • match=737819(99%)
  • Number of packets that matched the cache, both as a number and as a percentage of total packets sent.
  • lookup=1+0(0%)
  • Number of packets needing lookup, from the control plane + because unlocked, both as numbers and as a percentage of total packets sent.
  • Onloaded(Valid)
  • Status of cached control plane information, one of:
  • Onloaded = can reach the destination via an accelerated interface
  • NoMac
  • NoRoute
  • ViaOs
  • Local
  • MacFail
  • followed by its validity:
  • (Valid): information is up-to-date. Can send immediately using this information.
  • (Old): information might be out-of-date. On next send Onload will do a control plane lookup - this will add some latency.
snd: Further send data…
  • TO
…about unconnected sends:
  • if=9
  • Interface being used.
  • mtu=1500
  • MTU being used.
  • intf_i=0
  • Intf_i value.
  • vlan=0
  • VLAN being used.
  • encap=4
  • Types of encapsulation supported by the NIC, as a hexadecimal mask.
snd: Further send data…
  • TO
…about unconnected sends:
  • 172.16.128.28:34645 =>
  • UDP send multicast source ip:port address.
  • 224.1.2.3:8001
  • UDP send multicast ip:port address.
snd: Further send data…
  • CON
…about connected sends:
  • n=0
  • Total number of UDP packets sent on this socket via Onload.
  • lookup=0
  • Number of packets needing lookup from the control plane.
  • NoRoute(Old)
  • Status of cached control plane information, one of:
  • Onloaded = can reach the destination via an accelerated interface
  • NoMac
  • NoRoute
  • ViaOs
  • Local
  • MacFail
  • followed by its validity:
  • (Valid): information is up-to-date. Can send immediately using this information.
  • (Old): information might be out-of-date. On next send Onload will do a control plane lookup - this will add some latency.
snd: Further send data…
  • CON
…about connected sends:
  • if=9
  • Interface being used.
  • mtu=0
  • MTU being used.
  • intf_i=-1
  • Intf_i value.
  • vlan=0
  • VLAN being used.
  • encap=0
  • Types of encapsulation supported by the NIC, as a hexadecimal mask.
snd: Further send data:
  • eagain=0
  • Count of the number of times the application tried to send data, but the transmit queue is already full. A high value on the send side might indicate transmit issues.
  • spin=0
  • Number of times process had to spin when the send queue was full.
  • block=0
  • Number of times process had to block when the send queue was full.
snd: Further send data:
  • poll_avoids_full=0
  • Number of times polling created space in the send queue.
  • fragments=0
  • Number of (non first) fragments sent.
  • confirm=0
  • Number of packets sent with MSG_CONFIRM flag.
snd: Further send data:
  • os_slow=1
  • Number of packets sent via the operating system slow path.
  • os_late=0
  • Number of packets sent via the operating system after copying
  • unconnect_late=0
  • Number of packets silently dropped when process/thread becomes disconnected during a send procedure.
  • nomac=0(0%)
  • Number of times when no MAC address was known, so ARP was required before delivering traffic.