sliver-openvswitch.git
10 years agoFix misspellings in comments and docs.
Andy Hill [Tue, 4 Jun 2013 22:35:36 +0000 (17:35 -0500)]
Fix misspellings in comments and docs.

Flagged with: https://github.com/lyda/misspell-check
Run with: git ls-files | misspellings -f -

Signed-off-by: Andy Hill <hillad@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto/pktbuf.c: Fix a typo in the comment
Alex Wang [Wed, 29 May 2013 20:57:22 +0000 (13:57 -0700)]
ofproto/pktbuf.c: Fix a typo in the comment

This patch fixes a typo in the comment of the pktbuf_retrieve() function.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agotestsuite: make a sed command more portable
YAMAMOTO Takashi [Tue, 4 Jun 2013 00:17:34 +0000 (09:17 +0900)]
testsuite: make a sed command more portable

avoid using some GNU sed extensions, which are not available
eg. on NetBSD's /usr/bin/sed.

while there are other places these extenstions are used in the testsuite,
this instance is new and seems the only one currently being executed
for NetBSD.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agobridge.c: Change variable "ofport" type in "struct if_cfg" and "struct iface"
Alex Wang [Tue, 4 Jun 2013 19:46:38 +0000 (12:46 -0700)]
bridge.c: Change variable "ofport" type in "struct if_cfg" and "struct iface"

This patch changes the variable type of "ofport" in "struct if_cfg" and
"struct iface" from int64_t to uint16_t. This is more consistent with
the OpenFlow-1.0 port definition.

Also, before this patch, -1 is used to indicate an unknown port. This
patch uses OFPP_NONE, since "ofport" becomes uint16_t.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoAlways use valid ids pointer in dec_ttl_cnt_ids_from_openflow()
Simon Horman [Mon, 3 Jun 2013 05:46:30 +0000 (14:46 +0900)]
Always use valid ids pointer in dec_ttl_cnt_ids_from_openflow()

Always update the ids pointer after calling ofpbuf_put()
to ensure that it is valid when accessed.

During testing a case came up where the call to ofpbuf_put() in the
for (i = 0; i < ids->n_controllers; i++) loop would cause the underlying
buffer to be reallocated. This resulted in ids->n_controllers being an
incorrect value, the loop continuing on longer than desired and finally a
segmentation fault.

Reported-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agocfm: Update netdev when changed.
Ethan Jackson [Mon, 3 Jun 2013 20:49:13 +0000 (13:49 -0700)]
cfm: Update netdev when changed.

If ofproto decided to change the netdev of a particular ofport,
cfm_demand mode would improperly continue using the old netdev to
collect stats.

Bug #17583.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agodatapath: fix variable names in comment
Lorand Jakab [Mon, 3 Jun 2013 15:43:37 +0000 (08:43 -0700)]
datapath: fix variable names in comment

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agoofproto-dpif.c: Modify vsp_realdev_to_vlandev() function
Alex Wang [Fri, 31 May 2013 01:24:44 +0000 (18:24 -0700)]
ofproto-dpif.c: Modify vsp_realdev_to_vlandev() function

Commit 52a90c29 (Implement new "VLAN splinters" feature) passed in OpenFlow
port number to vsp_realdev_to_vlandev() function which asks for datapath port
number.

This patch fixes this bug by making the vsp_realdev_to_vlandev() function
take in and return OpenFlow port number.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoINSTALL: Add documentaion for hot upgrades.
Gurucharan Shetty [Thu, 30 May 2013 09:07:15 +0000 (09:07 +0000)]
INSTALL: Add documentaion for hot upgrades.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-ctl.in: Restore flows with vswitchd packet processing disabled.
Gurucharan Shetty [Tue, 28 May 2013 13:21:56 +0000 (13:21 +0000)]
ovs-ctl.in: Restore flows with vswitchd packet processing disabled.

It has been observed that when we upgrade openvswitch with
thousands of openflow flows already established and there is heavy
traffic going through the switch, restoring flows can take a very
long time (8 minutes in one use case) with CPU running at 100%.
This can make the upgrade very expensive.

This commit starts vswitchd by asking it to wait till flow restore is
finished. Once the flows are restored, it resumes normal operations.

Bug #16086.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-ctl.in: Add manager after restoring flows.
Gurucharan Shetty [Tue, 28 May 2013 12:53:17 +0000 (12:53 +0000)]
ovs-ctl.in: Add manager after restoring flows.

Currently we are adding the manager after starting ovs-vswitchd.
Instead, add the manager after flow restore is completed.

Bug #16086.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-vswitchd: An option to wait for userspace flow restore to complete.
Gurucharan Shetty [Tue, 28 May 2013 12:52:36 +0000 (12:52 +0000)]
ovs-vswitchd: An option to wait for userspace flow restore to complete.

While upgrading openvswitch, it helps to restore openflow flows before
starting packet processing.  Typically we want to restart openvswitch,
add the openflow flows and then start packet processing.

