Skip to content

Contributing

Matthieu Baerts edited this page Apr 30, 2024 · 6 revisions

Many ways to contributes

This page is for kernel developers: modifying MPTCP in the Upstream Linux kernel. Patches with new features and bug fixes are of course welcome.

There are also many other ways to contribute to MPTCP in general: adding native MPTCP support in apps (or asking to add native MPTCP support), testing, reporting bugs, talking about it, helping new users, asking to enable it by default on servers and devices, improving our website, etc.


Testing the modifications

It is easy to run locally all regressions tests by using MPTCP Upstream Virtme Docker or to have a prompt in a VM using the modified kernel as explained in the CI page.

Note that if you send modifications in a new branch in a fork in GitHub, the CI will also execute the same tests.

Patches are shared on the mailing list

Why?

Like many kernel subsystems, patches can be sent to our mailing list ([email protected]), and not via Pull Requests. The idea is not to restrict access to people who have a GitHub account, and to have a decentralised system.

It is easy with b4

Sending patches by emails is not difficult, not more than setting up a GitHub account, send the SSH key, etc. To help with this task, we recommend to use b4. After having installed it, you need to either configure the web-endpoint or an SMTP server in the git config file, before using b4 prep to create a new branch, and b4 send to send your patches (use the --reflect to test that before).

In short, once b4 has been installed and configured, the workflow looks like:

git switch export # or export-net
b4 prep -n <new branch name>
# edit your code
git add -p
git commit -s
./scripts/checkpatch.pl -g HEAD ## check the output
b4 prep --edit-cover # if you have more than one patch
b4 send --reflect # check if the mails you sent to yourself are OK
b4 send

Once sent, the patches will be tested by our CI. A report will be sent on Patchwork. See the CI page for more details.

Commit messages

Please always include the reason why this patch is needed: we can easily list the modifications you did by looking at the diff, but understanding why you did that, why this way and not another, etc. is harder to find.

For more details, please check the kernel doc page.

Code style

It is the same as the one for Netdev, see their FAQ for more details.

tl;dr

  • Designate your patch to a tree - [PATCH mptcp-net] or [PATCH mptcp-next], see the Patch prefixes page.
  • For fixes, the Fixes: tag is required, regardless of the tree
  • Don't post large series (> 15 patches), break them up
  • Don't repost your patches within one 24h period
  • Reverse Xmas tree for the variable declaration
  • Use checkpatch.pl, e.g. ./scripts/checkpatch.pl -g HEAD
Clone this wiki locally