PACKET_COPY_THRESH question

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

 




Hi,

I've RTFS and a previous posting of Alexey on the subject and just want
some confirmation whether I've understood some details of mmapped packet
sockets correctly.

If I'm just interested in the first x bytes of each packet, i set the
framesize big enough to receive tpacket_hdr, sll and x bytes and the
kernel will truncate packets bigger than that and still put them in the
ring.

If, however, I want all bytes of all packets, I have to recvmsg those
packets that won't fit into a ring slot (because framesize is not big
enough) and this will be indicated via TP_STATUS_COPY.

Correct?

Also, what difference is there between mapping 4 blocks of 4K or one
block of 16K in PACKET_RX_RING?

Thanks,
Udo.
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux