]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_vhost/vhost_user/vhost-net-user.c
vhost: add log on socket bind failure
[dpdk.git] / lib / librte_vhost / vhost_user / vhost-net-user.c
index 87a4711708b64fe38d0e6ef3c7b44774b06cb146..f406a94cb2f039da6c6a9f29a682a0cb0751ca46 100644 (file)
@@ -122,8 +122,11 @@ uds_socket(const char *path)
        un.sun_family = AF_UNIX;
        snprintf(un.sun_path, sizeof(un.sun_path), "%s", path);
        ret = bind(sockfd, (struct sockaddr *)&un, sizeof(un));
-       if (ret == -1)
+       if (ret == -1) {
+               RTE_LOG(ERR, VHOST_CONFIG, "fail to bind fd:%d, remove file:%s and try again.\n",
+                       sockfd, path);
                goto err;
+       }
        RTE_LOG(INFO, VHOST_CONFIG, "bind to %s\n", path);
 
        ret = listen(sockfd, MAX_VIRTIO_BACKLOG);