* Re: Fw: F_SETSIG broken/changed in 2.6 for UDP and TCP sockets?
[not found] <20040531151843.7144dfce.akpm@osdl.org>
@ 2004-06-04 2:24 ` Russell Leighton
2004-06-05 15:14 ` Russell Leighton
0 siblings, 1 reply; 3+ messages in thread
From: Russell Leighton @ 2004-06-04 2:24 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: Andrew Morton
Thanks to all that helped me troubleshoot.
Of the 2 issues I had with FedoraCore2, one problem is solved:
* Multicast issues were solved by using another NIC. It seems that
the driver for the NatSemi DP8381[56] does not receive mutlicast
properly.
* F_SETSIG still seems broken for TCP for me when my process sets up
more than a few fd's...I will try the latest kernel to see if this
goes away
Russ
Andrew Morton wrote:
>Begin forwarded message:
>
>Date: Mon, 31 May 2004 14:45:08 -0400
>From: Russell Leighton <russ@elegant-software.com>
>To: linux-kernel@vger.kernel.org
>Subject: F_SETSIG broken/changed in 2.6 for UDP and TCP sockets?
>
>
>
>I have a program that works fine under stock rh9 (2.4.2-8) but has
>issues getting signaled under FedoraCore2 (2.6.5-1.358)
>using SETSIG to a Posix RT signal.
>
>The program does the standard:
>
> /* hook to process */
> if ( fcntl(fdcallback->fd, F_SETOWN, mon->handler_q.thread->pid) == -1 ) {
> aw_log(fdcallback->handler->logger, AW_ERROR_LOG_LEVEL,
> "cannot set owner on fd (%s)",
> strerror(errno));
> }/* end if */
>
> /* make async */
> if ( fcntl(fdcallback->fd, F_SETFL, (O_NONBLOCK | O_ASYNC) ) == -1 ) {
> aw_log(fdcallback->handler->logger, AW_ERROR_LOG_LEVEL,
> "cannot set async on fd (%s)",
> strerror(errno));
> }/* end if */
>
> /* hook to signal */
> if ( fcntl(fdcallback->fd, F_SETSIG, AW_SIG_FD) == -1 ) {
> aw_log(fdcallback->handler->logger, AW_ERROR_LOG_LEVEL,
> "cannot set signal on fd (%s)",
> strerror(errno));
> }/* end if */
>
>Under Fedora things work well for raw sockets (much lower latency than
>in 2.4!) but are inconsistent with udp or tcp sockets.
>
>In the udp case, I when I listen for multicast packets my app only
>receives them when I am running a tcpdump (bizarre!).
>
>In the tcp case, I don't get signaled if I do the F_SETSIG on more than
>1 fd.
>
>Any tips on tracking this down would be much appreciated.
>
>Thx
>
>Russ
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fw: F_SETSIG broken/changed in 2.6 for UDP and TCP sockets?
2004-06-04 2:24 ` Fw: F_SETSIG broken/changed in 2.6 for UDP and TCP sockets? Russell Leighton
@ 2004-06-05 15:14 ` Russell Leighton
0 siblings, 0 replies; 3+ messages in thread
From: Russell Leighton @ 2004-06-05 15:14 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: Andrew Morton
Last issue resolved. I am posting so there is a complete thread for
anyone that stumbles on this in the future.
F_SETSIG IS working...what is NOT working (as it did in 2.4) is the
interaction between clone() and getpid() in child processes.
This issue altered the control of my program and made it look like I was
not receiving signals.
I'll send another email to the kernel mailing list w/a test program that
demonstrates this.
Russell Leighton wrote:
>
> Thanks to all that helped me troubleshoot.
>
> Of the 2 issues I had with FedoraCore2, one problem is solved:
>
> * Multicast issues were solved by using another NIC. It seems that
> the driver for the NatSemi DP8381[56] does not receive mutlicast
> properly.
> * F_SETSIG still seems broken for TCP for me when my process sets up
> more than a few fd's...I will try the latest kernel to see if this
> goes away
>
>
> Russ
>
> Andrew Morton wrote:
>
>> Begin forwarded message:
>>
>> Date: Mon, 31 May 2004 14:45:08 -0400
>> From: Russell Leighton <russ@elegant-software.com>
>> To: linux-kernel@vger.kernel.org
>> Subject: F_SETSIG broken/changed in 2.6 for UDP and TCP sockets?
>>
>>
>>
>> I have a program that works fine under stock rh9 (2.4.2-8) but has
>> issues getting signaled under FedoraCore2 (2.6.5-1.358)
>> using SETSIG to a Posix RT signal.
>>
>> The program does the standard:
>>
>> /* hook to process */
>> if ( fcntl(fdcallback->fd, F_SETOWN, mon->handler_q.thread->pid) ==
>> -1 ) {
>> aw_log(fdcallback->handler->logger, AW_ERROR_LOG_LEVEL,
>> "cannot set owner on fd (%s)",
>> strerror(errno));
>> }/* end if */
>>
>> /* make async */
>> if ( fcntl(fdcallback->fd, F_SETFL, (O_NONBLOCK | O_ASYNC) ) == -1 ) {
>> aw_log(fdcallback->handler->logger, AW_ERROR_LOG_LEVEL,
>> "cannot set async on fd (%s)",
>> strerror(errno));
>> }/* end if */
>>
>> /* hook to signal */
>> if ( fcntl(fdcallback->fd, F_SETSIG, AW_SIG_FD) == -1 ) {
>> aw_log(fdcallback->handler->logger, AW_ERROR_LOG_LEVEL,
>> "cannot set signal on fd (%s)",
>> strerror(errno));
>> }/* end if */
>>
>> Under Fedora things work well for raw sockets (much lower latency
>> than in 2.4!) but are inconsistent with udp or tcp sockets.
>>
>> In the udp case, I when I listen for multicast packets my app only
>> receives them when I am running a tcpdump (bizarre!).
>>
>> In the tcp case, I don't get signaled if I do the F_SETSIG on more
>> than 1 fd.
>>
>> Any tips on tracking this down would be much appreciated.
>>
>> Thx
>>
>> Russ
>>
>> -
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>>
>>
>>
>>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fw: F_SETSIG broken/changed in 2.6 for UDP and TCP sockets?
@ 2004-06-05 20:21 Manfred Spraul
0 siblings, 0 replies; 3+ messages in thread
From: Manfred Spraul @ 2004-06-05 20:21 UTC (permalink / raw)
To: Russell Leighton; +Cc: linux-kernel
Russell Leighton wrote:
>> Thanks to all that helped me troubleshoot.
>>
>> Of the 2 issues I had with FedoraCore2, one problem is solved:
>>
>> * Multicast issues were solved by using another NIC. It seems that
>> the driver for the NatSemi DP8381[56] does not receive mutlicast
>> properly.
>
>
Odd. I've just tried the driver from 2.6.7-rc2 and multicast receive
works: the hardware correctly accepts packets for the requested group
and skips packets for all other groups.
Which app do you use for multicast receive/send? Which nic do you use
now instead of natsemi?
--
Manfred
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-05 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20040531151843.7144dfce.akpm@osdl.org>
2004-06-04 2:24 ` Fw: F_SETSIG broken/changed in 2.6 for UDP and TCP sockets? Russell Leighton
2004-06-05 15:14 ` Russell Leighton
2004-06-05 20:21 Manfred Spraul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox