kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: arlie@worldash.org (Arlie Stephens)
To: kernelnewbies@lists.kernelnewbies.org
Subject: relationship between cpu_affinity and Packet RX Processing
Date: Tue, 26 Mar 2013 11:45:55 -0700	[thread overview]
Message-ID: <20130326184555.GA23561@worldash.org> (raw)
In-Reply-To: <20130326183133.GA6146@gmail.com>

Hi Amit,

On Mar 26 2013, Kumar amit mehta wrote:
> 
> Hi All,
> 
> I was reading some stuff on interrupts and irq lines today and I thought I'll
> expermient with the network rx path. To start with, I've a Virtual Machine
> running 3.8 linux kernel. My machine has 4 CPU cores, network (eth) interface 
> is driven by pcnet_32 AMD driver and is tied to IRQ line #19. I started some
> network traffic and I notice that out of those 4 CPUs, only one of them is being
> used and despite changing the CPU affinity, I still don't see the other cores
> being used for this network traffic. So based on this behavior(please see the
> logs below), I've these following queries:
> i) Does it mean that this network card do not have multiple Rx
> Queues ?

I don't know for sure what linux does, but the NICs I've seen with
multiple queues tend to select queues by hashing incoming packets
based on source IP, sourse port, destination IP, destination port and
(if TCP) protocol.  

This is done because you generally want all packets for a given
connection in the same queue. 

For a single ping, always to the same destination, all packets will
hash the same, and so wind up in the same queue. 

> ii) I think all the modern NICs must be implementing multiple Rx Queues and
> hence Can someone please point me to the simplest of such implemenation in any
> of the in-tree drivers ?
> iii) I'm just doing a simple 'ping' to google with of big size packets, As I do 
> not have a peer to use packetgen/netperf/iperf utilities.

--
Arlie

  parent reply	other threads:[~2013-03-26 18:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 18:31 relationship between cpu_affinity and Packet RX Processing Kumar amit mehta
2013-03-26 18:35 ` Rami Rosen
2013-03-26 19:05   ` Kumar amit mehta
2013-03-26 19:31     ` Rami Rosen
2013-03-29 13:19       ` Kumar amit mehta
2013-03-29 13:36         ` Kumar amit mehta
2013-03-30  8:16           ` Rami Rosen
2013-03-30 21:56             ` Paulo Petruzalek
2013-03-26 18:45 ` Arlie Stephens [this message]
2013-03-26 18:54   ` Kumar amit mehta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130326184555.GA23561@worldash.org \
    --to=arlie@worldash.org \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).