meta-flow: OXM_OF_PKT_REG<n> now available as (draft) OF1.3 extension.

ONF-JIRA: EXT-244
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ofp-errors: Use official extension code for OFPBAC_BAD_SET_MASK.

ONF-JIRA: EXT-425
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ovs-ofctl: Document that mod-group requires the type field

Document that mod-group rather than del-group requires the type field.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: BSOD for a transactional NL cmd without dump state.

The BSOD is triggered by the incorect extraction of the OVS message
from the received input buffer from userspace, in _FlowNlGetCmdHandler
function.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/54
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: Removed duplicate checking of previous dump state

Removed the check for previous dump state before calling FreeUserDumpState
as the check is also performed in the latter function.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
OPENFLOW-1.1+.md: Update and correct OpenFlow 1.4 features.

Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
OPENFLOW-1.1+.md: Add OpenFlow 1.5 features.

Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: Support for hybrid forwarding

In a hybrid forwarding environment, there are two types of packets that
enter and leave the Hyper-V extensible switch: NVGRE packets and non-NVGRE
packets. Hybrid forwarding involves filtering the incoming traffic based
on packet type.

Thus, we must split the incoming traffic into NVGRE and non-NVGRE packets.
All non-NVGRE traffic is forwarded by the OVS extension and processed as
usual, and the NVGRE traffic is passed to NDIS to be handled by the HNV
module.

Necessary VS project changes regarding the compiler settings will be made
in a different patch.

More details about hybrid forwarding and the necessary NDIS 6.40 support
is provided in issue #52.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Nithin Raju <nithin@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/52
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
dpif: Fix initialization order.

OVS router depends on tnl_conf_seq and all tunnel related
components should be initialized before registering dpif
implementations.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
datapath-windows: Move vport code from Datapath.c to Vport.c.

Plain code motion. No additional cleanup or refactoring peformed.

I'll be doing some code refactoring in subsequent patches.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
meta-flow: Add support for ONF OpenFlow 1.3 extension ONFOXM_ET_TCP_FLAGS.

Actually the draft extension says "TCP_FLAG", without an "S", but I think
that's just a typo.

ONF-JIRA: EXT-109
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
openflow: Value 4 of enum ofp15_group_mod_command is reserved.

The spec has been clarified to note that element 4 of
enum ofp_group_mod_command is reserved. This patch reflects
that change.

ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
openflow: Use *_array_len names in struct ofp15_bucket and ofp15_group_mod

The spec has been clarified to use _list_len in palce of _list_len
terminology to make it clearer that the data is not an ordered list
(it is a set). The code present in Open vSwitch already avoided
the _list_len terminology. This change brings the code into
line with the updated spec.

ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: Add test case for OF1.4 packet-in.

The test case current fails and shows a bug when OF1.4 is used between
the controller and the switch, the packet-in message still uses OF1.3
wire protocol version.

Signed-off-by: Shu Shen <shu.shen@radisys.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests: Fix test broken by introduction of ONFOXM_ET_TCP_FLAGS.

Commit 847ddeab372220 (meta-flow: Add support for ONF OpenFlow 1.3
extension ONFOXM_ET_TCP_FLAGS.) failed to update a test to match the new
OXM extension.  This fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: Fixed Release broken build.

The release configurations of the OVSEXT project were not compiling.
This was due to a warning that was treated as error. Fixed that.

I did not want to remove that variable, because it is used in an
ASSERT in that function.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
datapath-windows: Update OVSEXT VS project to support 6.40

Added support for creating OVS extension driver NDIS 6.40 compliant.

Currently the OVSEXT Visual Studio project has four build configurations,
'Win8 Release', 'Win8 Debug', 'Win8.1 Release' and 'Win8.1 Debug'. All of
them are creating a binary that is NDIS 6.30 compliant. I have changed the
Win8.1 build configurations in order to create a binary that is NDIS 6.40
compliant.

In this way, the OVSEXT project is able to create a release/debug binary
that is NDIS 6.30 compliant, using the 'Win8 Release' and 'Win8 Debug'
build configurations, as well as a release/debug binary that is NDIS 6.40
compliant, using the 'Win8.1 Release' and 'Win8.1 Debug' build
configurations.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: Fix broken build on MSVC.

Removing unused local variable.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Makefile: Add static check for misuse of LITTLE_ENDIAN and BIG_ENDIAN.

I've pointed out two misuses of these macros in review in the last week,
by different authors.  It's time to make it difficult to screw this up.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
ovs-vsctl: Prevent creating duplicate VLAN bridges.

ovs-vsctl has the concept of a VLAN (or "fake") bridge, which is a
sort of a sub-bridge that receives only packets on a particular VLAN.
There is no way to distinguish two VLAN bridges with the same parent on the
same VLAN, but until now ovs-vsctl did not prevent creating duplicates or
report them.  This commit fixes the problem.

Reported-by: rwxybh
Reported-at: https://github.com/openvswitch/ovs/issues/21
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>