[ovs-git] Open vSwitch: netdev: Remove may_create/may_open flags. (master)

dev at openvswitch.org dev at openvswitch.org
Wed Jun 2 01:17:28 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  1e82e503c5358f8dce9eb2105448f0ec894d57bc (commit)
       via  61b999dd6fa3a8942b5002f9392a0068324a80b6 (commit)
       via  92df599cb2bc5b04a5c9da3e7002f4c729ba480c (commit)
      from  b9b0865ac2b92e3aa0db70bccbddb3b943f7ea20 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1e82e503c5358f8dce9eb2105448f0ec894d57bc
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1e82e503c5358f8dce9eb2105448f0ec894d57bc
Author: Jesse Gross <jesse at nicira.com>
		
netdev: Remove may_create/may_open flags.
		
The most recent revision of the netdev library added may_create
and may_open flags to explicitly state the intent of the caller as
to whether the device should already be in use.  This was simply
a sanity check for users of the netdev library and the configuration.
At this point the netdev library and its users are well behaved and
should no longer need to be checked.  Additional checks have also
been added for incorrect configuration that mean the netdev library
is no longer the primary line of defense.

These flags themselves create problems because it is not always
easy for a library to know what the state of devices should be.
This is particularly a problem for ovs-openflowd, which expects
ports to be added by ovs-dpctl.  Fixing this either requires that
the checks are so permissive to be useless or ugly hacks to get
around them.  Since they are no longer needed, just remove the
checks.

This commit restores the previous behavior of ovs-openflowd to
not require that ports be specified on the command line or
cleaned up after use.

Bug #2652

CC: Natasha Gude <natasha at nicira.com>
CC: Jean Tourrilhes <jt at hpl.hp.com>
CC: 蒲彦 <yan.p.bjtu at gmail.com>


commit 61b999dd6fa3a8942b5002f9392a0068324a80b6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=61b999dd6fa3a8942b5002f9392a0068324a80b6
Author: Jesse Gross <jesse at nicira.com>
		
netdev-linux: Give tap FD to first opener.
		
Tap devices can have two FDs that allow transmit and receive from
different perspectives.  We previously would always share one of
the FDs among all openers.  However, this is confusing to some
users (primarily the DHCP client) which expect tap devices to behave
like any other device.  Now we give the tap FD to the first opener,
which knows that it has opened a tap device, and a normal system FD
to everyone else for consistency.


commit 92df599cb2bc5b04a5c9da3e7002f4c729ba480c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=92df599cb2bc5b04a5c9da3e7002f4c729ba480c
Author: Jesse Gross <jesse at nicira.com>
		
netdev-linux: Fix tap device stats.
		
For tap and internal devices we swap the transmit and receive stats
to appear consistent with other devices.  However, the check whether
to store the stats in a temporary location before the swap did not
include tap devices, which lead to the use of uninitialized memory
when the swap occured.


-----------------------------------------------------------------------

Summary of changes:
 lib/dhcp-client.c         |    2 --
 lib/dpif-netdev.c         |    3 ---
 lib/netdev-linux.c        |   44 ++++++++++++++++++++++++--------------------
 lib/netdev.c              |   35 ++++++-----------------------------
 lib/netdev.h              |    2 --
 ofproto/ofproto.c         |    1 -
 utilities/ovs-openflowd.c |    6 ------
 vswitchd/bridge.c         |    4 ----
 8 files changed, 30 insertions(+), 67 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list