Re: dccp send

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dnia Wednesday 02 of January 2008, Arnaldo Carvalho de Melo napisał:
> Em Wed, Jan 02, 2008 at 01:41:16AM +0100, Tomasz Grobelny escreveu:
> > When I use dccp does sendmsg function block (until it sends the packet)?
> > If so, should it? In either case, how to make it just queue the packet
> > and return?
>
> The interface is the same as for other AF_INET transports, use
> O_NONBLOCK (open, fcntl) if you want it to be non blocking.
>
But what are the semantics? In TCP if sendmsg blocks the application has no 
choice but to wait. The time for which sendmsg blocks it tightly connected 
with speed at which packets can be transmitted over the network. Is it the 
case for dccp as well? If so, does it mean that provided stable network 
conditions over longer period of time and using blocking version of sendmsg 
in a loop very few packets should be lost? (By very few I mean < 10%)

> It queues it in the write routine and tries to send it right away, but
> doesn't waits for actually sending the packet, i.e. it only checks if
> there is write space available, if you set O_NONBLOCK and there is no
> space it returns ENOBUFS, if O_NONBLOCK is not set it will sleep waiting
> for write space to be made available, when the process will be awaken.
>
dccp_sendmsg seems to block on call to sock_alloc_send_skb. Which at first 
look does not seems to send anything anywhere. So why does it block at all? 
Can't it just allocate the data needed and return?
-- 
Regards,
Tomasz Grobelny
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux