bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Seltzer Richman <grantseltzer@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next 0/3] Autogenerating API documentation
Date: Fri, 4 Jun 2021 17:18:53 -0400	[thread overview]
Message-ID: <CAO658oXRN=JnP+e=qM2-uBu94BxoWCyHcScOgSwxpoHOw5ByLQ@mail.gmail.com> (raw)
In-Reply-To: <CAO658oWwqtZFnhVg3hC8dO=2obOKn5Mp2uqrOYa-3xsNwiRU8Q@mail.gmail.com>

On Tue, Jun 1, 2021 at 9:06 PM Grant Seltzer Richman
<grantseltzer@gmail.com> wrote:
>
> On Tue, Jun 1, 2021 at 7:19 PM Jonathan Corbet <corbet@lwn.net> wrote:
> >
> > Grant Seltzer Richman <grantseltzer@gmail.com> writes:
> >
> > > Andrii cuts releases of libbpf using the github mirror at
> > > github.com/libbpf/libbpf. There's more context in the README there,
> > > but most of the major distributions package libbpf from this mirror.
> > > Since developers that use libbpf in their applications include libbpf
> > > based on these github releases instead of versions of Linux (i.e. I
> > > use libbpf 0.4, not libbpf from linux 5.14), it's important to have
> > > the API documentation be labeled by the github release versions. Is
> > > there any mechanism in the kernel docs that would allow us to do that?
> > > Would it make more sense for the libbpf community to maintain their
> > > own documentation system/website for this purpose?
> >
> > It depends on how you want that labeling to look, I guess.  One simple
> > thing might be to put a DOC: block into the libbpf code that holds the
> > version number, then use a kernel-doc directive to pull it in in the
> > appropriate place.  Alternatives might include adding a bit of magic to
> > Documentation/conf.py to fetch a "#define VERSION# out of the source
> > somewhere and stash the information away.
>
> Gotcha, I will investigate these approaches. Thanks!

After investigating/attempting these approaches, my opinion is that it
would be better to have a separate libbpf documentation system (sphinx
configuration files). This way we can maintain separate versions of
the documentation for each release/version without having duplicate
pages, and without having to heavily change the kernel docs files to
fit libbpf specific needs.

If you check out libbpf.readthedocs.io you can see what that would
look like. I made a test release (v21.21.21) to show how easy this is.
That is being pulled from my PR at github.com/libbpf/libbpf/pull/260.

I'm fine with having this new sphinx configuration in the kernel tree,
I'm also fine with having it on the github mirror. Both make sense to
me. Either way the comment docs have to be submitted through the
mailing list.

One last idea I have is to have the non-api docs (for example, the
document describing naming convention in libbpf) in the kernel tree,
and sync it in the github mirror.

Please feel free to ask questions, I've been thinking a lot about
this! Once we decide on which way to go I can have this up and running
almost immediately.
> >
> > If you're wanting to replace the version code that appears at the top of
> > the left column in the HTML output, though, it's going to be a bit
> > harder.  I don't doubt we can do it, but it may require messing around
> > with template files and such.
> >
> > Thanks,
> >
> > jon

  reply	other threads:[~2021-06-04 21:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  5:47 [PATCH bpf-next 0/3] Autogenerating API documentation grantseltzer
2021-04-29  5:47 ` [PATCH bpf-next 1/3] bpf: Add sphinx documentation build files grantseltzer
2021-04-29  5:47 ` [PATCH bpf-next 2/3] bpf: Add doxygen configuration file grantseltzer
2021-04-29  5:47 ` [PATCH bpf-next 3/3] bpf: Add rst docs for libbpf grantseltzer
2021-04-29 22:57 ` [PATCH bpf-next 0/3] Autogenerating API documentation Jonathan Corbet
2021-04-30 14:04   ` Grant Seltzer Richman
2021-04-30 14:22     ` Jonathan Corbet
2021-04-30 14:27       ` Grant Seltzer Richman
2021-04-30 17:30         ` Andrii Nakryiko
2021-05-10 14:58           ` Grant Seltzer Richman
2021-05-10 17:48             ` Andrii Nakryiko
2021-05-26  3:22               ` Grant Seltzer Richman
2021-05-26 20:45                 ` Andrii Nakryiko
2021-05-28 14:50                   ` Grant Seltzer Richman
2021-06-01 19:01                     ` Jonathan Corbet
2021-06-01 22:49                       ` Grant Seltzer Richman
2021-06-01 23:19                         ` Jonathan Corbet
2021-06-02  1:06                           ` Grant Seltzer Richman
2021-06-04 21:18                             ` Grant Seltzer Richman [this message]
2021-06-07 22:45                               ` Andrii Nakryiko
2021-06-09 17:04                                 ` Grant Seltzer Richman
2021-06-10 17:14                                   ` Andrii Nakryiko
2021-06-11 20:00                                     ` Grant Seltzer Richman
2021-06-14 22:35                                       ` Andrii Nakryiko

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='CAO658oXRN=JnP+e=qM2-uBu94BxoWCyHcScOgSwxpoHOw5ByLQ@mail.gmail.com' \
    --to=grantseltzer@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=daniel@iogearbox.net \
    /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).