Re: [PATCH v5 06/13] xen/pvcalls: implement bind command
From: Boris Ostrovsky
Date: Fri Oct 20 2017 - 10:38:38 EST
On 10/19/2017 09:31 PM, Stefano Stabellini wrote:
> On Tue, 17 Oct 2017, Boris Ostrovsky wrote:
>> On 10/06/2017 08:30 PM, Stefano Stabellini wrote:
>>> +int pvcalls_front_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
>>> +{
>>> + struct pvcalls_bedata *bedata;
>>> + struct sock_mapping *map = NULL;
>>> + struct xen_pvcalls_request *req;
>>> + int notify, req_id, ret;
>>> +
>>> + if (addr->sa_family != AF_INET || sock->type != SOCK_STREAM)
>>> + return -ENOTSUPP;
>>> +
>>> + pvcalls_enter();
>>> + if (!pvcalls_front_dev) {
>>> + pvcalls_exit();
>>> + return -ENOTCONN;
>> The connect patch returns -ENETUNREACH here. Is there a deliberate
>> distinction between these cases?
> No, there isn't a deliberate distinction. Actually, all other commands
> return ENOTCONN for this error, we might as well be consistent and
> change ENETUNREACH to ENOTCONN for connect.
>
> If you agree, I'll make the change to the connect patch, and add your
> reviewed-by here.
It's already there ;-)
-boris
>
>
>
>> Other than that
>>
>> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>