Acked-by: Samuel Ghinet <sghi...@cloudbasesolutions.com>
________________________________________
From: Alin Serdean
Sent: Tuesday, September 09, 2014 8:43 PM
To: Nithin Raju; dev@openvswitch.org; Samuel Ghinet
Subject: RE: [ovs-dev] [PATCH v2] datapath-windows: update CodingStyle 
guideline        for variable names

Acked-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>

-----Mesaj original-----
De la: dev [mailto:dev-boun...@openvswitch.org] În numele Nithin Raju
Trimis: Tuesday, September 9, 2014 9:03 AM
Către: dev@openvswitch.org; Samuel Ghinet
Subiect: [ovs-dev] [PATCH v2] datapath-windows: update CodingStyle guideline 
for variable names

During a review, it seemed that some of the conventions were not clear.
Fixing them in this patch.

Signed-off-by: Nithin Raju <nit...@vmware.com>
Reported-by: Samuel Ghinet <sghi...@cloudbasesolutions.com>
---
 datapath-windows/CodingStyle |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/datapath-windows/CodingStyle b/datapath-windows/CodingStyle index 
006adfd..3550cdb 100644
--- a/datapath-windows/CodingStyle
+++ b/datapath-windows/CodingStyle
@@ -40,8 +40,14 @@ guidelines:

   Use lower case to begin the name of a variable.

+  Do not use '_' to begin the name of the variable. '_' is to be used
+ to begin  the parameters of a pre-processor macro.
+
   Use upper case to begin the name of a function, enum, file name etc.

+  Static functions whose scope is limited to the file they are defined
+ in can  be prefixed with '_'. This is not mandatory though.
+
   For types, use all upper case for all letters with words separated by '_'. If
   camel casing is preferred, use  upper case for the first letter.

@@ -72,6 +78,13 @@ OvsDetectTunnelRxPkt(POVS_FORWARDING_CONTEXT ovsFwdCtx,
     return FALSE;
 }

+  For declaring variables of pointer type, use of the pointer data type
+prefixed with 'P' is preferred over using '*'. This is not mandatory
+though, and is only prescribed since it is a common practice in Windows.
+
+  Example, #1 is preferred over #2 though #2 is also equally correct:
+  1. PNET_BUFFER_LIST curNbl;
+  2. NET_BUFFER_LIST *curNbl;

 COMMENTS

--
1.7.4.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to