Re: Improving PACKET_{RX,TX}_RING documentation

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

 



On Thu, 22 May 2014 14:22:22 +0200 Carsten Andrich <carsten.andrich@xxxxxxxxxxxxx> wrote:

> Using positive wording is always a good idea, but packet_mmap.txt
> already tricked me into believing that PACKET_TX_RING should be faster
> than plain sendto(). The user should be allowed to make an informed
> decision, which requires the manpage to tell the (ugly) truth that
> sendto() currently outperforms TX_RING.

See:
https://github.com/netsniff-ng/netsniff-ng/commit/d21b30bd64fdf4e7358037aa2d6f0cea02c49b6e

With most recent trafgen using small packets, TX_RING version is faster than sendto().

 
> > The optimization you refer to is to attach the tx-only packet socket
> > to a protocol family that is never observed, so that no packets are
> > looped back into the socket on receive. This is a great trick. There
> > are probably others. Again, I believe that such details belong more in
> > packet_mmap.txt than in the man page. But that is just one opinion, so
> > I'll gladly defer to Michael and others on that point.

See commit, on how to avoid the packet_rcv() call:
https://github.com/netsniff-ng/netsniff-ng/commit/c3602a995b21e8133c7f

It differs a little sendto() vs. TX_RING setup.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer
--
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