Patchwork [net-next,4/5] openvswitch: Change ENOENT return value to ENODEV in lookup_vport().

mail settings
Submitter Jesse Gross
Date March 15, 2013, 5:38 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/228122/
State Accepted
Delegated to: David Miller
Headers show


Jesse Gross - March 15, 2013, 5:38 p.m.
From: Jarno Rajahalme <>

This reduces the number of valid "no such device" error values that
need special attention by the caller.

Userspace code will need to keep on checking for both ENODEV and
ENOENT as long as older kernel modules are around.

Signed-off-by: Jarno Rajahalme <>
Signed-off-by: Jesse Gross <>
 net/openvswitch/datapath.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index f996db3..f9d2438 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1628,7 +1628,7 @@  static struct vport *lookup_vport(struct net *net,
 		vport = ovs_vport_rtnl_rcu(dp, port_no);
 		if (!vport)
-			return ERR_PTR(-ENOENT);
+			return ERR_PTR(-ENODEV);
 		return vport;
 	} else
 		return ERR_PTR(-EINVAL);