ovs-appctl-bashcomp: Use better function to complete file.
[cascardo/ovs.git] / INSTALL.Windows.md
index fd333bc..e84013a 100644 (file)
@@ -35,11 +35,13 @@ install Windows Driver Kit (WDK) 8.1 Update.
 It is important to get the Visual Studio related environment variables and to
 have the $PATH inside the bash to point to the proper compiler and linker. One
 easy way to achieve this is to get into the "Developer Command prompt for visual
-studio" and through it enter into the bash shell available from msys.
+studio" and through it enter into the bash shell available from msys by typing
+'bash --login'.
 
 If after the above step, a 'which link' inside MSYS's bash says,
 "/bin/link.exe", rename /bin/link.exe to something else so that the
-Visual studio's linker is used.
+Visual studio's linker is used. You should also see a 'which sort' report
+"/bin/sort.exe".
 
 * For pthread support, install the library, dll and includes of pthreads-win32
 project from
@@ -82,8 +84,7 @@ To get SSL support for Open vSwitch on Windows, do the following:
 * Install OpenSSL for Windows as suggested at
 http://www.openssl.org/related/binaries.html.
 The link as of this writing suggests to download it from
-http://slproweb.com/products/Win32OpenSSL.html and the latest version is
-"Win32 OpenSSL v1.0.1j".
+http://slproweb.com/products/Win32OpenSSL.html
 
 Note down the directory where OpenSSL is installed (e.g.: C:/OpenSSL-Win32).
 
@@ -97,15 +98,29 @@ For example,
 
 * Run make for the ported executables.
 
-Building the Kernel module
---------------------------
-We directly use the Visual Studio 2013 IDE to compile the kernel module. You can
-open the extensions.sln file in the IDE and build the solution.
+Building the Kernel datapath module
+-----------------------------------
+* We directly use the Visual Studio 2013 IDE to compile the kernel datapath.
+You can open the extensions.sln file in the IDE and build the solution.
+
+* The kernel datapath can be compiled from command line as well.  The top
+level 'make' will invoke building the kernel datapath, if the
+'--with-vstudioddk' argument is specified while configuring the package.
+For example,
+
+    % ./configure CC=./build-aux/cccl LD="`which link`" LIBS="-lws2_32" \
+    --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \
+    --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread" \
+    --enable-ssl --with-openssl="C:/OpenSSL-Win32" \
+    --with-vstudioddk="<WDK to use>"
+
+    Possible values for "<WDK to use>" are:
+    "Win8.1 Debug", "Win8.1 Release", "Win8 Debug" and "Win8 Release".
 
 Installing the Kernel module
 ----------------------------
 Once you have built the solution, you can copy the following files to the
-target Hyper-V machines:
+target Hyper-V machines.
 
     ./datapath-windows/x64/Win8.1Debug/package/ovsext.inf
     ./datapath-windows/x64/Win8.1Debug/package/OVSExt.sys
@@ -113,6 +128,10 @@ target Hyper-V machines:
     ./datapath-windows/misc/install.cmd
     ./datapath-windows/misc/uninstall.cmd
 
+The above path assumes that the kernel module has been built using Windows
+DDK 8.1 in Debug mode. Change the path appropriately, if a different WDK
+has been used.
+
 Steps to install the module
 ---------------------------
 
@@ -131,11 +150,11 @@ Steps to run the user processes & configure VXLAN ports
 ovsdb\ovsdb-tool.exe create conf.db .\vswitchd\vswitch.ovsschema
 
 02> Run ovsdb-server
-ovsdb\ovsdb-server.exe -v --remote=ptcp:6632:127.0.0.1 conf.db
+ovsdb\ovsdb-server.exe -v --remote=ptcp:6640:127.0.0.1 conf.db
 
 03> Create integration bridge & pif bridge
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-br br-int
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-br br-pif
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-br br-int
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-br br-pif
 
 04> Dump the ports
 utilities\ovs-dpctl.exe show
@@ -159,24 +178,24 @@ system@ovs-system:
 
 
 05> Add the physical NIC and the internal port to br-pif
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-pif <port name>
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-pif <port name>
 
 Eg:
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-pif external.1
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-pif internal
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-pif external.1
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-pif internal
 
 06> Add the VIFs to br-int
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-int <port name>
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-int <port name>
 
 Eg:
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-int vmNICEmu.1000048
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-int vmNICSyn.1000049
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-int vmNICEmu.1000048
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-int vmNICSyn.1000049
 
 07> Verify the status
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 show
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 show
 
 Eg:
-$ utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 show
+$ utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 show
 4cd86499-74df-48bd-a64d-8d115b12a9f2
     Bridge br-pif
         Port internal
@@ -197,28 +216,28 @@ $ utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 show
 
 
 09> Run vswitchd
-vswitchd\ovs-vswitchd.exe -v tcp:127.0.0.1:6632
+vswitchd\ovs-vswitchd.exe -v tcp:127.0.0.1:6640
 
 10> You can figure out the port name to MAC address mapping now. (optional)
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 list interface
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 list interface
 
 //********** VXLAN PORT CONFIGURATION (Supports Multiple ports) ************//
 (Remove all patch ports added to create VLAN networks.)
 11> Add the vxlan port between 172.168.201.101 <-> 172.168.201.102
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-int vxlan-1
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-1 type=vxlan
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-1 options:local_ip=172.168.201.101
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-1 options:remote_ip=172.168.201.102
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-1 options:in_key=flow
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-1 options:out_key=flow
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-int vxlan-1
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-1 type=vxlan
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-1 options:local_ip=172.168.201.101
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-1 options:remote_ip=172.168.201.102
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-1 options:in_key=flow
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-1 options:out_key=flow
 
 12> Add the vxlan port between 172.168.201.101 <-> 172.168.201.105
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 add-port br-int vxlan-2
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-2 type=vxlan
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-2 options:local_ip=172.168.201.102
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-2 options:remote_ip=172.168.201.105
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-2 options:in_key=flow
-utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6632 set Interface vxlan-2 options:out_key=flow
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 add-port br-int vxlan-2
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-2 type=vxlan
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-2 options:local_ip=172.168.201.102
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-2 options:remote_ip=172.168.201.105
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-2 options:in_key=flow
+utilities\ovs-vsctl.exe --db=tcp:127.0.0.1:6640 set Interface vxlan-2 options:out_key=flow
 
 
 //********** VLAN CONFIGURATION (Using patch ports) ************//
@@ -248,16 +267,22 @@ type: External network', in the HyperV virtual network switch configuration.
 this is still a work in progress. Till the support is complete we recommend
 disabling TX/RX offloads for both the VM's as well as the HyperV.
 
+Windows autobuild service
+-------------------------
+
+AppVeyor (appveyor.com) provides a free Windows autobuild service for
+opensource projects.  Open vSwitch has integration with AppVeyor for
+continuous build.  A developer can build test his changes for Windows by
+logging into appveyor.com using a github account, creating a new project
+by linking it to his development repository in github and triggering
+a new build.
 
 TODO
 ----
 
-* OVS currently has no native support for atomics on Windows.  Pthreads
-are used as a fallback, but some features, such as OVS-RCU are really
-slow without native atomics support. Atomics support for Windows has to
-be brought in.
-
 * Investigate the working of sFlow on Windows and re-enable the unit tests.
 
+* Investigate and add the feature to provide QOS.
+
 * Sign the driver & create an MSI for installing the different OpenvSwitch
 components on windows.