[ovs-dev] [netlink v4 47/52] datapath: Adopt Generic Netlink-compatible locking.

Ben Pfaff blp at nicira.com
Mon Jan 24 22:25:16 UTC 2011


On Sun, Jan 23, 2011 at 01:56:46PM -0800, Jesse Gross wrote:
> Also, I get a sparse error from the direct access to dp->table in
> odpfc_dump().  I thought that you had fixed that at some point but I'm
> seeing the warning with the most recent version of your code.

It looks OK to me on this commit (datapath: Adopt Generic
Netlink-compatible locking) but I see that the problem (re?)occurs in
commit "datapath: Convert ODP_FLOW_* commands to use AF_NETLINK socket
layer," so I applied the following there:

diff --git a/datapath/datapath.c b/datapath/datapath.c
index ff51a73..5489480 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1150,7 +1150,7 @@ static int odp_flow_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb)
 
 		bucket = cb->args[0];
 		obj = cb->args[1];
-		flow_node = tbl_next(dp->table, &bucket, &obj);
+		flow_node = tbl_next(get_table_protected(dp), &bucket, &obj);
 		if (!flow_node)
 			break;
 




More information about the dev mailing list