[PATCH] packet.7: PACKET_TX_RING packet status is a bitmap; explain TP_STATUS_LOSING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The context for this patch can be found in this email I sent to the
list a few weeks ago. It's the same patch with a description of
TP_STATUS_LOSING added:

http://article.gmane.org/gmane.linux.man/5145

As far as I can tell from LXR, the code hasn't changed in the latest
version (3.13.5) - tpacket_rcv() seems to be where the receive logic
is for PACKET_RX_RING. The bit map behavior seems to be ancient - it
was there in 2.6.7 as far as I can tell.

diff --git a/man7/packet.7 b/man7/packet.7
index d8257f9..187da08 100644
--- a/man7/packet.7
+++ b/man7/packet.7
@@ -357,9 +357,13 @@ The packet socket owns all slots with status
 .BR TP_STATUS_KERNEL .
 After filling a slot, it changes the status of the slot to transfer
 ownership to the application.
-During normal operation, the new status is
-.BR TP_STATUS_USER ,
-to signal that a correctly received packet has been stored.
+During normal operation, the new status has the
+.BR TP_STATUS_USER
+bit set to signal that a correctly received packet has been stored.
+If the status has the
+.BR TP_STATUS_LOSING
+bit set, it means the kernel has dropped packets due to lack of
+space in the ring.
 When the application has finished processing a packet, it transfers
 ownership of the slot back to the socket by setting the status to
 .BR TP_STATUS_KERNEL .

Thanks,
Stefan.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux