[ovs-dev] [PATCH 2/2] datapath: Return correct error code when dumping flow actions.

Jesse Gross jesse at nicira.com
Mon Jan 21 11:59:17 UTC 2013


Currently, if there isn't enough space to store the actions in a
flow during a dump we return -ENOMEM.  However, the standard error
in this situation is -EMSGSIZE so this changes the behavior to match.
This issue was introduced in 354d4c98a8cdaae3525848f564e58a9016bcd3af
 (datapath: Fix nelink attribute size for flow.).

Signed-off-by: Jesse Gross <jesse at nicira.com>
---
 datapath/datapath.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 754bc7c..0319cef 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1121,10 +1121,8 @@ static int ovs_flow_cmd_fill_info(struct sw_flow *flow, struct datapath *dp,
 
 			nla_nest_cancel(skb, start);
 		}
-	} else if (skb_orig_len) {
-		err = -ENOMEM;
-		goto error;
-	}
+	} else if (skb_orig_len)
+		goto nla_put_failure;
 
 	return genlmsg_end(skb, ovs_header);
 
-- 
1.7.9.5




More information about the dev mailing list