summaryrefslogtreecommitdiff
path: root/CodingStyle
Commit message (Collapse)AuthorAgeFilesLines
* doc: Convert docs to Markdown languageThomas Graf2014-10-281-569/+0
| | | | | | | | | | | Converts the majority of docs over to use the Markdown language for pretty printing on GitHub. It's a rough first convertion without exploiting the full potential of Markdown at this point. Section titles and indentation are fixed as needed. Minimal docs interlinking is added. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* CodingStyle: Mention our assumption about conversions to boolYAMAMOTO Takashi2014-10-011-0/+5
| | | | | Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Ben Pfaff <blp@nicira.com>
* CodingStyle: Relax restrictions on types of bit-fields.Ben Pfaff2014-08-281-6/+4
| | | | | | | | | | | C99 only requires compilers to support four types for bit-fields: signed int, unsigned int, int, and _Bool. "int" should not be used because it is implementation-defined whether it is signed. In practice, we have found that compilers (in particular, GCC, Clang, and MSVC 2013) support any integer type. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* datapath-windows: Kernel module for HyperV.Saurabh Shah2014-07-281-1/+3
| | | | | | | | | | | | | | | | | | The kernel switch extension has support for bridged back forwarding & tunneling over VXLAN. There is no Netlink integration as it is still being worked out. Co-Authored-By: Ankur Sharma <ankursharma@vmware.com> Signed-off-by: Ankur Sharma <ankursharma@vmware.com> Co-Authored-By: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Eitan Eliahu <eliahue@vmware.com> Co-Authored-By: Guolin Yang <gyang@vmware.com> Signed-off-by: Guolin Yang <gyang@vmware.com> Co-Authored-By: Linda Sun <lsun@vmware.com> Signed-off-by: Linda Sun <lsun@vmware.com> Co-Authored-By: Nithin Raju <nithin@vmware.com> Signed-off-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Saurabh Shah <ssaurabh@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* CodingStyle: Add suggested GNU indent options.Ben Pfaff2014-07-161-0/+7
| | | | | | Suggested-by: Gerald Rogers <gerald.rogers@intel.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* CodingStyle: Functions in .c files should usually not be marked "inline".Ben Pfaff2014-06-251-0/+5
| | | | | | | I thought this was in here already, but I guess not. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>
* CodingStyle: Allow C99 mixing of declarations and code.Jarno Rajahalme2014-05-281-8/+7
| | | | | | | | As even the MSVC 2013 now supports the C99 mixing of declarations and code, we can now allow them in OVS code. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* CodingStyle: Allow designated initializers.Ben Pfaff2014-03-191-5/+4
| | | | | | | | MSVC 2013 finally implements them, 14 years after they became part of C, so we can use them in generic code now. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>
* Rename NOT_REACHED to OVS_NOT_REACHEDHarold Lim2013-12-171-1/+1
| | | | | | | | This allows other libraries to use util.h that has already defined NOT_REACHED. Signed-off-by: Harold Lim <haroldl@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Avoid printf type modifiers not supported by MSVC C runtime library.Alin Serdean2013-11-251-1/+15
| | | | | | | | | | | | | The MSVC C library printf() implementation does not support the 'z', 't', 'j', or 'hh' format specifiers. This commit changes the Open vSwitch code to avoid those format specifiers, switching to standard macros from <inttypes.h> where available and inventing new macros resembling them where necessary. It also updates CodingStyle to specify the macros' use and adds a Makefile rule to report violations. Signed-off-by: Alin Serdean <aserdean@cloudbasesolutions.com> Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* CodingStyle: Add guide about using thread safety types and annotations.Alex Wang2013-08-091-0/+15
| | | | | | | | | This commit adds guide about using thread safety types and annotations to CodingStyle file. Signed-off-by: Alex Wang <alexw@nicira.com> [blp@nicira.com edited the advice slightly] Signed-off-by: Ben Pfaff <blp@nicira.com>
* INSTALL, CodingStyle: Recognize that Clang is an acceptable compiler.Ben Pfaff2013-08-011-4/+5
| | | | | | | | Clang has nice static analysis and works well as an Open vSwitch compiler, so mention it more explicitly. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* CodingStyle: Mention our common return value conventions.Ben Pfaff2013-03-041-0/+12
| | | | | CC: Andy Zhou <azhou@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* CodingStyle: Fix indentation.Ben Pfaff2012-11-161-2/+2
| | | | | | | This got changed away from what I actually prefer in commit be2c418b73fc (Cleanup isdigit() warnings.). Signed-off-by: Ben Pfaff <blp@nicira.com>
* CodingStyle: Clarify C dialect section and add rationale.Ben Pfaff2010-11-101-6/+11
| | | | Requested-by: Ethan Jackson <ethan@nicira.com>
* CodingStyle: Mention that "free" functions should accept a null pointer.Ben Pfaff2010-11-031-0/+6
| | | | | I've always written OVS code this way, so this just codifies it so that others know.
* CodingStyle: Drop advice about breaking lines before binary operators.Ben Pfaff2010-04-201-7/+2
| | | | | | I like the style that was prescribed here--I find it slightly easier to read--but everyone else who submits code seems to prefer breaking lines after binary operators instead. No point in fighting the tide.
* Cleanup isdigit() warnings.Justin Pettit2009-08-251-1/+3
| | | | | NetBSD's gcc complains if isdigit()'s argument is an unadorned char. This provides an appropriate cast.
* netdev: Change netdev_get_mtu() to return an error code.Ben Pfaff2009-07-301-1/+1
| | | | | | | | | To make the netdev code more portable, it needs to support returning error codes from functions that don't have them. This commit changes netdev_get_mtu() to return an error code and updates its caller. (Currently netdev_get_mtu() won't ever return an error, but other future implementations might.)
* Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff2009-07-081-0/+504