To do this, we look for the other_config:flow-restore-wait column
in the Open_vSwitch table during startup. If set as true, we disable
receiving packets from the datapath, expiring or flushing flows and
running any periodic ofproto activities. This option does not prevent
the addition and deletion of ports. Once this option is set to false,
we return to normal processing.

An upcoming commit will use this feature in Open vSwitch startup scripts.

Bug #16086.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoofproto-dpif: Simplify ofproto hit count tracking.
Ethan Jackson [Thu, 30 May 2013 20:32:26 +0000 (13:32 -0700)]
ofproto-dpif: Simplify ofproto hit count tracking.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Fix a typo
Alex Wang [Thu, 30 May 2013 21:37:57 +0000 (14:37 -0700)]
ofproto-dpif: Fix a typo

This patch fixes a typo in handle_miss_upcalls() function.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Remove useless odp_in_port from subfacet.
Ethan Jackson [Wed, 29 May 2013 23:05:06 +0000 (16:05 -0700)]
ofproto-dpif: Remove useless odp_in_port from subfacet.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoImplement duration fields in OpenFlow 1.3 port stats.
Ben Pfaff [Thu, 30 May 2013 19:49:59 +0000 (12:49 -0700)]
Implement duration fields in OpenFlow 1.3 port stats.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Consolidate facet stat logic.
Ethan Jackson [Wed, 29 May 2013 19:38:48 +0000 (12:38 -0700)]
ofproto-dpif: Consolidate facet stat logic.

The logic for updating statistics at the facet level had been
spread through ofproto-dpif in a rather confusing manner.  This
patch consolidates as much of this logic as is reasonable into
facet_push_stats().

On a side note, I'd expect this patch to have a marginal positive
performance impact when using learning (though I haven't bothered
to measure it).  It combines facet_learn() and facet_push_stats()
into one step allowing us to avoid a redundant xlate_actions().

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Fix facet_lookup_valid().
Ethan Jackson [Wed, 29 May 2013 23:19:20 +0000 (16:19 -0700)]
ofproto-dpif: Fix facet_lookup_valid().

facet_lookup_valid() attempted to re-revalidate its facet after
it had been removed.  Added very recently in commit 5bf64ad
(ofproto-dpif: Avoid redundant facet_find() in
facet_lookup_valid()).

Found by inspection (by Justin).

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Don't count misses in OpenFlow table stats.
Jesse Gross [Sat, 25 May 2013 00:01:34 +0000 (17:01 -0700)]
ofproto-dpif: Don't count misses in OpenFlow table stats.

Originally no rule existed for packets that did not match an
OpenFlow flow and therefore every packet with a rule could be
counted as a hit. However, newer versions of OVS have hidden
miss rules so this is no longer true. To return the correct
table stats, this subtracts packets that hit the miss rule
from the total and removes the separate counter.

Reported-by: love you <thunder.love07@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agodebian: Don't fail ovs-controller restart if daemon not running.
Gurucharan Shetty [Wed, 29 May 2013 00:18:12 +0000 (17:18 -0700)]
debian: Don't fail ovs-controller restart if daemon not running.

Reported-by: Maxime Brun <m.brun@alphalink.fr>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoofproto-dpif: Revamp xlate_actions() interface.
Ethan Jackson [Mon, 13 May 2013 18:18:21 +0000 (11:18 -0700)]
ofproto-dpif: Revamp xlate_actions() interface.

This patch implements a new interface to xlate_actions which, aside
from being simpler and more intuitive, achieves several goals.  It
pulls all of xlate_actions() results into a single structure which
will be easier to cache and pass around in future.  And it shields
xlate_ctx from the rest of the code, making it possible to factor
xlate_actions() in the future (hopefully).

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Rename action_xlate_ctx.
Ethan Jackson [Mon, 13 May 2013 22:31:31 +0000 (15:31 -0700)]
ofproto-dpif: Rename action_xlate_ctx.

This patch changes the name of action_xlate_ctx to xlate_ctx. Aside
from being a bit snappier, it fits more cleanly with structures
added in future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Move odp_actions from subfacet to facet.
Ethan Jackson [Sat, 16 Mar 2013 01:03:59 +0000 (18:03 -0700)]
ofproto-dpif: Move odp_actions from subfacet to facet.

Upon close inspection, it appears that it's not possible for
actions to differ between subfacets belonging to a given facet.
Given this fact, it makes sense to move datapath actions from
subfacets to their parent facets.  It's both conceptually more
straightforward, and necessary for future threading and megaflow
work.

Co-authored-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoodp-util: Make slow_path_reasons mutually exclusive.
Ethan Jackson [Tue, 28 May 2013 18:43:43 +0000 (11:43 -0700)]
odp-util: Make slow_path_reasons mutually exclusive.

