All of lore.kernel.org
 help / color / mirror / Atom feed
* AF_VSOCK connection refused errno
@ 2017-12-12 15:53 Stefan Hajnoczi
  2017-12-13 10:28 ` Jorgen S. Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-12-12 15:53 UTC (permalink / raw)
  To: Jorgen Hansen; +Cc: Dexuan Cui, netdev

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

When connect(2) fails because the peer is not listening the virtio vsock
transport returns ECONNRESET.  I believe the VMCI transport does the
same (based on code inspection).

Jorgen: Can you confirm this VMCI transport behavior?

I'd like to change to ECONNREFUSED for all transports because developers
will be surprised when they get ECONNRESET.  It makes porting AF_INET
code harder.

On the other hand, it may be too late to fix this if there userspace
applications that rely on ECONNRESET?  I'm not aware of any such
applications myself.

Thanks,
Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AF_VSOCK connection refused errno
  2017-12-12 15:53 AF_VSOCK connection refused errno Stefan Hajnoczi
@ 2017-12-13 10:28 ` Jorgen S. Hansen
  2017-12-13 14:58   ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Jorgen S. Hansen @ 2017-12-13 10:28 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Dexuan Cui, netdev


> On Dec 12, 2017, at 4:53 PM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> 
> When connect(2) fails because the peer is not listening the virtio vsock
> transport returns ECONNRESET.  I believe the VMCI transport does the
> same (based on code inspection).
> 
> Jorgen: Can you confirm this VMCI transport behavior?

Yes, that is correct.

> I'd like to change to ECONNREFUSED for all transports because developers
> will be surprised when they get ECONNRESET.  It makes porting AF_INET
> code harder.
> 
> On the other hand, it may be too late to fix this if there userspace
> applications that rely on ECONNRESET?  I'm not aware of any such
> applications myself.

In the past, I’ve explained to customers that an ECONNRESET error on connect
can indicate that the peer isn’t listening on the dest address. Whether they went
and used that information isn’t clear, but changing this behavior now would
risk breaking applications. While it is unfortunate that we deviate from INET in
this case, I would prefer it to stay as is.

Thanks,
Jorgen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AF_VSOCK connection refused errno
  2017-12-13 10:28 ` Jorgen S. Hansen
@ 2017-12-13 14:58   ` Stefan Hajnoczi
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-12-13 14:58 UTC (permalink / raw)
  To: Jorgen S. Hansen; +Cc: Dexuan Cui, netdev

[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]

On Wed, Dec 13, 2017 at 10:28:30AM +0000, Jorgen S. Hansen wrote:
> 
> > On Dec 12, 2017, at 4:53 PM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > 
> > When connect(2) fails because the peer is not listening the virtio vsock
> > transport returns ECONNRESET.  I believe the VMCI transport does the
> > same (based on code inspection).
> > 
> > Jorgen: Can you confirm this VMCI transport behavior?
> 
> Yes, that is correct.
> 
> > I'd like to change to ECONNREFUSED for all transports because developers
> > will be surprised when they get ECONNRESET.  It makes porting AF_INET
> > code harder.
> > 
> > On the other hand, it may be too late to fix this if there userspace
> > applications that rely on ECONNRESET?  I'm not aware of any such
> > applications myself.
> 
> In the past, I’ve explained to customers that an ECONNRESET error on connect
> can indicate that the peer isn’t listening on the dest address. Whether they went
> and used that information isn’t clear, but changing this behavior now would
> risk breaking applications. While it is unfortunate that we deviate from INET in
> this case, I would prefer it to stay as is.

That's fine.  Thanks for confirming.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-13 14:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-12 15:53 AF_VSOCK connection refused errno Stefan Hajnoczi
2017-12-13 10:28 ` Jorgen S. Hansen
2017-12-13 14:58   ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.