2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 21:07:47 +00:00

124 Commits

Author SHA1 Message Date
Ben Pfaff
b4a7a3f3de Improve comments on interpretation of sFlow sampling probabilities.
Suggested by Justin Pettit.
2010-01-08 16:45:16 -08:00
Ben Pfaff
72b0630028 Initial implementation of sFlow.
Tested very slightly with "ping" and "sflowtool -t | tcpdump -r -".
2010-01-04 13:08:37 -08:00
Ben Pfaff
efacbce62f dpif: New function dpif_create_and_open().
This function combines what dpif_create() and dpif_open() do.  It allows
us to factor a tiny amount of code out of the vswitch, but more importantly
this function is also useful in the following commit.
2009-11-23 15:58:48 -08:00
Justin Pettit
b9b0ce6111 Cleanup incorrect unitialized variable warnings.
The NetBSD compiler warns that these variables may be used unitialized.
They are not, but this commit gets rid of the warnings.
2009-08-25 16:26:36 -07:00
Justin Pettit
d2a345699f dpif: Only clear 'all_dps' argument in dp_enumerate().
Originally, the function dp_enumerate() initialized the 'all_dps'
argument.  This is inconsistent with most other functions that take an
svec argument, which would only clear the contents.  Further, if someone
were not careful when reusing the svec, it could lead to memory leaks.
With this change, the caller is expected to first call svec_init() on
the argument.
2009-08-07 11:16:06 -07:00
Ben Pfaff
8b61709d5e netdev: Implement an abstract interface to network devices.
This new abstraction layer allows multiple implementations of network
devices in a single running process.  This will be useful, for example, to
support network devices that are simulated entirely in the running process
or that communicate with other processes over Unix domain sockets, etc.

The reimplemented tap device support in this commit has not been tested.
2009-07-30 16:07:14 -07:00
Ben Pfaff
d3d22744a7 vswitch: Avoid knowledge of details specific to Linux datapaths.
At startup, the vswitch needs to delete datapaths that are not configured
by the administrator.  Until now this was done by knowing the possible
names of Linux datapaths.  This commit cleans up by allowing each
datapath class to enumerate its existing datapaths and their names.
2009-07-06 11:06:36 -07:00
Ben Pfaff
72865317a4 New implementation of userspace datapath, based on the netdev library. 2009-07-06 09:55:06 -07:00
Ben Pfaff
e9e28be359 Introduce general-purpose ways to wait for dpif and netdev changes.
The dpif and netdev code has had various ways to check for changes to
dpifs and netdevs over the course of Open vSwitch development.  All of
these have been thus far fairly specific to the Linux implementation.  This
commit is the start of a more general API for watching for such changes.
The dpif-related parts seem fairly mature and so they are documented,
the netdev parts will probably need to change somewhat and so they are
not documented yet.
2009-07-06 09:07:24 -07:00
Ben Pfaff
5792c5c64a dpif: Add new functions dp_run() and dp_wait().
The upcoming netdev-based dpif needs a hook where it can process packets
and throw them against the flow table, and this provides a suitable place.
2009-07-06 09:07:24 -07:00
Ben Pfaff
96fba48f52 dpif: Make dpifs abstract, to allow multiple datapath implementations.
This commit initially introduces only a single datapath implementation,
which is the same as the original one, but it paves the way for
additional implementations, such as the upcoming userspace datapath.
2009-07-06 09:07:24 -07:00
Ben Pfaff
f4ba4c4f95 datapath: Change ODP_PORT_LIST semantics.
Until now, ODP_PORT_LIST has reported the number of ports actually copied
out.  It's better for the caller, however, if it reports the number of
ports that were available to be copied out.
2009-07-06 09:07:24 -07:00
Ben Pfaff
f1aa2072c8 datapath: Get rid of query operations for single flows. 2009-07-06 09:07:24 -07:00
Ben Pfaff
9ee3ae3e0d datapath: Make the datapath responsible for choosing port numbers.
Soon we will allow for multiple datapath implementations.  By allowing
the datapath to choose the port numbers, we possibly simplify some datapath
implementations, and the datapath's clients don't have to guess (or to
check) what port numbers are free, so this seems like a better way to go.
2009-07-06 09:07:24 -07:00
Ben Pfaff
8f24562aed dpif: Rename odp_msg related functions for more consistency.
This seems like a more consistent naming scheme, since all of these
functions are related but none of them were named similarly or grouped
together.
2009-07-06 09:07:24 -07:00
Ben Pfaff
bb8a9a2b0e dpif: Change dpif_port_group_get() semantics.
This function is easier for callers to use if they do not have to guess
how many ports are in the group.  Since it's not performance critical at
all, introduce these easier semantics.
2009-07-06 09:07:24 -07:00
Ben Pfaff
f7ef6533d8 dpif: Remove obsolete support for datapaths whose names begin with "nl:".
The use of "nl:" as a prefix for datapath names has been deprecated for
months.  That should be long enough for users to update their scripts.
2009-07-06 09:07:24 -07:00
Ben Pfaff
c228a3649a dpif: Hide the contents of struct dpif.
This helps prepare for multiple dpif implementations, and ensures that
code outside dpif.c does not depend on its internals.
2009-07-06 09:07:23 -07:00
Ben Pfaff
5c6d2a3f3a dpif: Make dpif_port_query_by_name() more useful by logging less on failure.
One potential user of dpif_port_query_by_name() actually open-coded the
function because it didn't want logging on failure.  There was only one
actual caller of the function, which didn't want logging on failure either.
So, clean up by reducing the failure log level to DBG and making the
open-coded version an actual caller.
2009-07-06 09:07:23 -07:00
Ben Pfaff
b29ba12809 dpif: Replace dpif_id() by dpif_name().
dpif_id() is often used in error messages, e.g. "dp%u: screwed up".  But
soon we will be generalizing the concept of a datapath, so it is better
to have a function that returns a full name, e.g. "%s: screwed up".
Accordingly, this commit replaces dpif_id() by a new function dpif_name()
that does so.
2009-07-06 09:07:23 -07:00
Ben Pfaff
53a4218dca dpif: New function dpif_get_netflow_ids().
The 'minor' member of struct dpif is used for two different purposes:
for printing in log messages and for encapsulating in NetFlow messages.
The needs in each case are different, so we should break up these uses.
This commit does half of that, by introducing a new function to retrieve
NetFlow ids and using it where appropriate.
2009-07-06 09:07:23 -07:00
Ben Pfaff
335562c0b9 dpif: Rename dpif_get_name() to dpif_port_get_name(), update interface.
With multiple kinds of datapaths, code should not just use
"dp%u" along with dpif_minor() to print a datapath name, because not all
datapaths can sensibly be named that way.  We want to use a function
with a name like dpif_get_name() to retrieve a datapath name for printing
to the user, in which case the existing dpif_get_name() function would be
confusing.  So rename the existing one to something more explicit.
2009-07-06 09:07:23 -07:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00