mem: Delete the packet accessors which use guest endianness.
[gem5.git] / CONTRIBUTING.md
index 3cfad9f789e7ce4fe60724d26551bf483ec00620..568d790bbb320fbbde1ef59a37efe08df664f96a 100644 (file)
@@ -36,13 +36,19 @@ High-level flow for submitting changes
            |
            |
            v
-    +------+------+
-    | Post review |
-    +------+------+
-           |
-           v
-    +--------+---------+
-    | Wait for reviews | <--------+
+    +-------------+
+    |  Run tests  |<--------------+
+    +------+------+               |
+           |                      |
+           |                      |
+           v                      |
+    +------+------+               |
+    | Post review |               |
+    +------+------+               |
+           |                      |
+           v                      |
+    +--------+---------+          |
+    | Wait for reviews |          |
     +--------+---------+          |
            |                      |
            |                      |
@@ -71,6 +77,19 @@ submit your code to the mainline of gem5, the code is reviewed by others in the
 community. Additionally, the maintainer for that part of the code must sign off
 on it.
 
+Contributing long-lived feature branches
+----------------------------------------
+Oftentimes users or institutions add features that are necessarily complex,
+and require many changes on long-lived feature branches. In this case,
+maintaining a perfect history where all changes work individually is infeasible.
+When contributing long-lived feature branches back to gem5's public repository
+users may merge entire long-lived branches into a single changeset and contribute
+their code back as long as 1) the changes have been reviewed by the maintainer
+2) the maintainer agrees to allow such a change, and 3) the changes are passing
+the public tests. Changes that affect common code (outside of a specific
+maintainer's purview) will still need to follow the standard gem5 protocol.
+
+
 Cloning the gem5 repo to contribute
 ===================================
 
@@ -178,6 +197,13 @@ commit (HEAD).
  git commit --amend
 ```
 
+Running tests
+=============
+
+Before posting a change to the code review site, you should always run the
+quick tests!
+See TESTING.md for more information.
+
 Posting a review
 ================
 
@@ -244,13 +270,21 @@ changeset.
  git commit --amend
 ```
 
-Push change to gerrit as a draft
---------------------------------
+Push change to gerrit as a draft/private
+----------------------------------------
+
+See https://gerrit-review.googlesource.com/Documentation/intro-user.html#private-changes
+for details on private gerrit changes.
 
 ```
- git push origin HEAD:refs/drafts/master
+ git push origin HEAD:refs/for/master%private
 ```
 
+Once you have pushed your change as "private", you can log onto [gerrit]
+(https://gem5-review.googlesource.com) and once you're happy with the commit
+click the "unmark private" which may be hidden in the "more options" dropdown
+in the upper right corner.
+
 Push change bypassing gerrit
 -----------------------------
 
@@ -313,11 +347,6 @@ review request.
  git push origin HEAD:refs/for/master
 ```
 
-Note: If you have posted a patch and don't receive any reviews, you may need to
-prod the reviewers. You can do this by adding a reply to your changeset review
-on gerrit. It is expected that at least the maintainer will supply a review for
-your patch.
-
 Committing changes
 ==================
 
@@ -330,3 +359,67 @@ Each patch must meet the following criteria to be merged:
 Once a patch meets the above criteria, the submitter of the patch will be able
 to merge the patch by pressing the "Submit" button on Gerrit. When the patch is
 submitted, it is merged into the public gem5 branch.
+
+Review moderation and guidelines
+--------------------------------
+
+Once a change is submitted, reviewers shall review the change. This may require
+several iterations before a merge. Comments from reviewers may include
+questions, and requests for alterations to the change prior to merging. The
+overarching philosophy in managing this process is that there should be
+politeness and clear communication between all parties at all times, and,
+whenever possible, permission should be asked before doing anything that may
+inconvenience another party. Included below are some guidelines we expect
+contributors and reviewers to follow.
+
+ * In all forms of communication, contributors and reviewers must be polite.
+   Comments seen as being needlessly hostile or dismissive will not be
+   tolerated.
+ * Change contributors should respond to, or act upon, each item of feedback
+   given by reviewers. If there is disagreement with a piece of
+   feedback, a sufficiently detailed reason for this disagreement should
+   be given. Polite discussion, and sharing of information and expertise
+   is strongly encouraged.
+ * Contributors are advised to assign reviewers when submitting a change.
+   Anyone who contributes to gem5 can be assigned as a reviewer. However,
+   all changes must be accepted by at least one maintainer prior to a
+   merge, ergo assigning of at least one maintainer as a reviewer is
+   strongly recommended. Please see MAINTAINERS for a breakdown of
+   gem5 maintainers and which components they claim responsibility for.
+   Maintainers should be chosen based on which components the change is
+   targeting. Assigning of reviewers is not strictly enforced, though not
+   assigning reviewers may slow the time in which a change is reviewed.
+ * If a contributor posts a change and does not receive any reviews after two
+   working days (excluding regional holidays), it is acceptable to "prod"
+   reviewers. This can be done by adding a reply to the changeset review
+   (e.g., "Would it be possible for someone to review my change?"). If the
+   contributor has yet to assign reviewers, they are strongly advised to do so.
+   Reviewers will get notified when assigned to referee a change.
+ * By default, the original contributor is assumed to own a change. I.e.,
+   they are assumed to be the sole party to submit patchsets. If someone
+   other than the original contributor wishes to submit patchsets to a
+   change on the original contributor's behalf, they should first ask
+   permission. If two working days pass without a response, a patchset may be
+   submitted without permission. Permission does not need to be asked to submit
+   a patchset consisting of minor, inoffensive, changes such a typo and format
+   fixes.
+ * Once a change is ready to merge, it enters a "Ready to Submit" state. The
+   original contributor should  merge their change at this point, assuming they
+   are content with the commit in its present form. After two working days, a
+   reviewer may message a contributor to remind them of the change being in a
+   "Ready to Submit" state and ask if they can merge the change on the
+   contributors behalf. If a further two working days elapse without a
+   response, the reviewer may merge without permission. A contributor may keep
+   a change open for whatever reason though this should be communicated to the
+   reviewer when asked.
+ * After a month of inactivity from a contributor on an active change, a
+   reviewer may post a message on the change reminding the submitter, and
+   anyone else watching the change, of its active status and ask if they are
+   still interested in eventually merging the change. After two weeks of no
+   response the reviewer reserves the right to abandon the change under the
+   assumption there is no longer interest.
+ * The final arbiter in any dispute between reviewers and/or contributors
+   is the PMC (PMC members are highlighted in MAINTAINERS). Disputes requiring
+   intervention by the PMC are undesirable. Attempts should be made to resolve
+   disagreements via respectful and polite discourse before being escalated to
+   this level.