linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <jbrouer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Carsten Andrich
	<carsten.andrich-hs6bpBdVsEZfm0AUMx9V0g@public.gmane.org>
Cc: Willem de Bruijn
	<willemb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Daniel Borkmann
	<dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Subject: Re: Improving PACKET_{RX,TX}_RING documentation
Date: Thu, 22 May 2014 15:37:55 +0200	[thread overview]
Message-ID: <20140522153755.13aa7f5a@redhat.com> (raw)
In-Reply-To: <d1afaaacb05c031517bb96211c098edf@localhost>


On Thu, 22 May 2014 14:22:22 +0200 Carsten Andrich <carsten.andrich-hs6bpBdVsEZfm0AUMx9V0g@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-05-22 13:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-17 13:13 Improving PACKET_{RX,TX}_RING documentation Carsten Andrich
     [not found] ` <1400332406.2395.35.camel-FQO4gtnRtnzkVFMGpb/cPg@public.gmane.org>
2014-05-19  4:54   ` Michael Kerrisk (man-pages)
     [not found]     ` <53798E97.1000505-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-19 10:14       ` Daniel Borkmann
     [not found]         ` <5379D9A2.1070008-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-19 15:05           ` Willem de Bruijn
     [not found]             ` <CA+FuTSeWh_iQGqc-4usL7vr28OrkHTnBvHvXvVO=LcGsNRgtMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-19 16:01               ` Daniel Borkmann
2014-05-22 12:22               ` Carsten Andrich
2014-05-22 13:13                 ` Michael Kerrisk (man-pages)
2014-05-22 13:37                 ` Jesper Dangaard Brouer [this message]
2014-05-22 14:51                 ` Willem de Bruijn
     [not found]                   ` <CA+FuTSfpORKtm_kdG+CycoPiq+Gxf58=nXqKApFEmR+xZs69_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-26 10:49                     ` Carsten Andrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140522153755.13aa7f5a@redhat.com \
    --to=jbrouer-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=carsten.andrich-hs6bpBdVsEZfm0AUMx9V0g@public.gmane.org \
    --cc=dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=willemb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).