pstream-unix: Increase listen count to 64 in punix_open().

In my test with openstack setup, ovs-ofctl executes failed when there are
many flow rules to be added by multiple threads.
The error like this:
ovs-ofctl: /var/run/openvswitch/br1.mgmt: failed to open socket (Protocol
error)

In the function listen(fd, 10) in punix_open(), the number 10 should be
modified to more bigger, such as 64 maybe a proper value.

Signed-off-by: Lilijun <jerry.lilijun@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-vswitchd: Better diagnose errors in DPDK command-line options.

With DPDK compiled in, when the --dpdk option was given other than as the
first command-line argument, ovs-vswitchd silently ignored it.  Without
DPDK compiled in, when the --dpdk option was given anywhere, ovs-vswitchd
silently ignored it.  However, in each case any options following --dpdk
were not ignored, and since --dpdk is normally followed by additional
DPDK-specific options, this caused even more confusing trouble.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Tested-by: Daniele Di Proietto <ddiproietto@vmware.com>
INSTALL.DPDK: Update DPDK related documentation.

This commit updates the DPDK related documentation to reflect
the pmd thread multi-threading work.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
CodingStyle: Mention our assumption about conversions to bool

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
bridge: Fix high cpu utilization.

When there are more than one ovs-vswitchd processes started,
only one process is enabled.  The disabled processes should
just sleep.  However, a bug in ovs makes the disabled processes
keep waking up on global connectivity sequence number which is
never sync'ed.  Consequently, those processes use 100% cpu.

This commit fixes the bug by always sync up the connectivity
sequence number for disabled processes.

Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
ovs-vswitchd.at: Fix "start additional ovs-vswitchd process" test

NetBSD implementation of wc command outputs extra whitespaces
like the following.  Tweak the test to success on such environments.

    % echo hoge|wc -l|hexdump -C
    00000000  20 20 20 20 20 20 20 31  0a                       |       1.|
    00000009
    %

The failing test was introduced by
commit 6bef3c7ca859f208239ca61ec3b25c09a3571553
("bridge: Fix high cpu utilization.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Joe Stringer <joestringer@nicira.com>
README: Adding github markup and travis-ci build status to github readme page.

Signed-off-by: Pritesh Kothari <pritesh.kothari@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
configure: Disable strict aliasing.

The C standard allows compilers to do type-based alias analysis, which
means that the compiler is allowed to assume that pointers to objects of
different types are pointers to different objects.  For example, a compiler
may assume that "uint16_t *a" and "uint32_t *b" point to different and
nonoverlapping locations because the pointed-to types are different.  This
can lead to surprising "optimizations" with compilers that by default do
this kind of analysis, which includes GCC and Clang.

The one escape clause that the C standard gives us is that character types
must be assumed to alias any other object.  We've always tried to use this
escape clause to avoid problems with type-based alias analysis in the past.
I think that we should continue to try to do this in the future.  It's hard
to tell what compiler we might want to use in the future, and one never
knows what kind of control that compiler allows over alias analysis.

However, recently I helped another developer debug a nasty and confusing
issue, which turned out to be the result of a surprising compiler
optimization due to alias analysis.  I've seen enough of these that I don't
think it's worthwhile to risk more problems than we have to.  Thus, this
commit turns off type-based alias analysis in GCC and Clang.

Linus Torvalds thinks that type-base alias analysis is not sane, at least
as GCC implements it: https://lkml.org/lkml/2003/2/26/158

The GCC manual says that -Wstrict-aliasing is only effective without
-fno-strict-aliasing, otherwise I'd keep -Wstrict-aliasing also.

Indications are that MSVC doesn't do type-based alias analysis by default.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Change Travis CI notification email to ljakab@ac.upc.edu
userspace: add support for pop_eth and push_eth actions

These actions will allow L2->L3 and L3->L2 switching, and are supposed
to be added to flows installed in the datapath transparently by
ovs-vswitchd.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
userspace: add layer 3 flow and switching support

This commit relaxes the assumption that all packets have an Ethernet
header, and adds support for layer 3 flows.  For each packet received on
the Linux kernel datapath the l2 and l3 members of struct ofpbuf are
intialized appropriately, and some functions now expect this (notably
flow_extract()), in order to differentiate between layer 2 and layer 3
packets.  struct flow has now a new 'base_layer' member, because we
cannot assume that a flow has no Ethernet header when eth_src and
eth_dst are 0.  For layer 3 packets, the protocol type is still stored
in the eth_type member.

Switching L2->L3 and L3->L2 are both implemented by adding the pop_eth
and push_eth actions respectively when a transition is detected.  The
push_eth action puts 0s on both source and destination MACs.  These
addresses can be modified with mod_dl_dst and mod_dl_src actions.

Added new prerequisite MFP_ETHERNET for fields MFF_ETH_SRC, MFF_ETH_DST,
MFF_VLAN_TCI, MFF_DL_VLAN, MFF_VLAN_VID and MFF_DL_VLAN_PCP.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
datapath: add layer 3 flow/port support

Implementation of the pop_eth and push_eth actions in the kernel, and
layer 3 flow support.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Address Jesse's comment #1
Address Jesse's comment #8
Address Jesse's comment #7
Address Jesse's comment #6
Address Jesse's comment #5
Address Jesse's comment #4
Address Jesse's comment #2
Address Jesse's comment #6.1