Skip to contentSkip to conversation

openvswitch: use -EEXIST as return error to be more precise

PATCH In review Fan Du 3 participants 3 messages May 28, 2013 – May 29, 2013

Subsystems (3)
lore
Share & tools
lore

Fan Du

author
#0 lore raw

PATCH 1/1 openvswitch: use -EEXIST as return error to be more precise

ovs_vport_cmd_new create a new vport with port num specified by user. when this port num is already occupied, it's more clear to return -EEXIST as the reason than -EBUSY.

---
 net/openvswitch/datapath.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/openvswitch/datapath.c +1 -1
index d12d6b8..1e31095 100644
@@ -1755,7 +1755,7 @@ static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info)
 			goto exit_unlock;
 
 		vport = ovs_vport_ovsl(dp, port_no);
-		err = -EBUSY;
+		err = -EEXIST;
 		if (vport)
 			goto exit_unlock;
 	} else {
Signature · 1 line
1.7.1
maintainer
#1 lore raw

From: Fan Du <[email protected]>
Date: Tue, 28 May 2013 14:31:16 +0800

Quoted 5 lines

ovs_vport_cmd_new create a new vport with port num specified by user. when this port num is already occupied, it's more clear to return -EEXIST as the reason than -EBUSY.

Jesse?

#2 lore raw
In reply to Fan Du
Quoted 5 lines · Fan Du

ovs_vport_cmd_new create a new vport with port num specified by user. when this port num is already occupied, it's more clear to return -EEXIST as the reason than -EBUSY.

This error code is part of the userspace ABI so you can't change it without breaking existing applications.