[ovs-dev] [PATCH] datapath: Change the single ENOENT return value to ENODEV in lookup_vport() to reduce the number of valid "no such device" error values that need special attention by the caller.

Jarno Rajahalme jarno.rajahalme at nsn.com
Tue Jan 8 11:41:00 UTC 2013

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 <jarno.rajahalme at nsn.com>
 datapath/datapath.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 30e26a7..14c5c54 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1679,7 +1679,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);

More information about the dev mailing list