There's no point in retrying with a different number if the name conflicts.
if (!try_module_get(THIS_MODULE))
goto err_unlock;
- /* Exit early if a datapath with that number already exists. */
- err = -EEXIST;
+ /* Exit early if a datapath with that number already exists.
+ * (We don't use -EEXIST because that's ambiguous with 'devname'
+ * conflicting with an existing network device name.) */
+ err = -EBUSY;
if (get_dp(dp_idx))
goto err_put_module;
error = ioctl(dpif->fd, ODP_DP_CREATE, name) < 0 ? errno : 0;
if (!error) {
return 0;
- } else if (error != EEXIST) {
+ } else if (error != EBUSY) {
dpif_close(dpif);
return error;
}