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

85 Commits

Author SHA1 Message Date
Ben Pfaff
6d9e6eb44f netdev: Make netdev arguments fetchable, and implement for netdev-vport.
This gives network device implementations the opportunity to fetch an
existing device's configuration and store it as their arguments, so that
netdev clients can find out how an existing device is configured.

So far netdev-vport is the only implementation that needs to use this.

The next commit will add use by clients.

Reviewed by Justin Pettit.
2011-01-27 21:08:36 -08:00
Ben Pfaff
9d77f19064 netdev: Use shash and smap functions instead of inlined substitutes.
This simplifies the code and makes it easier to extend in upcoming commits.

Reviewed by Justin Pettit.
2011-01-27 09:26:06 -08:00
Andrew Evans
6f2f5cce6c netdev: Make 'netdev' parameter of 'get_features()' const.
Implementations shouldn't need to modify it.
2011-01-17 17:44:07 -08:00
Ethan Jackson
6333182946 vswitchd: Add miimon support.
This commit allows users to check link status in bonded ports using
MII instead of carrier.
2011-01-12 15:50:20 -08:00
Ethan Jackson
ea763e0e28 bridge: Move tunnel_egress_iface to status column.
This commit removes the tunnel_egress_iface column from the
interface table and moves it's data to the status column.  In the
process it reverts the database to version 1.0.0.
2011-01-11 12:33:44 -08:00
Ethan Jackson
ea83a2fcd0 lib: Show tunnel egress interface in ovsdb
This commit parses rtnetlink address notifications from the
kernel in order to display the egress interface of tunnels in the
database.

Bug #4103.
2011-01-04 12:35:59 -08:00
Ben Pfaff
c3827f619a datapath: Make adding and attaching a vport a single step.
For some time now, Open vSwitch datapaths have internally made a
distinction between adding a vport and attaching it to a datapath.  Adding
a vport just means to create it, as an entity detached from any datapath.
Attaching it gives it a port number and a datapath.  Similarly, a vport
could be detached and deleted separately.

After some study, I think I understand why this distinction exists.  It is
because ovs-vswitchd tries to open all the datapath ports before it tries
to create them.  However, changing it to create them before it tries to
open them is not difficult, so this commit does this.

The bulk of this commit, however, changes the datapath interface to one
that always creates a vport and attaches it to a datapath in a single step,
and similarly detaches a vport and deletes it in a single step.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2010-12-03 14:41:38 -08:00
Jesse Gross
85da620e97 netdev: Fix carrier status for down interfaces.
Currently netdev_get_carrier() returns both a carrier status and
an error code.  However, usage of the error code was inconsistent:
most callers either ignored it or didn't perform their task if an
error occured, which prevented bond rebalancing.  This makes the
handling consistent by translating an error into a down status in
the netdev library.

Bug #3959
2010-10-28 11:19:29 -07:00
Ben Pfaff
2b9d658984 netdev-vport: Merge in netdev-patch and netdev-tunnel.
The only real difference between netdev-patch and netdev-tunnel is in their
parse_config() implementation.  That's a lot of extra code to maintain, for
questionable benefit.  This commit merges them into the netdev-vport code,
which was heretofore merely a collection of helper functions.
2010-10-11 12:40:11 -07:00
Ben Pfaff
b8dcf5e9c5 netdev: Pass class structure, instead of type, to "create" function.
This opens up the possibility of storing private data at a relative offset
to the class structure, instead of having to keep a separate table.
2010-10-06 13:49:07 -07:00
Joe Perches
d295e8e97a treewide: Remove trailing whitespace
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:23:08 -07:00
Jesse Gross
a28716da6f netdev-tunnel: Add CAPWAP userspace interface.
Provide a userspace interface to the CAPWAP UDP transport
tunneling mechanism in the kernel.

Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-24 16:58:00 -04:00
Ben Pfaff
c1c9c9c4b6 Implement QoS framework.
ovs-vswitchd doesn't declare its QoS capabilities in the database yet,
so the controller has to know what they are.  We can add that later.

The linux-htb QoS class has been tested to the extent that I can see that
it sets up the queues I expect when I run "tc qdisc show" and "tc class
show".  I haven't tested that the effects on flows are what we expect them
to be.  I am sure that there will be problems in that area that we will
have to fix.
2010-06-17 15:04:12 -07:00
Jesse Gross
2158888d8d patch: Remove veth driver.
Now that we have a new patch implementation, remove the veth driver
and its userspace components.  Then rename 'patchnew' to 'patch'.
The new implementation is a drop-in replacement for the old one.
2010-05-18 12:57:25 -07:00
Jesse Gross
43694e2a8d netdev: Add 'patch' userspace implementation.
Add a netdev to talk to the 'patch' vport in the kenerl.  Since
there is currently a 'patch' implementation using the veth driver,
this one is temporarily called 'patchnew'.
2010-05-18 12:57:25 -07:00
Ben Pfaff
8722022c0c Update fake bond devices' statistics with the sum of bond slaves' stats.
Needed by XAPI to accurately report bond statistics.

Ugh.

