will 2 cpu simultaneously process packets which have same hash value on multiqueue nic?

Previous thread: 兼職工作,全職收入,每月增加2-5萬!! by ariadne93192410 on Wednesday, May 19, 2010 - 10:22 pm. (1 message)

Next thread: [PATCH net-next-2.6 0/8] CAIF: Bugfixes and updates by sjur.brandeland on Thursday, May 20, 2010 - 12:44 am. (13 messages)
From: Jon Zhou
Date: Wednesday, May 19, 2010 - 10:37 pm

will 2 cpu simultaneously  process packets which have same hash value on multiqueue nic?

let 's take broadcom 57711 bnx2x_main.c as an example:

#1 packet1->queue=1
#2 packet2->queue=1

will cpu1 and cpu2 execute the function " bnx2x_rx_int" in parallel, to receive packet1 & packet2

or it just depend on smp_affinity setting?

thanks
jon
--

From: Eilon Greenstein
Date: Thursday, May 20, 2010 - 4:46 am

Both packets will be handled by the same queue and the queue processing
is serialized - so the packets will be handled one after the other.

Regards,
Eilon


--

From: Eric Dumazet
Date: Thursday, May 20, 2010 - 5:00 am

I am scratching my head to understand both the question and your
answer...

if cpu1 is handling an interrupt, cpu2 cannot handle an interrupt at the
same time for same queue. It must be for a different queue.

Therefore, packets will be handled in parallel.

Serialization might be done later, at socket layer to queue packets in a
receive queue for example, if both packets must be delivered on same
socket.



--

From: Eilon Greenstein
Date: Thursday, May 20, 2010 - 5:20 am

I was trying to say that since both packets are handled on the same
queue - it is handled one after the other and not by two different CPUs
What do you mean "in parallel"? As you wrote above, only one cpu is
handling the packets from that queue, and since the hash is the same,
Though this is always true, the case of receiving packets on the same
queue is even simpler, is not it?



--

Previous thread: 兼職工作,全職收入,每月增加2-5萬!! by ariadne93192410 on Wednesday, May 19, 2010 - 10:22 pm. (1 message)

Next thread: [PATCH net-next-2.6 0/8] CAIF: Bugfixes and updates by sjur.brandeland on Thursday, May 20, 2010 - 12:44 am. (13 messages)