It's no longer possible for a single datapath flow to be slow
pathed for two different reasons.  This patch updates the code to
reflect this fact (marginally simplifying it).

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto: Ditch SLOW_IN_BAND slow path reason.
Ethan Jackson [Thu, 23 May 2013 23:01:20 +0000 (16:01 -0700)]
ofproto: Ditch SLOW_IN_BAND slow path reason.

Before this patch, when in band control was enabled, every DHCP
packet had to be sent to userspace to calculate it's actions.
Those DHCP packets intended for the local port would have a special
action added to ensure they actually make it there.  This
unnecessarily complicates the code, so this patch takes a slightly
different approach.  When in-band is enabled, *all* DHCP packets
must be sent to the local port.  This guarantees that
xlate_actions() returns the same result every time for a given
flow.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Ditch SLOW_MATCH slow path reason.
Ethan Jackson [Fri, 17 May 2013 20:39:03 +0000 (13:39 -0700)]
ofproto-dpif: Ditch SLOW_MATCH slow path reason.

Before this patch, datapath keys with ODP_FIT_TO_LITTLE, would be
assigned subfacets and installed in the kernel with a SLOW_MATCH
slow path reason.  This is problematic, because these flow keys
can't be reliable converted into a 'struct flow' thus breaking a
fundamental assumption of ofproto-dpif.  This patch circumvents the
issue by skipping facet creation for these flows altogether.  This
approach has the added benefit of simplifying the code for future
patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofpbuf: New helper ofpbuf_equal().
Ethan Jackson [Tue, 19 Mar 2013 21:46:12 +0000 (14:46 -0700)]
ofpbuf: New helper ofpbuf_equal().

Used in future commits.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Avoid redundant facet_find() in facet_lookup_valid().
Ethan Jackson [Tue, 28 May 2013 20:29:50 +0000 (13:29 -0700)]
ofproto-dpif: Avoid redundant facet_find() in facet_lookup_valid().

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: handle_flow_miss_common() without facets.
Ethan Jackson [Wed, 29 May 2013 17:20:23 +0000 (10:20 -0700)]
ofproto-dpif: handle_flow_miss_common() without facets.

handle_flow_miss_common() is intended to be called whether or not a
miss needs a facet.  Found by inspection.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoodp-execute: New module for executing datapath actions.
Simon Horman [Wed, 29 May 2013 06:06:38 +0000 (15:06 +0900)]
odp-execute: New module for executing datapath actions.

This moves generic action execution code out of lib/dpif-netedev.c
and into a new file, lib/odp-execute.c.

This is in preparation for using odp_execute_actions()
in lib/odp-util.c to handle recirculation/

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agotests: Add support for running OFTest.
Ben Pfaff [Tue, 28 May 2013 18:44:21 +0000 (11:44 -0700)]
tests: Add support for running OFTest.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-dummy: Add "pstream" option for connecting a dummy to a process.
Ben Pfaff [Thu, 25 Oct 2012 23:54:23 +0000 (16:54 -0700)]
netdev-dummy: Add "pstream" option for connecting a dummy to a process.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-dummy: Drop "nobody listened" reply from netdev-dummy/receive.
Ben Pfaff [Tue, 28 May 2013 18:23:29 +0000 (11:23 -0700)]
netdev-dummy: Drop "nobody listened" reply from netdev-dummy/receive.

Ethan pointed out that this wasn't very useful.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-dummy: Factor some netdev_dummy_receive() code out into new function.
Ben Pfaff [Fri, 10 Aug 2012 22:21:58 +0000 (15:21 -0700)]
netdev-dummy: Factor some netdev_dummy_receive() code out into new function.

An upcoming patch will add another user.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-dummy: Limit receive queue length to 100 packets.
Ben Pfaff [Thu, 16 Aug 2012 23:37:32 +0000 (16:37 -0700)]
netdev-dummy: Limit receive queue length to 100 packets.

It doesn't seem like a good idea to allow the queue length to grow without
bound, even for a test-only device.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoBFD: Reconfigure BFD on port deletion.
Pavithra Ramesh [Tue, 28 May 2013 19:35:06 +0000 (12:35 -0700)]
BFD: Reconfigure BFD on port deletion.

Invoke the function to reconfigure BFD when a port/interface
is deleted.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoLISP: update documentation for "null" ports
Lorand Jakab [Mon, 27 May 2013 11:54:54 +0000 (04:54 -0700)]
LISP: update documentation for "null" ports

Since commit 0ad90c8 it is possible to set tunnel destination IP address
in the flow.  This allows creating a LISP "map-cache" in the flow table.
Update the LISP documentation to reflect these possibilities.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-vswitchd: Fix typo in manpage.
Ben Pfaff [Tue, 28 May 2013 16:15:00 +0000 (09:15 -0700)]
ovs-vswitchd: Fix typo in manpage.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoOVS: update INSTALL.KVM
Zhi Yong Wu [Tue, 28 May 2013 07:50:25 +0000 (15:50 +0800)]
OVS: update INSTALL.KVM

    When i played with OVS again today, i found that the argument
of "ovs-dpctl show" is not correct, so INSTALL.KVM need to be
updated accordingly.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoDocument OVS packet buffering, to satisfy an OpenFlow 1.2+ requirement.
Ben Pfaff [Thu, 23 May 2013 22:49:48 +0000 (15:49 -0700)]
Document OVS packet buffering, to satisfy an OpenFlow 1.2+ requirement.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoOPENFLOW-1.1+: OFPCML_NO_BUFFER is effectively already implemented.
Ben Pfaff [Thu, 23 May 2013 23:07:43 +0000 (16:07 -0700)]
OPENFLOW-1.1+: OFPCML_NO_BUFFER is effectively already implemented.

OpenFlow 1.2 and later define a value of 65535 (OFPCML_NO_BUFFER) for
the max_len field in an output action to mean that the switch should send
the entire packet without buffering it.  Open vSwitch never buffers packets
sent via an output action, so it trivially satisfies this requirement.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-vswitchd: Update documentation of MAC table limits.
Ben Pfaff [Thu, 23 May 2013 22:35:16 +0000 (15:35 -0700)]
ovs-vswitchd: Update documentation of MAC table limits.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-bsd: Silence warnings on unimplemented platform.
Ed Maste [Fri, 24 May 2013 12:33:51 +0000 (08:33 -0400)]
netdev-bsd: Silence warnings on unimplemented platform.

netdev_bsd_get_next_hop currently lacks an implementation on FreeBSD, so
its arguments are unused; mark them so.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-xapi-sync: Handle exceptions from XAPI for get_single_bridge_id.
Gurucharan Shetty [Thu, 23 May 2013 23:14:19 +0000 (16:14 -0700)]
ovs-xapi-sync: Handle exceptions from XAPI for get_single_bridge_id.

There are possibilities when records disappear underneath ovs-xapi-sync.
In this particular case, when VLAN network was deleted, the corresponding
record in bridge's external_ids:xs_network_ids column was not deleted by
xenserver.  In situations like that handle the exceptions cleanly.

Bug #17390.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agodpif-netdev: Move decoding of data out of dp_netdev_output_userspace()
Simon Horman [Wed, 22 May 2013 07:08:06 +0000 (16:08 +0900)]
dpif-netdev: Move decoding of data out of dp_netdev_output_userspace()

This is in preparation for making dp_netdev_action_userspace()
more generic and passing dp_netdev_output_userspace() as a callback.
In this case it makes sense to decode userdata in generic code.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif-netdev: Constify key parameter of dp_netdev_action_userspace()
Simon Horman [Wed, 22 May 2013 07:08:05 +0000 (16:08 +0900)]
dpif-netdev: Constify key parameter of dp_netdev_action_userspace()

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-errors: Add missing copyright and license notice.
Ben Pfaff [Tue, 23 Apr 2013 04:47:18 +0000 (21:47 -0700)]
ofp-errors: Add missing copyright and license notice.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-bsd: Correct pointer use after refactoring.
Ed Maste [Thu, 23 May 2013 14:16:16 +0000 (10:16 -0400)]
netdev-bsd: Correct pointer use after refactoring.

Introduced in commit 666afb55e84e9118812de81a75655ec9567b7a5b.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoconfigure: Add if_mib.h prerequisites.
Ed Maste [Thu, 23 May 2013 14:00:57 +0000 (10:00 -0400)]
configure: Add if_mib.h prerequisites.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoINSTALL: update for NetBSD
YAMAMOTO Takashi [Tue, 21 May 2013 08:50:05 +0000 (17:50 +0900)]
INSTALL: update for NetBSD

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agofactor out a function to extract stats from if_data to netdev_stats.
YAMAMOTO Takashi [Tue, 21 May 2013 08:50:03 +0000 (17:50 +0900)]
factor out a function to extract stats from if_data to netdev_stats.

suggested by Ed Maste.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoimplement get_next_hop for NetBSD
YAMAMOTO Takashi [Tue, 21 May 2013 08:50:01 +0000 (17:50 +0900)]
implement get_next_hop for NetBSD

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agosome NetBSD related documentation changes
YAMAMOTO Takashi [Tue, 21 May 2013 08:50:00 +0000 (17:50 +0900)]
some NetBSD related documentation changes

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoimplement get_stats for NetBSD
YAMAMOTO Takashi [Tue, 21 May 2013 08:49:59 +0000 (17:49 +0900)]
implement get_stats for NetBSD

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoimplement set_etheraddr for NetBSD
YAMAMOTO Takashi [Thu, 23 May 2013 03:56:47 +0000 (20:56 -0700)]
implement set_etheraddr for NetBSD

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
10 years agomissing ifdef netbsd guard for af_link_sock
YAMAMOTO Takashi [Tue, 21 May 2013 08:49:57 +0000 (17:49 +0900)]
missing ifdef netbsd guard for af_link_sock