Bug NIC-63.
2010-04-19 11:12:27 -07:00
Jesse Gross
6f643e4946 tunneling: Remove old GRE implementation.
The new GRE implementation provides a complete drop in replacement
for the old Linux based implementation.  Therefore, remove the
old implementation and rename "grenew" to "gre".
2010-04-19 09:11:58 -04:00
Jesse Gross
3fe8053b36 tunneling: Add userspace support for new GRE implementation.
Add a netdev that supports the new datapath GRE implementation.
It currently coexists with the old implementation so it is named
"grenew".
2010-04-19 09:11:58 -04:00
Jesse Gross
4c0f178060 netdev: Allow get_ifindex and get_features to be null.
Allow netdev providers to set get_ifindex and get_features it
null if they would always return EOPNOTSUPP.  This is particuarly
useful for virtual devices.
2010-04-19 09:11:57 -04:00
Jesse Gross
15b3596a41 netdev-linux: Check notifications are for netdev-linux device.
When receiving a change notification from rtnetlink we checked whether
a netdev of that name existed and if so tried to handle it.  This also
checks that the type of the device is one handled by netdev-linux.
2010-04-19 09:11:57 -04:00
Justin Pettit
8aed4223e0 netdev: Add support for "patch" type
This commit introduces a new netdev type called "patch".  A patch is a
pair of interfaces, in which frames sent through one of the devices
pop out of the other.  This is useful for linking together datapaths.

A patch's only argument on creation is "peer", which specifies the other
side of the patch.  A patch must be created in pairs, so a second netdev
must be created with the "name" and "peer" values reversed.

The current implementation is built using veth devices.  Further, it's
limited to the veth devices which support configuration through sysfs.
This limits the ability to use a "patch" on 2.6.18 kernels using the
veth device we include (read: flavors of XenServer 5.5).  In the not too
distant future, the implementation will be modified to use the new
kernel port abstraction introduced by Jesse Gross's forthcoming GRE
work.  At that point, patch devices will work on any Linux platform
supported by OVS.
2010-04-15 03:50:28 -07:00
Ben Pfaff
1ac981803f netdev: Allow recv, recv_wait, drain, send, send_wait to be null.
Suggested by partner.
2010-04-11 09:18:16 -04:00
Justin Pettit
a4af00400a Merge branch 'master' into next
Conflicts:
	COPYING
	datapath/datapath.h
	lib/automake.mk
	lib/dpif-provider.h
	lib/dpif.c
	lib/hmap.h
	lib/netdev-provider.h
	lib/netdev.c
	lib/stream-ssl.h
	ofproto/executer.c
	ofproto/ofproto.c
	ofproto/ofproto.h
	tests/automake.mk
	utilities/ovs-ofctl.c
	utilities/ovs-vsctl.in
	vswitchd/ovs-vswitchd.conf.5.in
	xenserver/etc_init.d_vswitch
	xenserver/etc_xensource_scripts_vif
	xenserver/opt_xensource_libexec_interface-reconfigure
2010-02-05 17:14:55 -08:00
Jesse Gross
77909859b0 netdev: Allow providers to be managed at runtime.
The list of netdev providers was previously staticly defined at
compile time.  This allows new providers to be added and removed
at runtime.
2010-02-01 12:00:49 -05:00
Ben Pfaff
6dfd030442 netdev: Rename "class" members to "netdev_class" for C++ compatibility.
From partner.
2010-01-22 15:14:04 -08:00
Jesse Gross
0f4f4a610a netdev: Compare full arguments instead of hash for reconfigure.
We only reconfigure netdevs if the arguments have changed, which
was previously detected based on a hash.  This stores and compares
the full argument list to avoid any chance of missing changes due
to collisions.
2010-01-18 18:29:26 -05:00
Jesse Gross
46415c9085 netdev-linux: Use the netdev list of devices instead of cachemap.
We previously maintained a list of open devices inside of the
linux netdev.  Since the netdev library now maintains this list,
it is better to use that list instead of our own.
2010-01-18 18:26:44 -05:00
Jesse Gross
149f577a25 netdev: Fully handle netdev lifecycle through refcounting.
This builds on earlier work that implemented netdev object refcounting.
However, rather than requiring explicit create and destroy calls,
these operations are now performed automatically based on the referenece
count.  This is important because in certain situations it is not
possible to know whether a netdev has already been created.  A
workaround existed (which looked fairly similar to this paradigm) but
introduced it's own issues.  This simplifies and unifies the API.
2010-01-15 11:34:34 -05:00
Jesse Gross
a740f0de5b gre: Add userspace GRE support.
This implements the userspace portion of GRE on Linux. It communicates
with the kernel module to setup tunnels using either Netlink or ioctls
as appropriate based on the kernel version.

Significant portions of this commit were actually written by
Justin Pettit.
2009-12-07 12:48:08 -08:00
Justin Pettit
6c88d577e8 netdev: Allow explicit creation of netdev objects
This change adds netdev_create() and netdev_destroy() functions to allow
the creation of network devices through the netdev library.  Previously,
network devices had to already exist or be created on demand through
netdev_open().  This caused problems such as not being able to specify
TAP devices as ports in ovs-vswitchd, which this patch fixes.

This also lays the groundwork for adding GRE and VDE support.
2009-12-01 19:01:01 -08:00
Ben Pfaff
9ab3d9a3c2 netdev: New function netdev_get_ifindex().
sFlow needs the ifindex of an interface, so this commit adds a function
to retrieve it.
2009-11-23 12:25:08 -08:00
Jesse Gross
362424c31e netdev: Fix typo in netdev provider enumerate. 2009-09-30 12:41:47 -07:00
Ben Pfaff
f1acd62b54 Merge citrix branch into master. 2009-09-02 10:14:53 -07:00
Ben Pfaff
559843ed53 rtnetlink: Move into separate source and header file.
Now that rtnetlink isn't named similarly to netdev_linux, it might as well
have its own source and header files to avoid confusing everyone.
2009-07-30 16:07:15 -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