From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Tom Parkin <tparkin@katalix.com>
Cc: James Chapman <jchapman@katalix.com>,
edumazet@google.com, gnault@redhat.com, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, corbet@lwn.net,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3] PPPoL2TP: Add more code snippets
Date: Mon, 12 Feb 2024 23:21:55 +0100 [thread overview]
Message-ID: <20240212222155.shiacjlqupqoliym@begin> (raw)
In-Reply-To: <ZcqMzP1RQye9o4eB@katalix.com>
Hello,
Thanks for reviewing, I'll send a v4.
Tom Parkin, le lun. 12 févr. 2024 21:25:32 +0000, a ecrit:
> > + ret = ioctl(session_fd1, PPPIOCGCHAN, &chindx1);
> > + if (ret < 0)
> > + return -errno;
> > +
> > + ret = ioctl(session_fd2, PPPIOCGCHAN, &chind2x);
>
> I think we need to be clear here in this example what session_fd1 and
> session_fd2 are, and how they have come to be, since they haven't been
> mentioned in the examples so far.
Right (though it's called session_fd above), I have added explicit input
descriptions.
> I'm not sure whether it helps or not, but when we were working on l2tp-ktest
> initially we had tests for the bridge ioctl. The tests bridged a PPPoE
> channel with a PPPoL2TP one (which was the original motivation for
> PPPIOCBRIDGECHAN). The code is here:
>
> https://github.com/katalix/l2tp-ktest/blob/master/src/util.c#L592
>
> So in that codebase we have a pppoe fd and a pppol2tp fd, both of
> which have had been attached using PPPIOCATTCHAN.
>
> We then bridge those two channels using PPPIOCBRIDGECHAN.
>
> I think the bridging is a complex use-case for what is already quite
> an involved API (lots of file descriptors and indices to keep track
> of!). So I think the code snippet needs to be as clear as we can make
> it.
Yes, I kept the simple l2tp-to-l2tp example, but mentioned that other
types of ppp channels can also be bridged. The important part is that
the code snippets show exactly what kind of fd is expected where :)
Samuel
prev parent reply other threads:[~2024-02-12 22:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-03 22:35 [PATCHv3] PPPoL2TP: Add more code snippets Samuel Thibault
2024-02-09 16:20 ` Jakub Kicinski
2024-02-12 21:33 ` Tom Parkin
2024-02-12 21:25 ` Tom Parkin
2024-02-12 22:21 ` Samuel Thibault [this message]
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=20240212222155.shiacjlqupqoliym@begin \
--to=samuel.thibault@ens-lyon.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=jchapman@katalix.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tparkin@katalix.com \
/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).