Linux Manual Pages development
 help / color / mirror / Atom feed
From: Carsten Andrich <carsten.andrich-hs6bpBdVsEZfm0AUMx9V0g@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Willem de Bruijn
	<willemb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Daniel Borkmann
	<dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch] packet.7: PACKET_LOSS has inverse meaning
Date: Wed, 23 Apr 2014 10:51:24 +0200	[thread overview]
Message-ID: <e1a7b65cad75dd1a52721826c226c352@localhost> (raw)
In-Reply-To: <53575872.6080403-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

"Michael Kerrisk (man-pages)" schrieb:
> How would adding just a little more precision be:
> 
> [[
> However, if
> .BR PACKET_LOSS
> is set, any malformed packet will be skipped, its status 
> .RI ( tp_status
> in the
> .I tpacket_hdr
> structure) reset to
> .BR TP_STATUS_AVAILABLE ,
> and the transmission process continued.
> ]]
> 
> ?

I sense a disturb ... ehm ... general discussion regarding PACKET_MMAP
documenation arising.

I agree with Willem's commit message, adding PACKET_MMAP to packet.7:
https://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/?id=dbb4f7516b
> It tries to balance being informative with exposing kernel detail
> that is unlikely to be used by most readers or that may change
> frequently. For implementation details, the manpage points to the
> documentation in kernel Documentation/networking. Let me know if
> options should be added or removed.

The entire packet.7 manpage does not mention struct tpacket_hdr a
single time,
so mentioning it only when describing the PACKET_LOSS socket option may
confuse
the reader. Particulary since different versions of this struct exist.

In my opinion packet.7 should be complete (and correct), yet brief in
describing anything PACKET_MMAP related, so anyone with a basic
unterstanding
of PACKET_MMAP internals will comprehend the descriptions in packet.7.
packet.7 already refers to Documentation/networking/packet_mmap.txt for
additional information. Reading only packet.7 will not enable anyone
unfamiliar
with PACKET_MMAP to actually use it.

This brings me to packet_mmap.txt, which -- I am sorry to say --
definitely
needs to be improved. It lacks some information (e.g. PACKET_LOSS is
not
mentioned at all), should give some basic usage examples, clarify some
details, etc. It does not mention the excellent example code in
/tools/testing/selftests/net/psock_tpacket.c at all, which I only
stumled upon
yesterday. It would have been very helpful to me, when I was getting
started
with PACKET_MMAP, since packet_mmap.txt was quite puzzling in the
beginning.

Both packet.7 and packet_mmap.txt should be synchronized to some
extent, so
the former gives basic information and the latter contains
implementation
details. But that would be a lot of work ...

Cheers,
Carsten

PS: This is not me volunteering to help in that effort. At least not
yet ;)
--
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-04-23  8:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 16:01 [patch] packet.7: PACKET_LOSS has inverse meaning Carsten Andrich
2014-04-22 18:23 ` Michael Kerrisk (man-pages)
     [not found]   ` <5356B3BA.7050401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-22 18:36     ` Willem de Bruijn
     [not found]       ` <CA+FuTSc=4fwH=+jX58teeQHrRse718qLBOLzAcrZJSYug2TfSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22 18:55         ` Michael Kerrisk (man-pages)
     [not found]           ` <5356BB3F.4030502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-22 19:06             ` Carsten Andrich
2014-04-22 19:14             ` Willem de Bruijn
     [not found]               ` <CA+FuTScUexjc6bETYMVgPUgmN5CSR40=UrELT9N363Tvk1+waA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22 20:53                 ` Carsten Andrich
     [not found]                   ` <1398200019.5031.24.camel-FQO4gtnRtnzkVFMGpb/cPg@public.gmane.org>
2014-04-23  6:06                     ` Michael Kerrisk (man-pages)
     [not found]                       ` <53575872.6080403-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-23  8:51                         ` Carsten Andrich [this message]
2014-04-23 10:12                           ` Michael Kerrisk (man-pages)
     [not found]                             ` <53579224.3060006-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-23 19:10                               ` Carsten Andrich
     [not found]                                 ` <1398280218.2416.18.camel-FQO4gtnRtnzkVFMGpb/cPg@public.gmane.org>
2014-04-24  8:20                                   ` Michael Kerrisk (man-pages)
     [not found]                                     ` <5358C957.8080402-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-24  9:39                                       ` Carsten Andrich
2014-04-24 10:21                                         ` Michael Kerrisk (man-pages)
     [not found]                                           ` <5358E59E.2000207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-24 10:45                                             ` Daniel Borkmann
     [not found]                                               ` <CA+FuTSf6_Lvs_Nht7TXPUT973rePz9hKEqv+YvPwXSq+kOoiyQ@mail.gmail.com>
     [not found]                                                 ` <CA+FuTSf6_Lvs_Nht7TXPUT973rePz9hKEqv+YvPwXSq+kOoiyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-24 19:07                                                   ` Carsten Andrich
     [not found]                                                     ` <1398366446.2647.4.camel-FQO4gtnRtnzkVFMGpb/cPg@public.gmane.org>
2014-04-25 11:20                                                       ` Neil Horman
2014-04-24 10:59                                             ` Neil Horman
2014-04-23 20:53                               ` Stefan Puiu

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=e1a7b65cad75dd1a52721826c226c352@localhost \
    --to=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=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