BPF Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Documentation/networking/af_xdp: Inhibit reference to struct socket
@ 2019-08-10 12:17 Jonathan Neuschäfer
  2019-08-10 14:58 ` Jonathan Corbet
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Neuschäfer @ 2019-08-10 12:17 UTC (permalink / raw)
  To: linux-doc
  Cc: Jonathan Neuschäfer, David S. Miller, Jonathan Corbet,
	Alexei Starovoitov, Daniel Borkmann, Jakub Kicinski,
	Jesper Dangaard Brouer, John Fastabend, netdev, xdp-newbies, bpf,
	linux-kernel

With the recent change to auto-detect function names, Sphinx parses
socket() as a reference to the in-kernel definition of socket. It then
decides that struct socket is a good match, which was obviously not
intended in this case, because the text speaks about the syscall with
the same name.

Prevent socket() from being misinterpreted by wrapping it in ``inline
literal`` quotes.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 Documentation/networking/af_xdp.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst
index eeedc2e826aa..54f179ee6c33 100644
--- a/Documentation/networking/af_xdp.rst
+++ b/Documentation/networking/af_xdp.rst
@@ -20,7 +20,7 @@ bpf_redirect_map() function. AF_XDP sockets enable the possibility for
 XDP programs to redirect frames to a memory buffer in a user-space
 application.

-An AF_XDP socket (XSK) is created with the normal socket()
+An AF_XDP socket (XSK) is created with the normal ``socket()``
 syscall. Associated with each XSK are two rings: the RX ring and the
 TX ring. A socket can receive packets on the RX ring and it can send
 packets on the TX ring. These rings are registered and sized with the
--
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation/networking/af_xdp: Inhibit reference to struct socket
  2019-08-10 12:17 [PATCH] Documentation/networking/af_xdp: Inhibit reference to struct socket Jonathan Neuschäfer
@ 2019-08-10 14:58 ` Jonathan Corbet
  2019-08-11 11:32   ` Jonathan Neuschäfer
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2019-08-10 14:58 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: linux-doc, David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend, netdev,
	xdp-newbies, bpf, linux-kernel

On Sat, 10 Aug 2019 14:17:37 +0200
Jonathan Neuschäfer <j.neuschaefer@gmx.net> wrote:

> With the recent change to auto-detect function names, Sphinx parses
> socket() as a reference to the in-kernel definition of socket. It then
> decides that struct socket is a good match, which was obviously not
> intended in this case, because the text speaks about the syscall with
> the same name.
> 
> Prevent socket() from being misinterpreted by wrapping it in ``inline
> literal`` quotes.
> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>

Thanks for looking at that.  The better fix, though, would be to add
socket() to the Skipfuncs array in Documentation/sphinx/automarkup.py.
Then it will do the right thing everywhere without the need to add markup
to the RST files.

Thanks,

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation/networking/af_xdp: Inhibit reference to struct socket
  2019-08-10 14:58 ` Jonathan Corbet
@ 2019-08-11 11:32   ` Jonathan Neuschäfer
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Neuschäfer @ 2019-08-11 11:32 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Jonathan Neuschäfer, linux-doc, David S. Miller,
	Alexei Starovoitov, Daniel Borkmann, Jakub Kicinski,
	Jesper Dangaard Brouer, John Fastabend, netdev, xdp-newbies, bpf,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 971 bytes --]

On Sat, Aug 10, 2019 at 08:58:21AM -0600, Jonathan Corbet wrote:
> On Sat, 10 Aug 2019 14:17:37 +0200
> Jonathan Neuschäfer <j.neuschaefer@gmx.net> wrote:
> 
> > With the recent change to auto-detect function names, Sphinx parses
> > socket() as a reference to the in-kernel definition of socket. It then
> > decides that struct socket is a good match, which was obviously not
> > intended in this case, because the text speaks about the syscall with
> > the same name.
> > 
> > Prevent socket() from being misinterpreted by wrapping it in ``inline
> > literal`` quotes.
> > 
> > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> 
> Thanks for looking at that.  The better fix, though, would be to add
> socket() to the Skipfuncs array in Documentation/sphinx/automarkup.py.
> Then it will do the right thing everywhere without the need to add markup
> to the RST files.

Alright, I'll do that for v2.


Thanks,
Jonathan Neuschäfer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-10 12:17 [PATCH] Documentation/networking/af_xdp: Inhibit reference to struct socket Jonathan Neuschäfer
2019-08-10 14:58 ` Jonathan Corbet
2019-08-11 11:32   ` Jonathan Neuschäfer

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org bpf@archiver.kernel.org
	public-inbox-index bpf


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/ public-inbox