Re: divert and deadlock issues



Christian S.J. Peron wrote:
...
One idea was to duplicate the socket options mbuf and pass in a NULL pointer
for the multi-cast options. Keep in mind that these are multicast options
associated with a divert socket.

So I guess the questions:

(1) Are there any users that are specifying multicast options on divert sockets?
(2) Are there any users that are specifying socket options in general for
divert sockets?

The LOR is obviously being triggered by ip_output()'s acquisition of in_multi_mtx, due to a datagram being sent to a multicast destination and a subsequent lookup being required.

I can't think of a reason why a user would wish to supply any multicast socket options to a divert socket, other than the 'small' ones, i.e. IP_MULTICAST_TTL/IF/LOOP/VIF.

See the comments about idempotence inside in_mcast.c on the HEAD branch, about why you can't just wish them away. It seems reasonable that this subset of the multicast options are supported for divert sockets given the likely use cases, even if IPPROTO_DIVERT supports IP_HDRINCL, because IP_MULTICAST_TTL does not do what you think it does (see in_mcast.c comments again).

Joining groups on a divert socket SHOULD NOT be supported (it does not make sense semantically) and we should deliberately return EINVAL for multicast options other than the above subset.

Dropping the inpcb lock over ip_output() looks like the easy option. Alternatively, we could just not support multicast options on divert sockets given that it is a rare use case as per above.

BMS
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • RE: can I use IAsyncResult.IsCompleted Property to know if Endxxx was already called?
    ... Normally, in the Socket Asynchronous programming model, before you call ... This callback method will execute in a separate thread ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Simple TCP Socket Communicator - Please Help
    ... just like what you can do in unmanaged socket application, ... Microsoft MSDN Online Support Lead ... TcpClient to receive data from server, ... private StreamReader _reader; ...
    (microsoft.public.dotnet.framework)
  • RE: Missing error in WSAAsyncSelect event completion in x64 enviro
    ... SOCKET Listen; ... // Receive data from the socket in wParam ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.win32.programmer.networks)
  • Re: XP Home rebooting randomly
    ... off that is being initiated by the power supply electronics or the CPU ... Dust is a heat insulator, ... Some BIOS chips support temperature and some also support fan speed ... it in a socket, you don't want to flex an electrically live motherboard into ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: getlasterror 997 after blocking recv returns error
    ... You got the error WSA_IO_PENDING which indicated the socket was under ... some function invokings will cause the socket I/O mode ... Microsoft Online Partner Support ...
    (microsoft.public.win32.programmer.networks)