xref: /dpdk/doc/guides/contributing/patches.rst (revision d5f81030df75c587885245ff1b14f123448a97c7)
177c79de0SHemant Agrawal..  SPDX-License-Identifier: BSD-3-Clause
277c79de0SHemant Agrawal    Copyright 2018 The DPDK contributors
377c79de0SHemant Agrawal
458abf6e7SJohn McNamara.. submitting_patches:
558abf6e7SJohn McNamara
658abf6e7SJohn McNamaraContributing Code to DPDK
758abf6e7SJohn McNamara=========================
858abf6e7SJohn McNamara
958abf6e7SJohn McNamaraThis document outlines the guidelines for submitting code to DPDK.
1058abf6e7SJohn McNamara
11d629b7b5SJohn McNamaraThe DPDK development process is modeled (loosely) on the Linux Kernel development model so it is worth reading the
1258abf6e7SJohn McNamaraLinux kernel guide on submitting patches:
13f2b99889SYongseok Koh`How to Get Your Change Into the Linux Kernel <https://www.kernel.org/doc/html/latest/process/submitting-patches.html>`_.
1458abf6e7SJohn McNamaraThe rationale for many of the DPDK guidelines is explained in greater detail in the kernel guidelines.
1558abf6e7SJohn McNamara
1658abf6e7SJohn McNamara
1758abf6e7SJohn McNamaraThe DPDK Development Process
18f9de0667SJohn McNamara----------------------------
1958abf6e7SJohn McNamara
2058abf6e7SJohn McNamaraThe DPDK development process has the following features:
2158abf6e7SJohn McNamara
2258abf6e7SJohn McNamara* The code is hosted in a public git repository.
2358abf6e7SJohn McNamara* There is a mailing list where developers submit patches.
2458abf6e7SJohn McNamara* There are maintainers for hierarchical components.
2558abf6e7SJohn McNamara* Patches are reviewed publicly on the mailing list.
26579a5c98SFerruh Yigit* Successfully reviewed patches are merged to the repository.
27f9de0667SJohn McNamara* Patches should be sent to the target repository or sub-tree, see below.
2858abf6e7SJohn McNamara
293d4b2afbSDavid MarchandThe mailing list for DPDK development is `dev@dpdk.org <https://mails.dpdk.org/archives/dev/>`_.
303d4b2afbSDavid MarchandContributors will need to `register for the mailing list <https://mails.dpdk.org/listinfo/dev>`_ in order to submit patches.
313d4b2afbSDavid MarchandIt is also worth registering for the DPDK `Patchwork <https://patches.dpdk.org/project/dpdk/list/>`_
3258abf6e7SJohn McNamara
33ce949484SDavid MarchandIf you are using the GitHub service, pushing to a branch will trigger GitHub
34ce949484SDavid MarchandActions to automatically build your changes and run unit tests and ABI checks.
35ce949484SDavid Marchand
3658abf6e7SJohn McNamaraThe development process requires some familiarity with the ``git`` version control system.
3758abf6e7SJohn McNamaraRefer to the `Pro Git Book <http://www.git-scm.com/book/>`_ for further information.
3858abf6e7SJohn McNamara
39a4862c9eSHemant AgrawalSource License
40a4862c9eSHemant Agrawal--------------
41a4862c9eSHemant Agrawal
42a4862c9eSHemant AgrawalThe DPDK uses the Open Source BSD-3-Clause license for the core libraries and
43a4862c9eSHemant Agrawaldrivers. The kernel components are GPL-2.0 licensed. DPDK uses single line
44a4862c9eSHemant Agrawalreference to Unique License Identifiers in source files as defined by the Linux
45a4862c9eSHemant AgrawalFoundation's `SPDX project <http://spdx.org/>`_.
46a4862c9eSHemant Agrawal
47a4862c9eSHemant AgrawalDPDK uses first line of the file to be SPDX tag. In case of *#!* scripts, SPDX
48a4862c9eSHemant Agrawaltag can be placed in 2nd line of the file.
49a4862c9eSHemant Agrawal
50a4862c9eSHemant AgrawalFor example, to label a file as subject to the BSD-3-Clause license,
51a4862c9eSHemant Agrawalthe following text would be used:
52a4862c9eSHemant Agrawal
53a4862c9eSHemant Agrawal``SPDX-License-Identifier: BSD-3-Clause``
54a4862c9eSHemant Agrawal
55a4862c9eSHemant AgrawalTo label a file as dual-licensed with BSD-3-Clause and GPL-2.0 (e.g., for code
56a4862c9eSHemant Agrawalthat is shared between the kernel and userspace), the following text would be
57a4862c9eSHemant Agrawalused:
58a4862c9eSHemant Agrawal
59a4862c9eSHemant Agrawal``SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)``
60a4862c9eSHemant Agrawal
61a4862c9eSHemant AgrawalRefer to ``licenses/README`` for more details.
6258abf6e7SJohn McNamara
63f9de0667SJohn McNamaraMaintainers and Sub-trees
64f9de0667SJohn McNamara-------------------------
65f9de0667SJohn McNamara
66f9de0667SJohn McNamaraThe DPDK maintenance hierarchy is divided into a main repository ``dpdk`` and sub-repositories ``dpdk-next-*``.
67f9de0667SJohn McNamara
68f9de0667SJohn McNamaraThere are maintainers for the trees and for components within the tree.
69f9de0667SJohn McNamara
70f9de0667SJohn McNamaraTrees and maintainers are listed in the ``MAINTAINERS`` file. For example::
71f9de0667SJohn McNamara
72f9de0667SJohn McNamara    Crypto Drivers
73f9de0667SJohn McNamara    --------------
74f9de0667SJohn McNamara    M: Some Name <some.name@email.com>
75f9de0667SJohn McNamara    T: git://dpdk.org/next/dpdk-next-crypto
76f9de0667SJohn McNamara
77f9de0667SJohn McNamara    Intel AES-NI GCM PMD
78f9de0667SJohn McNamara    M: Some One <some.one@email.com>
79f9de0667SJohn McNamara    F: drivers/crypto/aesni_gcm/
80f9de0667SJohn McNamara    F: doc/guides/cryptodevs/aesni_gcm.rst
81f9de0667SJohn McNamara
82f9de0667SJohn McNamaraWhere:
83f9de0667SJohn McNamara
84f9de0667SJohn McNamara* ``M`` is a tree or component maintainer.
85f9de0667SJohn McNamara* ``T`` is a repository tree.
86f9de0667SJohn McNamara* ``F`` is a maintained file or directory.
87f9de0667SJohn McNamara
88f9de0667SJohn McNamaraAdditional details are given in the ``MAINTAINERS`` file.
89f9de0667SJohn McNamara
90f9de0667SJohn McNamaraThe role of the component maintainers is to:
91f9de0667SJohn McNamara
92f9de0667SJohn McNamara* Review patches for the component or delegate the review.
93f9de0667SJohn McNamara  The review should be done, ideally, within 1 week of submission to the mailing list.
94f9de0667SJohn McNamara* Add an ``acked-by`` to patches, or patchsets, that are ready for committing to a tree.
95acd6dc98SThomas Monjalon* Reply to questions asked about the component.
96f9de0667SJohn McNamara
97f9de0667SJohn McNamaraComponent maintainers can be added or removed by submitting a patch to the ``MAINTAINERS`` file.
98f9de0667SJohn McNamaraMaintainers should have demonstrated a reasonable level of contributions or reviews to the component area.
99f9de0667SJohn McNamaraThe maintainer should be confirmed by an ``ack`` from an established contributor.
100f9de0667SJohn McNamaraThere can be more than one component maintainer if desired.
101f9de0667SJohn McNamara
102f9de0667SJohn McNamaraThe role of the tree maintainers is to:
103f9de0667SJohn McNamara
104f9de0667SJohn McNamara* Maintain the overall quality of their tree.
105f9de0667SJohn McNamara  This can entail additional review, compilation checks or other tests deemed necessary by the maintainer.
106f9de0667SJohn McNamara* Commit patches that have been reviewed by component maintainers and/or other contributors.
107f9de0667SJohn McNamara  The tree maintainer should determine if patches have been reviewed sufficiently.
108f9de0667SJohn McNamara* Ensure that patches are reviewed in a timely manner.
109f9de0667SJohn McNamara* Prepare the tree for integration.
110f9de0667SJohn McNamara* Ensure that there is a designated back-up maintainer and coordinate a handover for periods where the
111f9de0667SJohn McNamara  tree maintainer can't perform their role.
112f9de0667SJohn McNamara
113f9de0667SJohn McNamaraTree maintainers can be added or removed by submitting a patch to the ``MAINTAINERS`` file.
114f9de0667SJohn McNamaraThe proposer should justify the need for a new sub-tree and should have demonstrated a sufficient level of contributions in the area or to a similar area.
115f9de0667SJohn McNamaraThe maintainer should be confirmed by an ``ack`` from an existing tree maintainer.
116f9de0667SJohn McNamaraDisagreements on trees or maintainers can be brought to the Technical Board.
117f9de0667SJohn McNamara
118b9b10ddbSThomas MonjalonThe backup maintainer for the main tree should be selected
119b9b10ddbSThomas Monjalonfrom the existing sub-tree maintainers of the project.
120f9de0667SJohn McNamaraThe backup maintainer for a sub-tree should be selected from among the component maintainers within that sub-tree.
121f9de0667SJohn McNamara
122f9de0667SJohn McNamara
12358abf6e7SJohn McNamaraGetting the Source Code
12458abf6e7SJohn McNamara-----------------------
12558abf6e7SJohn McNamara
126579a5c98SFerruh YigitThe source code can be cloned using either of the following:
127579a5c98SFerruh Yigit
128579a5c98SFerruh Yigitmain repository::
12958abf6e7SJohn McNamara
13058abf6e7SJohn McNamara    git clone git://dpdk.org/dpdk
1313d4b2afbSDavid Marchand    git clone https://dpdk.org/git/dpdk
13258abf6e7SJohn McNamara
1333d4b2afbSDavid Marchandsub-repositories (`list <https://git.dpdk.org/next>`_)::
134579a5c98SFerruh Yigit
135579a5c98SFerruh Yigit    git clone git://dpdk.org/next/dpdk-next-*
1363d4b2afbSDavid Marchand    git clone https://dpdk.org/git/next/dpdk-next-*
13758abf6e7SJohn McNamara
13858abf6e7SJohn McNamaraMake your Changes
13958abf6e7SJohn McNamara-----------------
14058abf6e7SJohn McNamara
14158abf6e7SJohn McNamaraMake your planned changes in the cloned ``dpdk`` repo. Here are some guidelines and requirements:
14258abf6e7SJohn McNamara
14358abf6e7SJohn McNamara* Follow the :ref:`coding_style` guidelines.
14458abf6e7SJohn McNamara
145e83d41f0SBruce Richardson* If you are a new contributor, or if your mail address changed,
146e83d41f0SBruce Richardson  you may update the ``.mailmap`` file.
147e83d41f0SBruce Richardson  Otherwise the new name or address will be added by a maintainer.
148e83d41f0SBruce Richardson  Keeping this file up-to-date will help when someone wants to contact you
149e83d41f0SBruce Richardson  about the changes you contributed to.
150e83d41f0SBruce Richardson
15158abf6e7SJohn McNamara* If you add new files or directories you should add your name to the ``MAINTAINERS`` file.
15258abf6e7SJohn McNamara
15378b04aafSRami Rosen* Initial submission of new PMDs should be prepared against a corresponding repo.
15478b04aafSRami Rosen
15578b04aafSRami Rosen  * Thus, for example, initial submission of a new network PMD should be
15678b04aafSRami Rosen    prepared against dpdk-next-net repo.
15778b04aafSRami Rosen
15878b04aafSRami Rosen  * Likewise, initial submission of a new crypto or compression PMD should be
15978b04aafSRami Rosen    prepared against dpdk-next-crypto repo.
16078b04aafSRami Rosen
16178b04aafSRami Rosen  * For other PMDs and more info, refer to the ``MAINTAINERS`` file.
16278b04aafSRami Rosen
163144beafcSRay Kinsella* New external functions should be added to the local ``version.map`` file. See
164144beafcSRay Kinsella  the :doc:`ABI policy <abi_policy>` and :ref:`ABI versioning <abi_versioning>`
165144beafcSRay Kinsella  guides. New external functions should also be added in alphabetical order.
16658abf6e7SJohn McNamara
1671c91ed5cSAsaf Penso* Any new API function should be used in ``/app`` test directory.
1681c91ed5cSAsaf Penso
1691c91ed5cSAsaf Penso* When introducing a new device API, at least one driver should implement it.
1701c91ed5cSAsaf Penso
17158abf6e7SJohn McNamara* Important changes will require an addition to the release notes in ``doc/guides/rel_notes/``.
17258abf6e7SJohn McNamara  See the :ref:`Release Notes section of the Documentation Guidelines <doc_guidelines>` for details.
17358abf6e7SJohn McNamara
17458abf6e7SJohn McNamara* Test the compilation works with different targets, compilers and options, see :ref:`contrib_check_compilation`.
17558abf6e7SJohn McNamara
17658abf6e7SJohn McNamara* Don't break compilation between commits with forward dependencies in a patchset.
17758abf6e7SJohn McNamara  Each commit should compile on its own to allow for ``git bisect`` and continuous integration testing.
17858abf6e7SJohn McNamara
1798f87ba70SThierry Herbelot* Add tests to the ``app/test`` unit test framework where possible.
18058abf6e7SJohn McNamara
18158abf6e7SJohn McNamara* Add documentation, if relevant, in the form of Doxygen comments or a User Guide in RST format.
18258abf6e7SJohn McNamara  See the :ref:`Documentation Guidelines <doc_guidelines>`.
18358abf6e7SJohn McNamara
1841c91ed5cSAsaf Penso* Code and related documentation must be updated atomically in the same patch.
1851c91ed5cSAsaf Penso
18658abf6e7SJohn McNamaraOnce the changes have been made you should commit them to your local repo.
18758abf6e7SJohn McNamara
18858abf6e7SJohn McNamaraFor small changes, that do not require specific explanations, it is better to keep things together in the
18958abf6e7SJohn McNamarasame patch.
19058abf6e7SJohn McNamaraLarger changes that require different explanations should be separated into logical patches in a patchset.
19158abf6e7SJohn McNamaraA good way of thinking about whether a patch should be split is to consider whether the change could be
19258abf6e7SJohn McNamaraapplied without dependencies as a backport.
19358abf6e7SJohn McNamara
19458abf6e7SJohn McNamaraAs a guide to how patches should be structured run ``git log`` on similar files.
19558abf6e7SJohn McNamara
19658abf6e7SJohn McNamara
19758abf6e7SJohn McNamaraCommit Messages: Subject Line
19858abf6e7SJohn McNamara-----------------------------
19958abf6e7SJohn McNamara
20058abf6e7SJohn McNamaraThe first, summary, line of the git commit message becomes the subject line of the patch email.
20158abf6e7SJohn McNamaraHere are some guidelines for the summary line:
20258abf6e7SJohn McNamara
20358abf6e7SJohn McNamara* The summary line must capture the area and the impact of the change.
20458abf6e7SJohn McNamara
20558abf6e7SJohn McNamara* The summary line should be around 50 characters.
20658abf6e7SJohn McNamara
20758abf6e7SJohn McNamara* The summary line should be lowercase apart from acronyms.
20858abf6e7SJohn McNamara
20958abf6e7SJohn McNamara* It should be prefixed with the component name (use git log to check existing components).
21058abf6e7SJohn McNamara  For example::
21158abf6e7SJohn McNamara
21258abf6e7SJohn McNamara     ixgbe: fix offload config option name
21358abf6e7SJohn McNamara
21458abf6e7SJohn McNamara     config: increase max queues per port
21558abf6e7SJohn McNamara
21658abf6e7SJohn McNamara* Use the imperative of the verb (like instructions to the code base).
21758abf6e7SJohn McNamara
21858abf6e7SJohn McNamara* Don't add a period/full stop to the subject line or you will end up two in the patch name: ``dpdk_description..patch``.
21958abf6e7SJohn McNamara
22058abf6e7SJohn McNamaraThe actual email subject line should be prefixed by ``[PATCH]`` and the version, if greater than v1,
22158abf6e7SJohn McNamarafor example: ``PATCH v2``.
22258abf6e7SJohn McNamaraThe is generally added by ``git send-email`` or ``git format-patch``, see below.
22358abf6e7SJohn McNamara
22458abf6e7SJohn McNamaraIf you are submitting an RFC draft of a feature you can use ``[RFC]`` instead of ``[PATCH]``.
22558abf6e7SJohn McNamaraAn RFC patch doesn't have to be complete.
22658abf6e7SJohn McNamaraIt is intended as a way of getting early feedback.
22758abf6e7SJohn McNamara
22858abf6e7SJohn McNamara
22958abf6e7SJohn McNamaraCommit Messages: Body
23058abf6e7SJohn McNamara---------------------
23158abf6e7SJohn McNamara
23258abf6e7SJohn McNamaraHere are some guidelines for the body of a commit message:
23358abf6e7SJohn McNamara
23458abf6e7SJohn McNamara* The body of the message should describe the issue being fixed or the feature being added.
23558abf6e7SJohn McNamara  It is important to provide enough information to allow a reviewer to understand the purpose of the patch.
23658abf6e7SJohn McNamara
23758abf6e7SJohn McNamara* When the change is obvious the body can be blank, apart from the signoff.
23858abf6e7SJohn McNamara
23958abf6e7SJohn McNamara* The commit message must end with a ``Signed-off-by:`` line which is added using::
24058abf6e7SJohn McNamara
24158abf6e7SJohn McNamara      git commit --signoff # or -s
24258abf6e7SJohn McNamara
24358abf6e7SJohn McNamara  The purpose of the signoff is explained in the
244f2b99889SYongseok Koh  `Developer's Certificate of Origin <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1>`_
24558abf6e7SJohn McNamara  section of the Linux kernel guidelines.
24658abf6e7SJohn McNamara
24758abf6e7SJohn McNamara  .. Note::
24858abf6e7SJohn McNamara
24958abf6e7SJohn McNamara     All developers must ensure that they have read and understood the
25058abf6e7SJohn McNamara     Developer's Certificate of Origin section of the documentation prior
25158abf6e7SJohn McNamara     to applying the signoff and submitting a patch.
25258abf6e7SJohn McNamara
25358abf6e7SJohn McNamara* The signoff must be a real name and not an alias or nickname.
25458abf6e7SJohn McNamara  More than one signoff is allowed.
25558abf6e7SJohn McNamara
25658abf6e7SJohn McNamara* The text of the commit message should be wrapped at 72 characters.
25758abf6e7SJohn McNamara
258f9ef083cSHarry van Haaren* When fixing a regression, it is required to reference the id of the commit
259f9ef083cSHarry van Haaren  which introduced the bug, and put the original author of that commit on CC.
260f9ef083cSHarry van Haaren  You can generate the required lines using the following git alias, which prints
261f9ef083cSHarry van Haaren  the commit SHA and the author of the original code::
26258abf6e7SJohn McNamara
263f9ef083cSHarry van Haaren     git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae'"
26458abf6e7SJohn McNamara
265f9ef083cSHarry van Haaren  The output of ``git fixline <SHA>`` must then be added to the commit message::
26658abf6e7SJohn McNamara
267f9ef083cSHarry van Haaren     doc: fix some parameter description
26858abf6e7SJohn McNamara
269f9ef083cSHarry van Haaren     Update the docs, fixing description of some parameter.
27058abf6e7SJohn McNamara
271f9ef083cSHarry van Haaren     Fixes: abcdefgh1234 ("doc: add some parameter")
27258abf6e7SJohn McNamara
27358abf6e7SJohn McNamara     Signed-off-by: Alex Smith <alex.smith@example.com>
274bd4a5aa4SSivaramakrishnan Venkat     ---
275bd4a5aa4SSivaramakrishnan Venkat     Cc: author@example.com
27658abf6e7SJohn McNamara
27758abf6e7SJohn McNamara* When fixing an error or warning it is useful to add the error message and instructions on how to reproduce it.
27858abf6e7SJohn McNamara
27958abf6e7SJohn McNamara* Use correct capitalization, punctuation and spelling.
28058abf6e7SJohn McNamara
2814aeedc25SHarry van HaarenIn addition to the ``Signed-off-by:`` name the commit messages can also have
2824aeedc25SHarry van Haarentags for who reported, suggested, tested and reviewed the patch being
2834aeedc25SHarry van Haarenposted. Please refer to the `Tested, Acked and Reviewed by`_ section.
28458abf6e7SJohn McNamara
2856561392cSMarko KovacevicPatch Fix Related Issues
2866561392cSMarko Kovacevic~~~~~~~~~~~~~~~~~~~~~~~~
287d687e0d0SMarko Kovacevic
288d687e0d0SMarko Kovacevic`Coverity <https://scan.coverity.com/projects/dpdk-data-plane-development-kit>`_
289d687e0d0SMarko Kovacevicis a tool for static code analysis.
290d687e0d0SMarko KovacevicIt is used as a cloud-based service used to scan the DPDK source code,
291d687e0d0SMarko Kovacevicand alert developers of any potential defects in the source code.
292d687e0d0SMarko KovacevicWhen fixing an issue found by Coverity, the patch must contain a Coverity issue ID
293d687e0d0SMarko Kovacevicin the body of the commit message. For example::
294d687e0d0SMarko Kovacevic
295d687e0d0SMarko Kovacevic
296d687e0d0SMarko Kovacevic     doc: fix some parameter description
297d687e0d0SMarko Kovacevic
298d687e0d0SMarko Kovacevic     Update the docs, fixing description of some parameter.
299d687e0d0SMarko Kovacevic
300d687e0d0SMarko Kovacevic     Coverity issue: 12345
301d687e0d0SMarko Kovacevic     Fixes: abcdefgh1234 ("doc: add some parameter")
302d687e0d0SMarko Kovacevic
303d687e0d0SMarko Kovacevic     Signed-off-by: Alex Smith <alex.smith@example.com>
304bd4a5aa4SSivaramakrishnan Venkat     ---
305bd4a5aa4SSivaramakrishnan Venkat     Cc: author@example.com
306d687e0d0SMarko Kovacevic
3076561392cSMarko Kovacevic
30843d162bcSThomas Monjalon`Bugzilla <https://bugs.dpdk.org>`_
3096561392cSMarko Kovacevicis a bug- or issue-tracking system.
3106561392cSMarko KovacevicBug-tracking systems allow individual or groups of developers
3116561392cSMarko Kovaceviceffectively to keep track of outstanding problems with their product.
3126561392cSMarko KovacevicWhen fixing an issue raised in Bugzilla, the patch must contain
3136561392cSMarko Kovacevica Bugzilla issue ID in the body of the commit message.
3146561392cSMarko KovacevicFor example::
3156561392cSMarko Kovacevic
3166561392cSMarko Kovacevic    doc: fix some parameter description
3176561392cSMarko Kovacevic
3186561392cSMarko Kovacevic    Update the docs, fixing description of some parameter.
3196561392cSMarko Kovacevic
3206561392cSMarko Kovacevic    Bugzilla ID: 12345
3216561392cSMarko Kovacevic    Fixes: abcdefgh1234 ("doc: add some parameter")
3226561392cSMarko Kovacevic
3236561392cSMarko Kovacevic    Signed-off-by: Alex Smith <alex.smith@example.com>
324bd4a5aa4SSivaramakrishnan Venkat    ---
325bd4a5aa4SSivaramakrishnan Venkat    Cc: author@example.com
3266561392cSMarko Kovacevic
327f16e13c9SMarko KovacevicPatch for Stable Releases
328f16e13c9SMarko Kovacevic~~~~~~~~~~~~~~~~~~~~~~~~~
329f16e13c9SMarko Kovacevic
330b9b10ddbSThomas MonjalonAll fix patches to the main branch that are candidates for backporting
3313d4b2afbSDavid Marchandshould also be CCed to the `stable@dpdk.org <https://mails.dpdk.org/listinfo/stable>`_
332f16e13c9SMarko Kovacevicmailing list.
333f16e13c9SMarko KovacevicIn the commit message body the Cc: stable@dpdk.org should be inserted as follows::
334f16e13c9SMarko Kovacevic
335f16e13c9SMarko Kovacevic     doc: fix some parameter description
336f16e13c9SMarko Kovacevic
337f16e13c9SMarko Kovacevic     Update the docs, fixing description of some parameter.
338f16e13c9SMarko Kovacevic
339f16e13c9SMarko Kovacevic     Fixes: abcdefgh1234 ("doc: add some parameter")
340f16e13c9SMarko Kovacevic     Cc: stable@dpdk.org
341f16e13c9SMarko Kovacevic
342f16e13c9SMarko Kovacevic     Signed-off-by: Alex Smith <alex.smith@example.com>
343f16e13c9SMarko Kovacevic
344f16e13c9SMarko KovacevicFor further information on stable contribution you can go to
345f16e13c9SMarko Kovacevic:doc:`Stable Contribution Guide <stable>`.
346f16e13c9SMarko Kovacevic
347f74904ceSFerruh YigitPatch Dependencies
348f74904ceSFerruh Yigit~~~~~~~~~~~~~~~~~~
349f74904ceSFerruh Yigit
350f74904ceSFerruh YigitSometimes a patch or patchset can depend on another one.
351f74904ceSFerruh YigitTo help the maintainers and automation tasks, please document this dependency in commit log or cover letter
352f74904ceSFerruh Yigitwith the following syntax:
353f74904ceSFerruh Yigit
354f74904ceSFerruh Yigit``Depends-on: series-NNNNN ("Title of the series")`` or ``Depends-on: patch-NNNNN ("Title of the patch")``
355f74904ceSFerruh Yigit
356f74904ceSFerruh YigitWhere ``NNNNN`` is patchwork ID for patch or series::
357f74904ceSFerruh Yigit
358f74904ceSFerruh Yigit     doc: fix some parameter description
359f74904ceSFerruh Yigit
360f74904ceSFerruh Yigit     Update the docs, fixing description of some parameter.
361f74904ceSFerruh Yigit
362f74904ceSFerruh Yigit     Signed-off-by: Alex Smith <alex.smith@example.com>
363f74904ceSFerruh Yigit     ---
364f74904ceSFerruh Yigit     Depends-on: series-10000 ("Title of the series")
36558abf6e7SJohn McNamara
36653e65976SJakub PaliderTag order
36753e65976SJakub Palider~~~~~~~~~
36853e65976SJakub Palider
36953e65976SJakub PaliderThere is a pattern indicating how certain tags should relate to each other.
37053e65976SJakub Palider
37153e65976SJakub PaliderExample of proper tag sequence::
37253e65976SJakub Palider
37353e65976SJakub Palider     Coverity issue:
37453e65976SJakub Palider     Bugzilla ID:
37553e65976SJakub Palider     Fixes:
37653e65976SJakub Palider     Cc:
37753e65976SJakub Palider
37853e65976SJakub Palider     Reported-by:
37953e65976SJakub Palider     Suggested-by:
38053e65976SJakub Palider     Signed-off-by:
38153e65976SJakub Palider     Acked-by:
38253e65976SJakub Palider     Reviewed-by:
38353e65976SJakub Palider     Tested-by:
38453e65976SJakub Palider
38553e65976SJakub PaliderBetween first and second tag section there is and empty line.
38653e65976SJakub Palider
38753e65976SJakub PaliderWhile ``Signed-off-by:`` is an obligatory tag and must exist in each commit,
38853e65976SJakub Paliderall other tags are optional.
38953e65976SJakub PaliderAny tag, as long as it is in proper location to other adjacent tags (if present),
39053e65976SJakub Palidermay occur multiple times.
39153e65976SJakub Palider
39253e65976SJakub PaliderTags after the first occurrence of ``Signed-off-by:`` shall be laid out
39353e65976SJakub Paliderin a chronological order.
39453e65976SJakub Palider
39553e65976SJakub Palider
39658abf6e7SJohn McNamaraCreating Patches
39758abf6e7SJohn McNamara----------------
39858abf6e7SJohn McNamara
39958abf6e7SJohn McNamaraIt is possible to send patches directly from git but for new contributors it is recommended to generate the
40058abf6e7SJohn McNamarapatches with ``git format-patch`` and then when everything looks okay, and the patches have been checked, to
40158abf6e7SJohn McNamarasend them with ``git send-email``.
40258abf6e7SJohn McNamara
40358abf6e7SJohn McNamaraHere are some examples of using ``git format-patch`` to generate patches:
40458abf6e7SJohn McNamara
40558abf6e7SJohn McNamara.. code-block:: console
40658abf6e7SJohn McNamara
40758abf6e7SJohn McNamara   # Generate a patch from the last commit.
40858abf6e7SJohn McNamara   git format-patch -1
40958abf6e7SJohn McNamara
41058abf6e7SJohn McNamara   # Generate a patch from the last 3 commits.
41158abf6e7SJohn McNamara   git format-patch -3
41258abf6e7SJohn McNamara
41358abf6e7SJohn McNamara   # Generate the patches in a directory.
41458abf6e7SJohn McNamara   git format-patch -3 -o ~/patch/
41558abf6e7SJohn McNamara
41658abf6e7SJohn McNamara   # Add a cover letter to explain a patchset.
41758abf6e7SJohn McNamara   git format-patch -3 -o ~/patch/ --cover-letter
41858abf6e7SJohn McNamara
41958abf6e7SJohn McNamara   # Add a prefix with a version number.
42058abf6e7SJohn McNamara   git format-patch -3 -o ~/patch/ -v 2
42158abf6e7SJohn McNamara
42258abf6e7SJohn McNamara
42358abf6e7SJohn McNamaraCover letters are useful for explaining a patchset and help to generate a logical threading to the patches.
42458abf6e7SJohn McNamaraSmaller notes can be put inline in the patch after the ``---`` separator, for example::
42558abf6e7SJohn McNamara
42658abf6e7SJohn McNamara   Subject: [PATCH] fm10k/base: add FM10420 device ids
42758abf6e7SJohn McNamara
42858abf6e7SJohn McNamara   Add the device ID for Boulder Rapids and Atwood Channel to enable
42958abf6e7SJohn McNamara   drivers to support those devices.
43058abf6e7SJohn McNamara
43158abf6e7SJohn McNamara   Signed-off-by: Alex Smith <alex.smith@example.com>
43258abf6e7SJohn McNamara   ---
43358abf6e7SJohn McNamara
43458abf6e7SJohn McNamara   ADD NOTES HERE.
43558abf6e7SJohn McNamara
43658abf6e7SJohn McNamara    drivers/net/fm10k/base/fm10k_api.c  | 6 ++++++
43758abf6e7SJohn McNamara    drivers/net/fm10k/base/fm10k_type.h | 6 ++++++
43858abf6e7SJohn McNamara    2 files changed, 12 insertions(+)
43958abf6e7SJohn McNamara   ...
44058abf6e7SJohn McNamara
44158abf6e7SJohn McNamaraVersion 2 and later of a patchset should also include a short log of the changes so the reviewer knows what has changed.
44258abf6e7SJohn McNamaraThis can be added to the cover letter or the annotations.
44358abf6e7SJohn McNamaraFor example::
44458abf6e7SJohn McNamara
44558abf6e7SJohn McNamara   ---
44658abf6e7SJohn McNamara   v3:
44758abf6e7SJohn McNamara   * Fixed issued with version.map.
44858abf6e7SJohn McNamara
44958abf6e7SJohn McNamara   v2:
45058abf6e7SJohn McNamara   * Added i40e support.
45158abf6e7SJohn McNamara   * Renamed ethdev functions from rte_eth_ieee15888_*() to rte_eth_timesync_*()
45258abf6e7SJohn McNamara     since 802.1AS can be supported through the same interfaces.
45358abf6e7SJohn McNamara
45458abf6e7SJohn McNamara
45558abf6e7SJohn McNamara.. _contrib_checkpatch:
45658abf6e7SJohn McNamara
45758abf6e7SJohn McNamaraChecking the Patches
45858abf6e7SJohn McNamara--------------------
45958abf6e7SJohn McNamara
4609a98f50eSThomas MonjalonPatches should be checked for formatting and syntax issues using the ``checkpatches.sh`` script in the ``devtools``
46158abf6e7SJohn McNamaradirectory of the DPDK repo.
46258abf6e7SJohn McNamaraThis uses the Linux kernel development tool ``checkpatch.pl`` which  can be obtained by cloning, and periodically,
46358abf6e7SJohn McNamaraupdating the Linux kernel sources.
46458abf6e7SJohn McNamara
46558abf6e7SJohn McNamaraThe path to the original Linux script must be set in the environment variable ``DPDK_CHECKPATCH_PATH``.
466409a346aSKevin Traynor
467520e2b67SThomas MonjalonSpell checking of commonly misspelled words is enabled
468520e2b67SThomas Monjalonby default if installed in ``/usr/share/codespell/dictionary.txt``.
469520e2b67SThomas MonjalonA different dictionary path can be specified
470409a346aSKevin Traynorin the environment variable ``DPDK_CHECKPATCH_CODESPELL``.
471409a346aSKevin Traynor
472520e2b67SThomas MonjalonThere is a DPDK script to build an adjusted dictionary
473520e2b67SThomas Monjalonfrom the multiple codespell dictionaries::
474520e2b67SThomas Monjalon
475520e2b67SThomas Monjalon   git clone https://github.com/codespell-project/codespell.git
476520e2b67SThomas Monjalon   devtools/build-dict.sh codespell/ > codespell-dpdk.txt
477520e2b67SThomas Monjalon
478409a346aSKevin TraynorEnvironment variables required by the development tools,
479409a346aSKevin Traynorare loaded from the following files, in order of preference::
48058abf6e7SJohn McNamara
48158abf6e7SJohn McNamara   .develconfig
48258abf6e7SJohn McNamara   ~/.config/dpdk/devel.config
48358abf6e7SJohn McNamara   /etc/dpdk/devel.config.
48458abf6e7SJohn McNamara
485e37348d7SSarosh ArifOnce the environment variable is set, the script can be run as follows::
48658abf6e7SJohn McNamara
4879a98f50eSThomas Monjalon   devtools/checkpatches.sh ~/patch/
48858abf6e7SJohn McNamara
48958abf6e7SJohn McNamaraThe script usage is::
49058abf6e7SJohn McNamara
491b1214d98SCiara Power   checkpatches.sh [-h] [-q] [-v] [-nX|-r range|patch1 [patch2] ...]
49258abf6e7SJohn McNamara
493edbeb7d9SThomas MonjalonThen the git logs should be checked using the ``check-git-log.sh`` script.
494edbeb7d9SThomas Monjalon
495edbeb7d9SThomas MonjalonThe script usage is::
496edbeb7d9SThomas Monjalon
497b1214d98SCiara Power   check-git-log.sh [-h] [-nX|-r range]
498edbeb7d9SThomas Monjalon
499b1214d98SCiara PowerFor both of the above scripts, the -n option is used to specify a number of commits from HEAD,
500b1214d98SCiara Powerand the -r option allows the user specify a ``git log`` range.
50158abf6e7SJohn McNamara
502*7f932642SJuraj LinkešAdditionally, when contributing to the DTS tool, patches should also be checked using
503*7f932642SJuraj Linkešthe ``dts-check-format.sh`` script in the ``devtools`` directory of the DPDK repo.
504*7f932642SJuraj LinkešTo run the script, extra :ref:`Python dependencies <dts_deps>` are needed.
505*7f932642SJuraj Linkeš
50658abf6e7SJohn McNamara.. _contrib_check_compilation:
50758abf6e7SJohn McNamara
50858abf6e7SJohn McNamaraChecking Compilation
50958abf6e7SJohn McNamara--------------------
51058abf6e7SJohn McNamara
5113fe9b93cSVipin VargheseCompilation of patches is to be tested with ``devtools/test-meson-builds.sh`` script.
5123fe9b93cSVipin Varghese
5133fe9b93cSVipin VargheseThe script internally checks for dependencies, then builds for several
5143fe9b93cSVipin Varghesecombinations of compilation configuration.
515aa759955SBruce RichardsonBy default, each build will be put in a subfolder of the current working directory.
516aa759955SBruce RichardsonHowever, if it is preferred to place the builds in a different location,
517aa759955SBruce Richardsonthe environment variable ``DPDK_BUILD_TEST_DIR`` can be set to that desired location.
518aa759955SBruce RichardsonFor example, setting ``DPDK_BUILD_TEST_DIR=__builds`` will put all builds
519aa759955SBruce Richardsonin a single subfolder called "__builds" created in the current directory.
520aa759955SBruce RichardsonSetting ``DPDK_BUILD_TEST_DIR`` to an absolute directory path e.g. ``/tmp`` is also supported.
5213fe9b93cSVipin Varghese
52258abf6e7SJohn McNamara
52367354349SNeil Horman.. _integrated_abi_check:
52467354349SNeil Horman
525777014e5SDavid MarchandChecking ABI compatibility
526777014e5SDavid Marchand--------------------------
527777014e5SDavid Marchand
528777014e5SDavid MarchandBy default, ABI compatibility checks are disabled.
529777014e5SDavid Marchand
530777014e5SDavid MarchandTo enable them, a reference version must be selected via the environment
531e25156a8SRay Kinsellavariable ``DPDK_ABI_REF_VERSION``. Contributors should ordinarily reference the
532e25156a8SRay Kinsellagit tag of the most recent release of DPDK in ``DPDK_ABI_REF_VERSION``.
533777014e5SDavid Marchand
534532e4e48SCiara PowerThe ``devtools/test-meson-builds.sh`` script then build this reference version
535532e4e48SCiara Powerin a temporary directory and store the results in a subfolder of the current
536532e4e48SCiara Powerworking directory.
537777014e5SDavid MarchandThe environment variable ``DPDK_ABI_REF_DIR`` can be set so that the results go
538777014e5SDavid Marchandto a different location.
539777014e5SDavid Marchand
5409f5e6556SFerruh YigitSample::
5419f5e6556SFerruh Yigit
5429f5e6556SFerruh Yigit   DPDK_ABI_REF_VERSION=v19.11 DPDK_ABI_REF_DIR=/tmp ./devtools/test-meson-builds.sh
5439f5e6556SFerruh Yigit
544777014e5SDavid Marchand
54558abf6e7SJohn McNamaraSending Patches
54658abf6e7SJohn McNamara---------------
54758abf6e7SJohn McNamara
54858abf6e7SJohn McNamaraPatches should be sent to the mailing list using ``git send-email``.
54958abf6e7SJohn McNamaraYou can configure an external SMTP with something like the following::
55058abf6e7SJohn McNamara
55158abf6e7SJohn McNamara   [sendemail]
55258abf6e7SJohn McNamara       smtpuser = name@domain.com
55358abf6e7SJohn McNamara       smtpserver = smtp.domain.com
55458abf6e7SJohn McNamara       smtpserverport = 465
55558abf6e7SJohn McNamara       smtpencryption = ssl
55658abf6e7SJohn McNamara
55758abf6e7SJohn McNamaraSee the `Git send-email <https://git-scm.com/docs/git-send-email>`_ documentation for more details.
55858abf6e7SJohn McNamara
55958abf6e7SJohn McNamaraThe patches should be sent to ``dev@dpdk.org``.
56058abf6e7SJohn McNamaraIf the patches are a change to existing files then you should send them TO the maintainer(s) and CC ``dev@dpdk.org``.
56158abf6e7SJohn McNamaraThe appropriate maintainer can be found in the ``MAINTAINERS`` file::
56258abf6e7SJohn McNamara
56358abf6e7SJohn McNamara   git send-email --to maintainer@some.org --cc dev@dpdk.org 000*.patch
56458abf6e7SJohn McNamara
5657a629106SFerruh YigitScript ``get-maintainer.sh`` can be used to select maintainers automatically::
5667a629106SFerruh Yigit
5677a629106SFerruh Yigit  git send-email --to-cmd ./devtools/get-maintainer.sh --cc dev@dpdk.org 000*.patch
5687a629106SFerruh Yigit
56958abf6e7SJohn McNamaraYou can test the emails by sending it to yourself or with the ``--dry-run`` option.
57058abf6e7SJohn McNamara
57158abf6e7SJohn McNamaraIf the patch is in relation to a previous email thread you can add it to the same thread using the Message ID::
57258abf6e7SJohn McNamara
57358abf6e7SJohn McNamara   git send-email --to dev@dpdk.org --in-reply-to <1234-foo@bar.com> 000*.patch
57458abf6e7SJohn McNamara
57558abf6e7SJohn McNamaraThe Message ID can be found in the raw text of emails or at the top of each Patchwork patch,
5763d4b2afbSDavid Marchand`for example <https://patches.dpdk.org/patch/7646/>`_.
57758abf6e7SJohn McNamaraShallow threading (``--thread --no-chain-reply-to``) is preferred for a patch series.
57858abf6e7SJohn McNamara
57958abf6e7SJohn McNamaraOnce submitted your patches will appear on the mailing list and in Patchwork.
58058abf6e7SJohn McNamara
58158abf6e7SJohn McNamaraExperienced committers may send patches directly with ``git send-email`` without the ``git format-patch`` step.
58258abf6e7SJohn McNamaraThe options ``--annotate`` and ``confirm = always`` are recommended for checking patches before sending.
58358abf6e7SJohn McNamara
58458abf6e7SJohn McNamara
585d53f61b6SLuca BoccassiBackporting patches for Stable Releases
586d53f61b6SLuca Boccassi~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
587d53f61b6SLuca Boccassi
588d53f61b6SLuca BoccassiSometimes a maintainer or contributor wishes, or can be asked, to send a patch
589d53f61b6SLuca Boccassifor a stable release rather than mainline.
590d53f61b6SLuca BoccassiIn this case the patch(es) should be sent to ``stable@dpdk.org``,
591d53f61b6SLuca Boccassinot to ``dev@dpdk.org``.
592d53f61b6SLuca Boccassi
593d53f61b6SLuca BoccassiGiven that there are multiple stable releases being maintained at the same time,
594d53f61b6SLuca Boccassiplease specify exactly which branch(es) the patch is for
595d53f61b6SLuca Boccassiusing ``git send-email --subject-prefix='PATCH 16.11' ...``
596d53f61b6SLuca Boccassiand also optionally in the cover letter or in the annotation.
597d53f61b6SLuca Boccassi
598d53f61b6SLuca Boccassi
59958abf6e7SJohn McNamaraThe Review Process
60058abf6e7SJohn McNamara------------------
60158abf6e7SJohn McNamara
6024aeedc25SHarry van HaarenPatches are reviewed by the community, relying on the experience and
6034aeedc25SHarry van Haarencollaboration of the members to double-check each other's work. There are a
6044aeedc25SHarry van Haarennumber of ways to indicate that you have checked a patch on the mailing list.
60558abf6e7SJohn McNamara
6064aeedc25SHarry van Haaren
6074aeedc25SHarry van HaarenTested, Acked and Reviewed by
6084aeedc25SHarry van Haaren~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6094aeedc25SHarry van Haaren
6104aeedc25SHarry van HaarenTo indicate that you have interacted with a patch on the mailing list you
6114aeedc25SHarry van Haarenshould respond to the patch in an email with one of the following tags:
6124aeedc25SHarry van Haaren
6134aeedc25SHarry van Haaren * Reviewed-by:
6144aeedc25SHarry van Haaren * Acked-by:
6154aeedc25SHarry van Haaren * Tested-by:
6164aeedc25SHarry van Haaren * Reported-by:
6174aeedc25SHarry van Haaren * Suggested-by:
6184aeedc25SHarry van Haaren
6194aeedc25SHarry van HaarenThe tag should be on a separate line as follows::
6204aeedc25SHarry van Haaren
6214aeedc25SHarry van Haaren   tag-here: Name Surname <email@address.com>
6224aeedc25SHarry van Haaren
6234aeedc25SHarry van HaarenEach of these tags has a specific meaning. In general, the DPDK community
6244aeedc25SHarry van Haarenfollows the kernel usage of the tags. A short summary of the meanings of each
6254aeedc25SHarry van Haarentag is given here for reference:
6264aeedc25SHarry van Haaren
6274aeedc25SHarry van Haaren.. _statement: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#reviewer-s-statement-of-oversight
6284aeedc25SHarry van Haaren
6294aeedc25SHarry van Haaren``Reviewed-by:`` is a strong statement_ that the patch is an appropriate state
6304aeedc25SHarry van Haarenfor merging without any remaining serious technical issues. Reviews from
6314aeedc25SHarry van Haarencommunity members who are known to understand the subject area and to perform
6324aeedc25SHarry van Haarenthorough reviews will increase the likelihood of the patch getting merged.
6334aeedc25SHarry van Haaren
6344aeedc25SHarry van Haaren``Acked-by:`` is a record that the person named was not directly involved in
6354aeedc25SHarry van Haarenthe preparation of the patch but wishes to signify and record their acceptance
6364aeedc25SHarry van Haarenand approval of it.
6374aeedc25SHarry van Haaren
6384aeedc25SHarry van Haaren``Tested-by:`` indicates that the patch has been successfully tested (in some
6394aeedc25SHarry van Haarenenvironment) by the person named.
6404aeedc25SHarry van Haaren
6414aeedc25SHarry van Haaren``Reported-by:`` is used to acknowledge person who found or reported the bug.
6424aeedc25SHarry van Haaren
6434aeedc25SHarry van Haaren``Suggested-by:`` indicates that the patch idea was suggested by the named
6444aeedc25SHarry van Haarenperson.
6454aeedc25SHarry van Haaren
6464aeedc25SHarry van Haaren
6474aeedc25SHarry van Haaren
6484aeedc25SHarry van HaarenSteps to getting your patch merged
6494aeedc25SHarry van Haaren~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6504aeedc25SHarry van Haaren
6514aeedc25SHarry van HaarenThe more work you put into the previous steps the easier it will be to get a
6524aeedc25SHarry van Haarenpatch accepted. The general cycle for patch review and acceptance is:
65358abf6e7SJohn McNamara
65458abf6e7SJohn McNamara#. Submit the patch.
65558abf6e7SJohn McNamara
65658abf6e7SJohn McNamara#. Check the automatic test reports in the coming hours.
65758abf6e7SJohn McNamara
65858abf6e7SJohn McNamara#. Wait for review comments. While you are waiting review some other patches.
65958abf6e7SJohn McNamara
66058abf6e7SJohn McNamara#. Fix the review comments and submit a ``v n+1`` patchset::
66158abf6e7SJohn McNamara
66258abf6e7SJohn McNamara      git format-patch -3 -v 2
66358abf6e7SJohn McNamara
66458abf6e7SJohn McNamara#. Update Patchwork to mark your previous patches as "Superseded".
66558abf6e7SJohn McNamara
66658abf6e7SJohn McNamara#. If the patch is deemed suitable for merging by the relevant maintainer(s) or other developers they will ``ack``
66758abf6e7SJohn McNamara   the patch with an email that includes something like::
66858abf6e7SJohn McNamara
66958abf6e7SJohn McNamara      Acked-by: Alex Smith <alex.smith@example.com>
67058abf6e7SJohn McNamara
67158abf6e7SJohn McNamara   **Note**: When acking patches please remove as much of the text of the patch email as possible.
67258abf6e7SJohn McNamara   It is generally best to delete everything after the ``Signed-off-by:`` line.
67358abf6e7SJohn McNamara
67458abf6e7SJohn McNamara#. Having the patch ``Reviewed-by:`` and/or ``Tested-by:`` will also help the patch to be accepted.
67558abf6e7SJohn McNamara
67658abf6e7SJohn McNamara#. If the patch isn't deemed suitable based on being out of scope or conflicting with existing functionality
67758abf6e7SJohn McNamara   it may receive a ``nack``.
67858abf6e7SJohn McNamara   In this case you will need to make a more convincing technical argument in favor of your patches.
67958abf6e7SJohn McNamara
68058abf6e7SJohn McNamara#. In addition a patch will not be accepted if it doesn't address comments from a previous version with fixes or
68158abf6e7SJohn McNamara   valid arguments.
68258abf6e7SJohn McNamara
6837968191bSBruce Richardson#. It is the responsibility of a maintainer to ensure that patches are reviewed and to provide an ``ack`` or
6847968191bSBruce Richardson   ``nack`` of those patches as appropriate.
6857968191bSBruce Richardson
6867968191bSBruce Richardson#. Once a patch has been acked by the relevant maintainer, reviewers may still comment on it for a further
6877968191bSBruce Richardson   two weeks. After that time, the patch should be merged into the relevant git tree for the next release.
6887968191bSBruce Richardson   Additional notes and restrictions:
6897968191bSBruce Richardson
6907968191bSBruce Richardson   * Patches should be acked by a maintainer at least two days before the release merge
6917968191bSBruce Richardson     deadline, in order to make that release.
6927968191bSBruce Richardson   * For patches acked with less than two weeks to go to the merge deadline, all additional
6937968191bSBruce Richardson     comments should be made no later than two days before the merge deadline.
6947968191bSBruce Richardson   * After the appropriate time for additional feedback has passed, if the patch has not yet
6957968191bSBruce Richardson     been merged to the relevant tree by the committer, it should be treated as though it had,
6967968191bSBruce Richardson     in that any additional changes needed to it must be addressed by a follow-on patch, rather
6977968191bSBruce Richardson     than rework of the original.
6987968191bSBruce Richardson   * Trivial patches may be merged sooner than described above at the tree committer's
6997968191bSBruce Richardson     discretion.
7001c91ed5cSAsaf Penso
7011c91ed5cSAsaf Penso
7021c91ed5cSAsaf PensoMilestones definition
7031c91ed5cSAsaf Penso---------------------
7041c91ed5cSAsaf Penso
7051c91ed5cSAsaf PensoEach DPDK release has milestones that help everyone to converge to the release date.
7061c91ed5cSAsaf PensoThe following is a list of these milestones together with
7071c91ed5cSAsaf Pensoconcrete definitions and expectations for a typical release cycle.
7081c91ed5cSAsaf PensoAn average cycle lasts 3 months and have 4 release candidates in the last month.
7091c91ed5cSAsaf PensoTest reports are expected to be received after each release candidate.
7101c91ed5cSAsaf PensoThe number and expectations of release candidates might vary slightly.
7111c91ed5cSAsaf PensoThe schedule is updated in the `roadmap <https://core.dpdk.org/roadmap/#dates>`_.
7121c91ed5cSAsaf Penso
7131c91ed5cSAsaf Penso.. note::
7141c91ed5cSAsaf Penso   Sooner is always better. Deadlines are not ideal dates.
7151c91ed5cSAsaf Penso
7161c91ed5cSAsaf Penso   Integration is never guaranteed but everyone can help.
7171c91ed5cSAsaf Penso
7181c91ed5cSAsaf PensoRoadmap
7191c91ed5cSAsaf Penso~~~~~~~
7201c91ed5cSAsaf Penso
7211c91ed5cSAsaf Penso* Announce new features in libraries, drivers, applications, and examples.
7221c91ed5cSAsaf Penso* To be published before the previous release.
7231c91ed5cSAsaf Penso
7241c91ed5cSAsaf PensoProposal Deadline
7251c91ed5cSAsaf Penso~~~~~~~~~~~~~~~~~
7261c91ed5cSAsaf Penso
7271c91ed5cSAsaf Penso* Must send an RFC (Request For Comments) or a complete patch of new features.
7281c91ed5cSAsaf Penso* Early RFC gives time for design review before complete implementation.
7291c91ed5cSAsaf Penso* Should include at least the API changes in libraries and applications.
7301c91ed5cSAsaf Penso* Library code should be quite complete at the deadline.
7311c91ed5cSAsaf Penso* Nice to have: driver implementation, example code, and documentation.
7321c91ed5cSAsaf Penso
7331c91ed5cSAsaf Pensorc1
7341c91ed5cSAsaf Penso~~~
7351c91ed5cSAsaf Penso
7361c91ed5cSAsaf Penso* Priority: libraries. No library feature should be accepted after -rc1.
7371c91ed5cSAsaf Penso* API changes or additions must be implemented in libraries.
7381c91ed5cSAsaf Penso* The API must include Doxygen documentation
7391c91ed5cSAsaf Penso  and be part of the relevant .rst files (library-specific and release notes).
7401c91ed5cSAsaf Penso* API should be used in a test application (``/app``).
7411c91ed5cSAsaf Penso* At least one PMD should implement the API.
7421c91ed5cSAsaf Penso  It may be a draft sent in a separate series.
7431c91ed5cSAsaf Penso* The above should be sent to the mailing list at least 2 weeks before -rc1
7441c91ed5cSAsaf Penso  to give time for review and maintainers approval.
7451c91ed5cSAsaf Penso* If no review after 10 days, a reminder should be sent.
7461c91ed5cSAsaf Penso* Nice to have: example code (``/examples``)
7471c91ed5cSAsaf Penso
7481c91ed5cSAsaf Pensorc2
7491c91ed5cSAsaf Penso~~~
7501c91ed5cSAsaf Penso
7511c91ed5cSAsaf Penso* Priority: drivers. No driver feature should be accepted after -rc2.
7521c91ed5cSAsaf Penso* A driver change must include documentation
7531c91ed5cSAsaf Penso  in the relevant .rst files (driver-specific and release notes).
7541c91ed5cSAsaf Penso* Driver changes should be sent to the mailing list before -rc1 is released.
7551c91ed5cSAsaf Penso
7561c91ed5cSAsaf Pensorc3
7571c91ed5cSAsaf Penso~~~
7581c91ed5cSAsaf Penso
7591c91ed5cSAsaf Penso* Priority: applications. No application feature should be accepted after -rc3.
7601c91ed5cSAsaf Penso* New functionality that does not depend on libraries update
7611c91ed5cSAsaf Penso  can be integrated as part of -rc3.
7621c91ed5cSAsaf Penso* The application change must include documentation in the relevant .rst files
7631c91ed5cSAsaf Penso  (application-specific and release notes if significant).
7641c91ed5cSAsaf Penso* Libraries and drivers cleanup are allowed.
7651c91ed5cSAsaf Penso* Small driver reworks.
7661c91ed5cSAsaf Penso
7671c91ed5cSAsaf Pensorc4
7681c91ed5cSAsaf Penso~~~
7691c91ed5cSAsaf Penso
7701c91ed5cSAsaf Penso* Documentation updates.
7711c91ed5cSAsaf Penso* Critical bug fixes only.
7721c91ed5cSAsaf Penso
7731c91ed5cSAsaf Penso.. note::
7741c91ed5cSAsaf Penso   Bug fixes are integrated as early as possible at any stage.
775