pointed out by Ed Maste

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-bsd: NetBSD: keep a AF_LINK socket open
YAMAMOTO Takashi [Tue, 21 May 2013 08:49:56 +0000 (17:49 +0900)]
netdev-bsd: NetBSD: keep a AF_LINK socket open

this will be used for get_stats and set_etheraddr

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agokeep "kernel name" for each netdev
YAMAMOTO Takashi [Tue, 21 May 2013 08:49:55 +0000 (17:49 +0900)]
keep "kernel name" for each netdev

where interface renaming is not supported (NetBSD), remember both of
our netdev name and the correspoinding kernel name separately.
the latter is necessary to talk with kernel using interface names.
eg. ifioctls, bpf

XXX there should be a proper way to query kernel name.
Ben Pfaff suggested ovs-appctl but this patch doesn't implement it. (yet)

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoadd minimal NetBSD support
YAMAMOTO Takashi [Tue, 21 May 2013 08:49:54 +0000 (17:49 +0900)]
add minimal NetBSD support

mostly ride on the existing FreeBSD support.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agocfm: Implement "demand mode".
Ethan Jackson [Wed, 15 May 2013 21:31:06 +0000 (14:31 -0700)]
cfm: Implement "demand mode".

The new CFM "demand mode" (named after BFD's demand mode) uses
data traffic to indicate interface liveness.  It's helpful on
heavily congested networks where CCMs may be dropped.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agonetdev: New function netdev_ref().
Ben Pfaff [Tue, 21 May 2013 22:42:44 +0000 (15:42 -0700)]
netdev: New function netdev_ref().

I suspect that this makes it easier to make sure that a netdev stays open
as long as needed in some cases where a module needs access to a netdev
opened by some higher-level module.

CC: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agotests/ofproto-dpif.at: Add tests for the ofproto/trace command
Alex Wang [Mon, 20 May 2013 18:17:51 +0000 (11:17 -0700)]
tests/ofproto-dpif.at: Add tests for the ofproto/trace command

Two testcases are added to the testsuite, which test the new
command syntax and the corresponding corner cases.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto/ofproto-dpif.c: Re-implement the ofproto/trace command
Alex Wang [Mon, 20 May 2013 18:36:05 +0000 (11:36 -0700)]
ofproto/ofproto-dpif.c: Re-implement the ofproto/trace command

Since the use of single datapath, all bridges belonging to the same type of
datapath will use the same (single) datapath. This causes confusion in the
current 'ofproto/trace' command. Especially, when given the unrelated
'bridge' and 'in_port' combination, the current implementation will still
be able to process and give misleading output. Thusly, this patch changes
the 'ofproto/trace' command syntax to formats shown as follow.

ofproto/trace [datapath] odp_flow [-generate|packet]
ofproto/trace bridge br_flow [-generate|packet]

Also, this patch updates the tests and the manpages accordingly.

Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Don't configure BFD on missing ofports.
Ethan Jackson [Tue, 21 May 2013 02:07:12 +0000 (19:07 -0700)]
ofproto-dpif: Don't configure BFD on missing ofports.

This was causing ovs-vswitchd to core occasionally, even when BFD
wasn't turned on.

Bug #17162.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agotestsuite: update a comment
YAMAMOTO Takashi [Tue, 21 May 2013 08:50:04 +0000 (17:50 +0900)]
testsuite: update a comment

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoacinclude.m4: update a comment for NetBSD support
YAMAMOTO Takashi [Tue, 21 May 2013 08:50:02 +0000 (17:50 +0900)]
acinclude.m4: update a comment for NetBSD support

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodon't forget to define HAVE_BACKTRACE
YAMAMOTO Takashi [Tue, 21 May 2013 08:49:53 +0000 (17:49 +0900)]
don't forget to define HAVE_BACKTRACE

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-util: Make ofputil_port_from_ofp11() return OFPP_NONE on error.
Ben Pfaff [Mon, 20 May 2013 19:21:51 +0000 (12:21 -0700)]
ofp-util: Make ofputil_port_from_ofp11() return OFPP_NONE on error.

This makes life easier for a few callers, and it agrees with my usual
preference that a function should fill in its output parameters whether it
succeeds or not.

CC: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agometa-flow: Add MFF_IN_PORT_OXM, a 32-bit in_port.
Jarno Rajahalme [Sun, 19 May 2013 12:44:53 +0000 (15:44 +0300)]
meta-flow: Add MFF_IN_PORT_OXM, a 32-bit in_port.

This helps get rid of one special case in nx_pull_raw() and allows
loading of 32-bit values from/to OXM_OF_IN_PORT in NXAST_LEARN actions.
Previously the 16-bit limit acted the same on both NXM_OF_IN_PORT and
OXM_OF_IN_PORT, even though OF1.1+ controllers would expect OXM_OF_IN_PORT
to be 32 bits wide.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto/ofproto-dpif.c: Fix a typo in function header
Alex Wang [Sun, 19 May 2013 04:33:25 +0000 (21:33 -0700)]
ofproto/ofproto-dpif.c: Fix a typo in function header

There is a typo in the "bundle_add_port()" function header.

This patch fixes it.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-xapi-sync: Handle multiple xs-network-uuids for xs 6.1.
Gurucharan Shetty [Sun, 19 May 2013 07:05:09 +0000 (00:05 -0700)]
ovs-xapi-sync: Handle multiple xs-network-uuids for xs 6.1.

For xenservers with version less than 6.1, interface reconfiguration
happened through interface-reconfigure scripts in this repo. In cases
where there were multiple xs-network-uuids for a single bridge,
interface-reconfigure script would add the network uuid associated
with the non-VLAN network as the first record. ovs-xapi-sync would
just blindly use the first record to create the bridge-id

But it looks like for xenserver 6.1, interface-reconfigure script
is no longer used and xenserver natively writes the xs-network-uuids.
So, in ovs-xapi-sync we no longer can copy the first value in
xs-network-uuids as bridge-id. This commit fetches the PIF record
for each xs-network-uuids and the network that does not have a VLAN
associated with it is copied over to bridge-id.

Bug #17090.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agonetdev-dummy: Remove FreeBSD dependency.
Ben Pfaff [Sat, 18 May 2013 15:27:20 +0000 (08:27 -0700)]
netdev-dummy: Remove FreeBSD dependency.

There's no particular reason that netdev_dummy_register() has to care about
the particular OS, except that the tests like to use the special Linux-only
tunnel vport types.  But that can be done better, I think, by just always
registering them from netdev_dummy_register() and making that function
idempotent, so that calling it twice under Linux has no additional effect.
This commit implements that solution.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ed Maste <emaste@freebsd.org>
10 years agoAllow hexdump of packet data of PACKET_{IN, OUT} messages
Simon Horman [Fri, 17 May 2013 05:14:14 +0000 (14:14 +0900)]
Allow hexdump of packet data of PACKET_{IN, OUT} messages

If verbosity parameter of ofp_print_packet_{in,out}() is greater than 2
then when formatting packet data include a hex dump as well as the output
of ofp_packet_to_string(), which is already included if verbosity is
greater than 0.

This feature may be accesed in serveral ways including:

* Including the -m parameter in an invoocation of ovs-ofctl monitor.
* Including a verbosity greater than 2 in an invocation of
  ovs-ofctl ofp-print.

This patch includes tests to exercise this feature using ovs-ofctl ofp-print.

The motivation of this is to allow tests to be written that use ovs-ofctl
-m monitor to check packet data which is not output by
ofp_packet_to_string(). Specifically, as the protocol of the inner-packet
is not known by ofp_packet_to_string() it only decodes and stringifies an
MPLS packet up to and including the first MPLS label stack entry. However
it may be useful to create tests which verify the contents of the inner
packet.

One example may be verify the effect of dec_ttl in the following sequence
of actions applied to a packet with a single MPLS label stack entry.

pop_mpls(0x800),dec_ttl,push_mpls(0x8847)

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-print: ofp_packet_to_string() Do not emit extra trailing newline
Simon Horman [Fri, 17 May 2013 05:14:13 +0000 (14:14 +0900)]
ofp-print: ofp_packet_to_string() Do not emit extra trailing newline

The string produced by ofp_packet_to_string() includes a trailing
newline, so in the case where packet data is formatted by
ofp_print_packet_out() there is already a newline present.

This patch updates ofp_print_packet_out() so that it does not
add a second newline in this case.

It is not necessary to update the case where there is packet data
to ensure that the result it is terminated by a "\n" as the higher-level
ofp_to_string() function will ensure that the result is "\n" terminated.

The test-suite has be updated to exercise output of packet data by
ofp_packet_to_string()

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agobridge: Fix use of wild pointer in iface_do_create().
Ben Pfaff [Fri, 17 May 2013 05:37:53 +0000 (22:37 -0700)]
bridge: Fix use of wild pointer in iface_do_create().

'netdev' was not initialized at this point in the function, so the cleanup
at the error label referenced a wild pointer.

Introduced in commit 94a538422d4b (netdev: Prevent using reserved names).

CC: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agolib/mac-learning.h: Change one variable's type and name
Alex Wang [Thu, 16 May 2013 22:17:10 +0000 (15:17 -0700)]
lib/mac-learning.h: Change one variable's type and name

This commit changes variable "int i" of "union port" of "struct mac_entry"
to "uint16_t ofp_port", since it is used to store the OpenFlow port number.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev: Prevent using reserved names
Alex Wang [Thu, 16 May 2013 21:11:51 +0000 (14:11 -0700)]
netdev: Prevent using reserved names

This commit adds a function to lib/netdev.c to check that the interface name
is not the same as any of the registered vport providers' dpif_port name
(e.g. gre_system) or the datapath's internal port name (e.g. ovs-system).

Bug #15077.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoDo not include trailing whitespace in hexdump.
Ben Pfaff [Thu, 16 May 2013 05:36:04 +0000 (22:36 -0700)]
Do not include trailing whitespace in hexdump.

Reported-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
10 years agodynamic-string: Fix style of ds_put_hex_dump().
Ben Pfaff [Thu, 16 May 2013 05:33:11 +0000 (22:33 -0700)]
dynamic-string: Fix style of ds_put_hex_dump().

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
Tested-by: Simon Horman <horms@verge.net.au>
10 years agotests/ovs-vsctl.at: Delete trailing white spaces
Alex Wang [Wed, 15 May 2013 21:33:04 +0000 (14:33 -0700)]
tests/ovs-vsctl.at: Delete trailing white spaces

Found out there are some trailing white spaces. This patch fixes it.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-linux: Skip NETDEV_UP test in netdev_linux_set_etheraddr() for taps.
Ben Pfaff [Mon, 13 May 2013 23:39:26 +0000 (16:39 -0700)]
netdev-linux: Skip NETDEV_UP test in netdev_linux_set_etheraddr() for taps.

netdev_turn_flags_off() does nothing if the flags that one turns off are
already off.

Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agodatapath: Fix compilation with Linux kernel 3.7.
Pravin B Shelar [Mon, 13 May 2013 22:53:06 +0000 (15:53 -0700)]
datapath: Fix compilation with Linux kernel 3.7.

Definition of __sum16 and __wsum is moved to uapi header.
Following patch adds check in config script for second possible
header.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
10 years agoofproto-dpif: Make fin_timeout work when governor kicks in.
Ben Pfaff [Sun, 12 May 2013 21:53:51 +0000 (14:53 -0700)]
ofproto-dpif: Make fin_timeout work when governor kicks in.

The xlate_actions() call in handle_flow_miss_without_facet() didn't
implement fin_timeout properly because tcp_flags wasn't getting set.

I have not tested that this fixes the problem, but it seems "obviously
correct".

Bug #16506.
Reported-by: Ying Chen <yingchen@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agodatapath: Check for positive packet length in vport_send().
Jesse Gross [Mon, 13 May 2013 15:27:21 +0000 (08:27 -0700)]
datapath: Check for positive packet length in vport_send().

When sending a packet, a positive length indicates success and a
negative length indicates failure. However, the check for success
looked for non-zero values which catches both of these cases. This
can result in incorrect stats and leak memory on failure.

Introduced by commit be7cd27e44258bdb3c4e7dd8fd7389b5db56d55a (datapath:
Unify vport error stats handling.).

CC: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agonetdev: Get rid of netdev_dev.
Ben Pfaff [Fri, 15 Mar 2013 22:54:36 +0000 (15:54 -0700)]
netdev: Get rid of netdev_dev.

The distinction between struct netdev_dev and struct netdev has always
been confusing.  Now that previous commits have eliminated all interesting
state from struct netdev, this commit deletes it and renames struct
netdev_dev to take its place.  Now the situation makes much more sense and
I won't have to continue making embarrassed explanations in the future.

Good riddance.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoRename superclass members to 'up'.
Ben Pfaff [Fri, 8 Mar 2013 23:09:42 +0000 (15:09 -0800)]
Rename superclass members to 'up'.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agonetdev: Add new "struct netdev_rx" for capturing packets from a netdev.
Ben Pfaff [Fri, 10 May 2013 21:39:19 +0000 (14:39 -0700)]
netdev: Add new "struct netdev_rx" for capturing packets from a netdev.

Separating packet capture from "struct netdev" means that there is no
remaining per-"struct netdev" state, which will allow us to get rid of
"struct netdev_dev" (by renaming it "struct netdev").

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agometa-flow: Simplify mf_from_ofp_port_string()
Jarno Rajahalme [Fri, 10 May 2013 19:54:35 +0000 (22:54 +0300)]
meta-flow: Simplify mf_from_ofp_port_string()

ofputil_port_from_string() does all the work already.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agonetdev-bsd: Adjust argument line wrapping
Ed Maste [Fri, 10 May 2013 20:23:03 +0000 (16:23 -0400)]
netdev-bsd: Adjust argument line wrapping

This file presumably started out life as a copy of netdev-linux.c, and
some indentation was not updated after s/linux/bsd/.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agonetdev: Factor restoring flags into new "struct netdev_saved_flags".
Ben Pfaff [Fri, 10 May 2013 15:55:25 +0000 (08:55 -0700)]
netdev: Factor restoring flags into new "struct netdev_saved_flags".

This gets rid of the only per-instance data in "struct netdev", which
will make it possible to merge "struct netdev_dev" into "struct netdev" in
a later commit.

Ed Maste wrote the netdev-bsd changes in this commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Co-authored-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ed Maste <emaste@freebsd.org>
Tested-by: Ed Maste <emaste@freebsd.org>
11 years agoOpenFlow-level flow-based tunneling support.
Jarno Rajahalme [Thu, 9 May 2013 12:24:16 +0000 (15:24 +0300)]
OpenFlow-level flow-based tunneling support.

Adds tun_src and tun_dst match and set capabilities via new NXM fields
NXM_NX_TUN_IPV4_SRC and NXM_NX_TUN_IPV4_DST.  This allows management of
large number of tunnels via the flow tables, without requiring the tunnels
to be pre-configured.

Flow-based tunnels can be configured with options remote_ip=flow and
local_ip=flow.  local_ip=flow requires remote_ip=flow.  When set, the
tunnel remote IP address and/or local IP address is set from the flow,
instead of the tunnel configuration.

Example:

$ ovs-vsctl add-port br0 gre -- set Interface gre ofport_request=1 type=gre options:remote_ip=flow options:key=flow
$ ovs-ofctl add-flow br0 "in_port=LOCAL actions=set_tunnel:1,set_field:192.168.0.1->tun_dst,output:1"
$ ovs-ofctl add-flow br0 "in_port=1 tun_src=192.168.0.1 tun_id=1 actions=LOCAL"

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoUse updated dl_type when checking actions that use fields
Simon Horman [Fri, 10 May 2013 02:00:06 +0000 (11:00 +0900)]
Use updated dl_type when checking actions that use fields

Update handling of the following actions to use the dl_type set by MPLS
push and pop actions if it differs from the original dl_type. This is
consistent with the existing checking of load actions and allows
their existing checks to enforce dl_type pre-requisites correctly.

output_reg
bundle
reg_move
stack_push
stack_pop
learn
multipath

In order to avoid the verbosity of updating the flow for each applicable
action the update is treated as a common case and performed in
ofpact_check().  This was suggested by Jesse Gross.

Cc: Jesse Gross <jesse@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoofpbuf: Fix small typo.
Justin Pettit [Thu, 2 May 2013 01:22:41 +0000 (18:22 -0700)]
ofpbuf: Fix small typo.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoINSTALL: Finish sentence about running tests with valgrind.
Justin Pettit [Wed, 8 May 2013 16:13:34 +0000 (09:13 -0700)]
INSTALL: Finish sentence about running tests with valgrind.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoflow: Fix IPv6 fragment packet handling
Takashi Kawaguchi [Thu, 9 May 2013 17:39:34 +0000 (02:39 +0900)]
flow: Fix IPv6 fragment packet handling

IPv6 fragmented packet (except first fragment) will not be handled
correctly. When extracting packet at parse_ipv6(), although nw_frag
should have both of FLOW_NW_FRAG_ANY and FLOW_NW_FRAG_LATER for
later fragment, only FLOW_NW_FRAG_LATER is set.

Signed-off-by: Takashi Kawaguchi <kawaguchi-takashi@mxd.nes.nec.co.jp>
Signed-off-by: Ken Ajiro <ajiro@mxw.nes.nec.co.jp>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoofproto-dpif: Update 'facet->rule' stats in facet_push_stats().
Ethan Jackson [Thu, 2 May 2013 22:39:06 +0000 (15:39 -0700)]
ofproto-dpif: Update 'facet->rule' stats in facet_push_stats().

Before this patch, stats for 'facet->rule' were handled differently
than stats which 'facet' resubmitted into.  The former were
maintained in 'facet' until it was destroyed, while the latter were
pushed regularly in facet_push_stats().

This inconsistent behavior was not only confusing, it was often
incorrect.  In some circumstances, if a facet changed rules, it
could carry the statistics from the entirety of its lifetime from
the old rule to the new one.  This patch remedies the issue by
handling all rule stats in facet_push_stats().

Reported-by: Tmusic <Tmusic987@gmail.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Simplify send_packet().
Ethan Jackson [Wed, 8 May 2013 22:21:24 +0000 (15:21 -0700)]
ofproto-dpif: Simplify send_packet().

Before this patch, send_packet() manually constructed the required
datapath output actions.  This worked fine when these actions were
simple, however as outputting to tunnels and patch ports became
more complex, this required quite a bit of complex duplicated code.
This patch solves the problem by running through the standard
xlate_actions() code path instead.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Remove ofproto_update_local_port_stats().
Ethan Jackson [Wed, 8 May 2013 22:30:17 +0000 (15:30 -0700)]
ofproto-dpif: Remove ofproto_update_local_port_stats().

It's a bit odd, and not particularly useful.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Simplify ofproto_receive().
Ben Pfaff [Wed, 8 May 2013 20:19:39 +0000 (13:19 -0700)]
ofproto-dpif: Simplify ofproto_receive().

The tunnel and non-tunnel paths were pretty much the same anyway, so this
commit simplifies by merging them.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agotunnel: Make tnl_port_receive() parameter 'const'.
Ben Pfaff [Wed, 8 May 2013 20:21:11 +0000 (13:21 -0700)]
tunnel: Make tnl_port_receive() parameter 'const'.

This function no longer has much need to modify its argument, because the
caller can now easily do the modification itself, so this commit makes
that change.

Signed-off-by: Ben Pfaff <blp@nicira.com>