[ovs-git] Open vSwitch: dpif-netdev: Implement OVS_ACTION_ATTR_SAMPLE action. (master)

dev at openvswitch.org dev at openvswitch.org
Tue Oct 11 18:09:52 UTC 2011


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  26c6b6cd2b2ead7ea8be58481bd6a4d10dc96897 (commit)
       via  109ee2810ddf3c26d4c32e64208ca2033965d6db (commit)
       via  6d23c6f42206809f985d3fc7d95fca0589522836 (commit)
       via  3ee8a9f0027bbcbc92358048bb6e858eb32fe504 (commit)
      from  2cd2c2ef3d901c4ef1339e3e8459c64508bee167 (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 26c6b6cd2b2ead7ea8be58481bd6a4d10dc96897
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=26c6b6cd2b2ead7ea8be58481bd6a4d10dc96897
Author: Ben Pfaff <blp at nicira.com>
		
dpif-netdev: Implement OVS_ACTION_ATTR_SAMPLE action.
		
OVS_ACTION_ATTR_SAMPLE has never been implemented in dpif-netdev.  This
commit implements it and adds a cast to enum ovs_action_type in the switch
statement that checks the action type, so that GCC complains if we forget
to add a case for a new action type.

I had to assign the return value of nl_attr_type() to a temporary variable,
because "switch ((enum ovs_action_type) nl_attr_type(a))" provoked a GCC
warning that I've never seen before:

../lib/dpif-netdev.c:1260: warning: cast from function call of type 'int'
     to non-matching type 'enum ovs_action_type'


commit 109ee2810ddf3c26d4c32e64208ca2033965d6db
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=109ee2810ddf3c26d4c32e64208ca2033965d6db
Author: Ben Pfaff <blp at nicira.com>
		
dpif-netdev: Simplify code by removing dpif_netdev_validate_actions().
		
dpif_netdev_validate_actions() existed for three reasons.  First, it checked
that the actions were well-formed and valid.  This isn't really necessary,
because the actions are built internally by ofproto-dpif and will always be
well-formed.  (If not, that's a bug in ofproto-dpif.)  Second, it checks
whether the actions will modify (mutate) the data in the packet and reports
that to the caller, which can use it to optimize what it does.  However,
the only caller that used this was dpif_netdev_execute(), which is not a
fast-path (if dpif-netdev can be said to have a fast path at all).

Third, dpif_netdev_validate_actions() rejects certain actions that
dpif-netdev does not implement: OVS_ACTION_ATTR_SET_TUNNEL,
OVS_ACTION_ATTR_SET_PRIORITY, and OVS_ACTION_ATTR_POP_PRIORITY.  However,
this doesn't really seem necessary to me.  First, dpif-netdev can't support
tunnels in any case, so OVS_ACTION_ATTR_SET_TUNNEL shouldn't come up.
Second, the priority actions just aren't important enough to worry about;
they only affect QoS, which isn't really important with dpif-netdev since
it's going to be slow anyway.

So this commit just drops dpif_netdev_validate_actions() entirely.


commit 6d23c6f42206809f985d3fc7d95fca0589522836
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6d23c6f42206809f985d3fc7d95fca0589522836
Author: Ben Pfaff <blp at nicira.com>
		
netlink: New macros NL_NESTED_FOR_EACH, NL_NESTED_FOR_EACH_UNSAFE.
		
Upcoming commits will introduce more users.


commit 3ee8a9f0027bbcbc92358048bb6e858eb32fe504
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3ee8a9f0027bbcbc92358048bb6e858eb32fe504
Author: Ben Pfaff <blp at nicira.com>
		
openflow: Delete icmp_type and icmp_code macros.
		
These macros caused trouble if datapath-protocol.h was included before
openflow.h.  Later references to the icmp_type and icmp_code members of
struct ovs_key_icmp caused compiler errors, because the macros caused them
to try to refer to nonexistent tp_src and tp_dst members in those
structures.


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

Summary of changes:
 include/openflow/openflow.h |    5 --
 lib/classifier.c            |    4 +-
 lib/dpif-netdev.c           |  149 +++++++++++++++++--------------------------
 lib/flow.c                  |    8 +-
 lib/meta-flow.c             |   14 ++--
 lib/netlink-socket.c        |    6 +-
 lib/netlink.h               |    6 ++
 lib/odp-util.c              |    4 +-
 lib/ofp-print.c             |    4 +-
 9 files changed, 83 insertions(+), 117 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list