Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #104 (test on bpftool-btf.rst) #107

Closed
wants to merge 0 commits into from
Closed

Fix for #104 (test on bpftool-btf.rst) #107

wants to merge 0 commits into from

Conversation

rameezrehman408
Copy link
Contributor

I believe this is a fix for issue#104.

Only 1 sample file is modified (bpftool-btf.rst), to check if it'll be stable.
I am working on setting up the environment to review the docs pages locally. Any guidance in this matter is very welcome.

@qmonnet
Copy link
Member

qmonnet commented Jul 11, 2023

Any guidance in this matter is very welcome.

make -C docs (or make -C tools/bpf/bpftool doc in the kernel repo) will generate the man pages (.8) from the RST files (.rst), using rst2man. Then you can open the page with man directly.

rst2man comes with docutils (python3-docutils on Ubuntu, for example).

One-liner:

$ rst2man docs/bpftool-btf.rst | man -l -

We want the man pages to render the same, ideally we want the code for the man pages (.8) to remain identical.

Note that the final version of the patches will need to be submitted to the BPF mailing list (I can help).

Comment on lines 100 to 106
[1] PTR '(anon)' type_id=2
[2] STRUCT 'dummy_tracepoint_args' size=16 vlen=2
'pad' type_id=3 bits_offset=0
'sock' type_id=4 bits_offset=64
[3] INT 'long long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none)
[4] PTR '(anon)' type_id=5
[5] FWD 'sock' fwd_kind=union
[1] PTR '(anon)' type_id=2
[2] STRUCT 'dummy_tracepoint_args' size=16 vlen=2
'pad' type_id=3 bits_offset=0
'sock' type_id=4 bits_offset=64
[3] INT 'long long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none)
[4] PTR '(anon)' type_id=5
[5] FWD 'sock' fwd_kind=union
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples won't need to be changed, we need some indent under the :: marking the pre-formatting block, otherwise Docutils cannot know when the block ends.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted.
Skipping the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants