[ovs-git] Open vSwitch: odp-util: Improve formatting of bad ODP actions. (master)

dev at openvswitch.org dev at openvswitch.org
Tue Dec 28 17:25:40 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  8ba43fbd1f14d60a2d097bafc7d0606d860d0f72 (commit)
       via  406e37ecf554529e9380ef06863d85ccc94009d1 (commit)
       via  c6fadeb1f0488997b44e85a00a8887756232156d (commit)
       via  ddffedda18b6f919cb896265e126574d75fcaf00 (commit)
       via  6c2297372bff3a07c4b36da366d9edfd7edc114b (commit)
       via  4faaba2b90979e1106b8c9b0430481f2cc62364d (commit)
       via  7f7439e31523643f48479325a250cc92f66b9fc8 (commit)
      from  8159b984dced44851670bd48e204b4e854941a24 (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 8ba43fbd1f14d60a2d097bafc7d0606d860d0f72
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=8ba43fbd1f14d60a2d097bafc7d0606d860d0f72
Author: Ben Pfaff <blp at nicira.com>
		
odp-util: Improve formatting of bad ODP actions.
		
nla_len is the size of a Netlink attribute including its header, but we
only want to print the attribute payload, so use nl_attr_get_size()
instead.

Also, make it clear that what follows the "bad action" information is a
dump of the action itself.

Acked-by: Jesse Gross <jesse at nicira.com>


commit 406e37ecf554529e9380ef06863d85ccc94009d1
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=406e37ecf554529e9380ef06863d85ccc94009d1
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Clean up use of TBL_* constants.
		
A lot of the TBL_* constants were being used in conceptually wrong ways,
even though the code was correct because the actual values were correct.
(This is because TBL_L1_BITS, TBL_L2_BITS, and TBL_L1_SHIFT are all 10
and TBL_L1_SIZE and TBL_L2_SIZE are both 1024.)

Signed-off-by: Ben Pfaff <blp at nicira.com>
Reported-by: Jesse Gross <jesse at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit c6fadeb1f0488997b44e85a00a8887756232156d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c6fadeb1f0488997b44e85a00a8887756232156d
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Clarify meaning of n_buckets argument to tbl_create().
		
The n_buckets argument to tbl_create() can be zero, but the comment didn't
mention that.  However, there's no reason that the caller can't just pass
in a correct size, so this commit changes them to do that.

Also, TBL_L1_SIZE was conceptually wrong as the minimum size: the minimum
size is one L2 page, e.g. TBL_L2_SIZE.  But TBL_MIN_BUCKETS seems like a
better all-around way to indicate the minimum size, so this commit also
introduces that macro and uses it.

Jesse Gross pointed out inconsistencies in this area.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit ddffedda18b6f919cb896265e126574d75fcaf00
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=ddffedda18b6f919cb896265e126574d75fcaf00
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Do not shadow 'err' variable name in tnl_send().
		
The sparse checker reported that 'err' was used for two different variables
in tnl_send().  The two variables have different types, so this patch
renames the inner one.

Jesse confirmed that the original code was correct as written.  This patch
does not change its behavior.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit 6c2297372bff3a07c4b36da366d9edfd7edc114b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6c2297372bff3a07c4b36da366d9edfd7edc114b
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Suppress sparse complaints about address spaces.
		
The sparse checker was complaining about incorrect address spaces (e.g.
__user versus non-__user pointers).  I looked at each of them, checked
that the code looked correct to me, and added the appropriate __force
annotations to casts.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit 4faaba2b90979e1106b8c9b0430481f2cc62364d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=4faaba2b90979e1106b8c9b0430481f2cc62364d
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Fix type of actions_len_left in modify_vlan_tci().
		
The sparse checker reported that the type of the pointer passed to
nla_next(), as &actions_len_left, was incorrect: whereas the parameter
has type "int *", &actions_len_left is an "unsigned int *".  This fixes
the problem.  It is not a bug fix since the code is equally correct (or
incorrect) either way, but it gets the types right anyhow.

I don't know why GCC was not reporting this as an error.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


commit 7f7439e31523643f48479325a250cc92f66b9fc8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7f7439e31523643f48479325a250cc92f66b9fc8
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Remove shadowed 'err' variable.
		
sparse reported that 'err' was declared in two different places in this
function.  This patch removes the inner one.  I verified that this didn't
affect correctness either way, so this is not a bug fix.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


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

Summary of changes:
 datapath/actions.c  |    3 +--
 datapath/datapath.c |   16 ++++++++--------
 datapath/table.c    |   38 +++++++++++++++++++++-----------------
 datapath/table.h    |    3 +++
 datapath/tunnel.c   |    8 ++++----
 lib/odp-util.c      |    8 +++++---
 6 files changed, 42 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list