* motive for sending Ethernet packets in soft-irq context
@ 2008-05-02 9:16 Parav Pandit
2008-05-02 11:23 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Parav Pandit @ 2008-05-02 9:16 UTC (permalink / raw)
To: linux-kernel
Hi,
What is the motive to send the ethernet packets to the NIC driver by invoking hard_xmit() in the soft-irq context?
What I understand is,
It is not done into the process context of send() system call beacause,
1. Calling it in soft-irq context eliminates any delays incurred by the process switching, lower task priorities etc.
Can't it be done by raising the process priority to highest until the NIC driver hand over the packet to the hardware?
This will avoid time incurred in process to soft-irq switching time.
Are there any other performance, security reasons?
Regards,
Parav Pandit
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
^ permalink raw reply [flat|nested] 6+ messages in thread
* motive for sending Ethernet packets in soft-irq context
@ 2008-05-02 10:52 Parav Pandit
2008-05-02 11:28 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Parav Pandit @ 2008-05-02 10:52 UTC (permalink / raw)
To: Linux kernel
Hi,
What is the motive behind sending Ethernet packets to the NIC driver by invoking hard_xmit() in the soft-irq context?
What I understand is,
It is not done into the process context of send() system call beacause,
1. Calling it in soft-irq context eliminates any delays incurred by the process switching, lower task priorities etc.
Can't it be done by raising the process priority to highest until the NIC driver hand over the packet to the hardware?
This will avoid time incurred in process to soft-irq switching time.
Are there any other performance, security reasons?
Regards,
Parav Pandit
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: motive for sending Ethernet packets in soft-irq context
2008-05-02 9:16 motive for sending Ethernet packets in soft-irq context Parav Pandit
@ 2008-05-02 11:23 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2008-05-02 11:23 UTC (permalink / raw)
To: paravpandit; +Cc: linux-kernel, netdev
From: Parav Pandit <paravpandit@yahoo.com>
Date: Fri, 2 May 2008 02:16:07 -0700 (PDT)
[ Your question belongs on netdev, that's where the kernel
networking developers hang out, CC:'d ]
> What I understand is,
> It is not done into the process context of send() system call beacause,
Where did you obtain this understanding? It's not accurate :-)
It is actually done in the send() system call thread of execution most
of the time. soft-irqs are simply disabled during the
->hard_start_xmit() driver call so that input packet processing cannot
execute on the local cpu while this happens.
However, many packets are sent in response to received
packets. In this case, since receive packets are
processed in soft-irq context, the response will be
sent in such a context too.
This applies for TCP data queued up waiting for the congestion
window or TCP window to open up. When an ACK arrives which
satisfies the necessary conditions, queued up socket
data packets are send, again in soft-irq context.
So whether we send to the network card in soft-irq context
or not is entirely situation dependent.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: motive for sending Ethernet packets in soft-irq context
2008-05-02 10:52 Parav Pandit
@ 2008-05-02 11:28 ` David Miller
2008-05-02 12:11 ` Parav Pandit
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-05-02 11:28 UTC (permalink / raw)
To: paravpandit; +Cc: linux-kernel
You did not have to posting this question a second
time, we saw your first posting. Every time you post
to this list, several thousand people get another email.
Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: motive for sending Ethernet packets in soft-irq context
2008-05-02 11:28 ` David Miller
@ 2008-05-02 12:11 ` Parav Pandit
2008-05-02 12:16 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Parav Pandit @ 2008-05-02 12:11 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel
Sorry for the mistake.
First time I was not subscribed, so it didn't come to my mailbox and sent again.
I'll take care henceforth.
Regards,
Parav Pandit
--- On Fri, 5/2/08, David Miller <davem@davemloft.net> wrote:
> From: David Miller <davem@davemloft.net>
> Subject: Re: motive for sending Ethernet packets in soft-irq context
> To: paravpandit@yahoo.com
> Cc: linux-kernel@vger.kernel.org
> Date: Friday, May 2, 2008, 4:58 PM
> You did not have to posting this question a second
> time, we saw your first posting. Every time you post
> to this list, several thousand people get another email.
>
> Thank you.
> --
> 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/
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: motive for sending Ethernet packets in soft-irq context
2008-05-02 12:11 ` Parav Pandit
@ 2008-05-02 12:16 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2008-05-02 12:16 UTC (permalink / raw)
To: paravpandit; +Cc: linux-kernel
From: Parav Pandit <paravpandit@yahoo.com>
Date: Fri, 2 May 2008 05:11:48 -0700 (PDT)
> First time I was not subscribed, so it didn't come to my mailbox and
> sent again.
You do not need to be subscribed to this mailing list, or any mailing
list at vger.kernel.org, in order to post messages to them.
If all you need is a simple answer to a question, or have a bug to
report, but otherwise have no interest in reading the hundreds and
hudreds of postings linux-kernel has every day, it's often better to
not subscribe.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-02 12:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02 9:16 motive for sending Ethernet packets in soft-irq context Parav Pandit
2008-05-02 11:23 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2008-05-02 10:52 Parav Pandit
2008-05-02 11:28 ` David Miller
2008-05-02 12:11 ` Parav Pandit
2008-05-02 12:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox