Re: [ovs-dev] [PATCH 01/15] doc: Convert CodingStyle to rST

2016-10-20 Thread Ben Pfaff
On Thu, Oct 20, 2016 at 07:53:37AM -0400, Russell Bryant wrote:
> Thanks for taking a look and for the "git am -3" tip.  I'll proceed with
> what you've already posted for now.

"git am -3" is like magic.  I don't know why it isn't the default.
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH 01/15] doc: Convert CodingStyle to rST

2016-10-20 Thread Russell Bryant
On Tue, Oct 18, 2016 at 4:03 PM, Stephen Finucane  wrote:

> Signed-off-by: Stephen Finucane 
> ---
>  CONTRIBUTING.md  |   4 +-
>  CodingStyle.md   | 578 -
>  CodingStyle.rst  | 642 ++
> +
>  Makefile.am  |   4 +-
>  OPENFLOW-1.1+.md |   6 +-
>  5 files changed, 649 insertions(+), 585 deletions(-)
>  delete mode 100644 CodingStyle.md
>  create mode 100644 CodingStyle.rst
>

I made a couple of minor fixes and then applied this to master.

diff --git a/CodingStyle.rst b/CodingStyle.rst
index 2c2bb77..6b916f0 100644
--- a/CodingStyle.rst
+++ b/CodingStyle.rst
@@ -90,7 +90,7 @@ Comments
 Comments should be written as full sentences that start with a capital
letter
 and end with a period. Put two spaces between sentences.

-Write block comments as shown below. You may put the ``\*`` and ``*/`` on
the
+Write block comments as shown below. You may put the ``/*`` and ``*/`` on
the
 same line as comment text if you prefer.

 ::
diff --git a/OPENFLOW-1.1+.md b/OPENFLOW-1.1+.md
index e4c004f..cebaa17 100644
--- a/OPENFLOW-1.1+.md
+++ b/OPENFLOW-1.1+.md
@@ -313,5 +313,5 @@ Bug Reporting

 Please report problems to [email protected].

-[CONTRIBUTING.rst]: CONTRIBUTING.rst
+[CONTRIBUTING.md]: CONTRIBUTING.md
 [CodingStyle.rst]: CodingStyle.rst



-- 
Russell Bryant
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH 01/15] doc: Convert CodingStyle to rST

2016-10-20 Thread Russell Bryant
On Thu, Oct 20, 2016 at 3:07 AM, Stephen Finucane  wrote:

> On 2016-10-20 01:25, Russell Bryant wrote:
>
>> On Tue, Oct 18, 2016 at 4:03 PM, Stephen Finucane 
>> wrote:
>>
>> Signed-off-by: Stephen Finucane 
>>> ---
>>> CONTRIBUTING.md  |   4 +-
>>> CodingStyle.md   | 578
>>> -
>>> CodingStyle.rst  | 642
>>> +++
>>> Makefile.am  |   4 +-
>>> OPENFLOW-1.1+.md |   6 +-
>>> 5 files changed, 649 insertions(+), 585 deletions(-)
>>> delete mode 100644 CodingStyle.md
>>> create mode 100644 CodingStyle.rst
>>>
>>
>> Unfortunately this patch needs a rebase. Can you take a look?
>>
>
> The issue seems to be a merge conflict on Makefile.am owing to the changes
> introduced with 'c4977b6'. There are similar merge conflicts with later
> patches. I can resubmit or you could use a three-way merge which
> auto-resolves conflicts for all but two of these patches.
>
> curl https://patchwork.ozlabs.org/patch/683845/mbox/ | git am -3
>
> The two unresolved conflicts are trivial to resolve (keep the '.rst'
> suffixes)
>

Thanks for taking a look and for the "git am -3" tip.  I'll proceed with
what you've already posted for now.

-- 
Russell Bryant
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH 01/15] doc: Convert CodingStyle to rST

2016-10-20 Thread Stephen Finucane

On 2016-10-20 01:25, Russell Bryant wrote:

On Tue, Oct 18, 2016 at 4:03 PM, Stephen Finucane 
wrote:


Signed-off-by: Stephen Finucane 
---
CONTRIBUTING.md  |   4 +-
CodingStyle.md   | 578
-
CodingStyle.rst  | 642
+++
Makefile.am  |   4 +-
OPENFLOW-1.1+.md |   6 +-
5 files changed, 649 insertions(+), 585 deletions(-)
delete mode 100644 CodingStyle.md
create mode 100644 CodingStyle.rst


Unfortunately this patch needs a rebase. Can you take a look?


The issue seems to be a merge conflict on Makefile.am owing to the 
changes introduced with 'c4977b6'. There are similar merge conflicts 
with later patches. I can resubmit or you could use a three-way merge 
which auto-resolves conflicts for all but two of these patches.


curl https://patchwork.ozlabs.org/patch/683845/mbox/ | git am -3

The two unresolved conflicts are trivial to resolve (keep the '.rst' 
suffixes)


Stephen
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH 01/15] doc: Convert CodingStyle to rST

2016-10-19 Thread Russell Bryant
On Tue, Oct 18, 2016 at 4:03 PM, Stephen Finucane  wrote:

> Signed-off-by: Stephen Finucane 
> ---
>  CONTRIBUTING.md  |   4 +-
>  CodingStyle.md   | 578 -
>  CodingStyle.rst  | 642 ++
> +
>  Makefile.am  |   4 +-
>  OPENFLOW-1.1+.md |   6 +-
>  5 files changed, 649 insertions(+), 585 deletions(-)
>  delete mode 100644 CodingStyle.md
>  create mode 100644 CodingStyle.rst
>

Unfortunately this patch needs a rebase. Can you take a look?

-- 
Russell Bryant
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH 01/15] doc: Convert CodingStyle to rST

2016-10-18 Thread Stephen Finucane
Signed-off-by: Stephen Finucane 
---
 CONTRIBUTING.md  |   4 +-
 CodingStyle.md   | 578 -
 CodingStyle.rst  | 642 +++
 Makefile.am  |   4 +-
 OPENFLOW-1.1+.md |   6 +-
 5 files changed, 649 insertions(+), 585 deletions(-)
 delete mode 100644 CodingStyle.md
 create mode 100644 CodingStyle.rst

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9d9f035..f848536 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -366,7 +366,7 @@ If you cannot convince your email client not to mangle 
patches, then
 sending the patch as an attachment is a second choice.
 
 Please follow the style used in the code that you are modifying.  The
-[CodingStyle.md] file describes the coding style used in most of Open
+[CodingStyle] file describes the coding style used in most of Open
 vSwitch. Use Linux kernel coding style for Linux kernel code.
 
 If your code is non-datapath code, you may use the
@@ -411,4 +411,4 @@ index fdd952e..f6cb88e 100644
 ```
 
 [INSTALL.rst]:INSTALL.rst
-[CodingStyle.md]:CodingStyle.md
+[CodingStyle]: CodingStyle.rst
diff --git a/CodingStyle.md b/CodingStyle.md
deleted file mode 100644
index 0a441e0..000
--- a/CodingStyle.md
+++ /dev/null
@@ -1,578 +0,0 @@
-Open vSwitch Coding Style
-=
-
-This file describes the coding style used in most C files in the Open
-vSwitch distribution.  However, Linux kernel code datapath directory
-follows the Linux kernel's established coding conventions.  For the
-Windows kernel datapath code, use the coding style described in
-datapath-windows/CodingStyle.
-
-The following GNU indent options approximate this style:
-
--npro -bad -bap -bbb -br -blf -brs -cdw -ce -fca -cli0 -npcs -i4 -l79 \
--lc79 -nbfda -nut -saf -sai -saw -sbi4 -sc -sob -st -ncdb -pi4 -cs -bs \
--di1 -lp -il0 -hnl
-
-
-## BASICS
-
-  Limit lines to 79 characters.
-
-  Use form feeds (control+L) to divide long source files into logical
-pieces.  A form feed should appear as the only character on a line.
-
-  Do not use tabs for indentation.
-
-  Avoid trailing spaces on lines.
-
-
-## NAMING
-
-  - Use names that explain the purpose of a function or object.
-
-  - Use underscores to separate words in an identifier: multi_word_name. 
-
-  - Use lowercase for most names.  Use uppercase for macros, macro
-parameters, and members of enumerations.
-
-  - Give arrays names that are plural.
-
-  - Pick a unique name prefix (ending with an underscore) for each
-module, and apply that prefix to all of that module's externally
-visible names.  Names of macro parameters, struct and union members,
-and parameters in function prototypes are not considered externally
-visible for this purpose.
-
-  - Do not use names that begin with _.  If you need a name for
-"internal use only", use __ as a suffix instead of a prefix.
-
-  - Avoid negative names: "found" is a better name than "not_found".
-
-  - In names, a "size" is a count of bytes, a "length" is a count of
-characters.  A buffer has size, but a string has length.  The length
-of a string does not include the null terminator, but the size of the
-buffer that contains the string does.
-
-
-## COMMENTS
-
-  Comments should be written as full sentences that start with a
-capital letter and end with a period.  Put two spaces between
-sentences.
-
-  Write block comments as shown below.  You may put the /* and */ on
-the same line as comment text if you prefer.
-
-/*
- * We redirect stderr to /dev/null because we often want to remove all
- * traffic control configuration on a port so its in a known state.  If
- * this done when there is no such configuration, tc complains, so we just
- * always ignore it.
- */
-
-  Each function and each variable declared outside a function, and
-each struct, union, and typedef declaration should be preceded by a
-comment.  See FUNCTION DEFINITIONS below for function comment
-guidelines.
-
-  Each struct and union member should each have an inline comment that
-explains its meaning.  structs and unions with many members should be
-additionally divided into logical groups of members by block comments,
-e.g.:
-
-/* An event that will wake the following call to poll_block(). */
-struct poll_waiter {
-/* Set when the waiter is created. */
-struct ovs_list node;   /* Element in global waiters list. */
-int fd; /* File descriptor. */
-short int events;   /* Events to wait for (POLLIN, POLLOUT). */
-poll_fd_func *function; /* Callback function, if any, or null. */
-void *aux;  /* Argument to callback function. */
-struct backtrace *backtrace; /* Event that created waiter, or null. */
-
-/* Set only when poll_block() is called. */
-struct pollfd *pollfd;  /* Pointer to element of the pollfds array
-