virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: krkumar2@in.ibm.com, kvm@vger.kernel.org, mst@redhat.com,
	netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	levinsasha928@gmail.com
Subject: Re: [net-next RFC PATCH 0/5] Series short description
Date: Thu, 08 Dec 2011 18:06:53 +0800	[thread overview]
Message-ID: <4EE08C3D.5080306@redhat.com> (raw)
In-Reply-To: <1323277324.2728.34.camel@bwh-desktop>

On 12/08/2011 01:02 AM, Ben Hutchings wrote:
> On Wed, 2011-12-07 at 19:31 +0800, Jason Wang wrote:
>> On 12/07/2011 03:30 PM, Rusty Russell wrote:
>>> On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wang<jasowang@redhat.com>   wrote:
>>>> multiple queue virtio-net: flow steering through host/guest cooperation
>>>>
>>>> Hello all:
>>>>
>>>> This is a rough series adds the guest/host cooperation of flow
>>>> steering support based on Krish Kumar's multiple queue virtio-net
>>>> driver patch 3/3 (http://lwn.net/Articles/467283/).
>>> Is there a real (physical) device which does this kind of thing?  How do
>>> they do it?  Can we copy them?
>>>
>>> Cheers,
>>> Rusty.
>> As far as I see, ixgbe and sfc have similar but much more sophisticated
>> mechanism.
>>
>> The idea was originally suggested by Ben and it was just borrowed form
>> those real physical nic cards who can dispatch packets based on their
>> hash. All of theses cards can filter the flow based on the hash of
>> L2/L3/L4 header and the stack would tell the card which queue should
>> this flow goes.
> Solarflare controllers (sfc driver) have 8192 perfect filters for
> TCP/IPv4 and UDP/IPv4 which can be used for flow steering.  (The filters
> are organised as a hash table, but matched based on 5-tuples.)  I
> implemented the 'accelerated RFS' interface in this driver.
>
> I believe the Intel 82599 controllers (ixgbe driver) have both
> hash-based and perfect filter modes and the driver can be configured to
> use one or the other.  The driver has its own independent mechanism for
> steering RX and TX flows which predates RFS; I don't know whether it
> uses hash-based or perfect filters.

As far as I see, their driver predates RFS by binding the TX queue and 
RX queue to the same CPU and adding hash based filter during packet 
transmission.

> Most multi-queue controllers could support a kind of hash-based
> filtering for TCP/IP by adjusting the RSS indirection table.  However,
> this table is usually quite small (64-256 entries).  This means that
> hash collisions will be quite common and this can result in reordering.
> The same applies to the small table Jason has proposed for virtio-net.
>

Thanks for the clarification. Consider the hash were provided by host 
nic or host kernel, the collision rate is not fixed. Perfect filter is 
more suitable then.
>> So in host, a simple hash to queue table were introduced in tap/macvtap
>> and in guest, the guest driver would tell the desired queue of a flow
>> through changing this table.
> I don't think accelerated RFS can work well without the use of perfect
> filtering or hash-based filtering with a very low rate of collisions.
>
> Ben.
>

  reply	other threads:[~2011-12-08 10:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05  8:58 [net-next RFC PATCH 0/5] Series short description Jason Wang
2011-12-05  8:58 ` [net-next RFC PATCH 1/5] virtio_net: passing rxhash through vnet_hdr Jason Wang
2011-12-05  8:58 ` [net-next RFC PATCH 2/5] tuntap: simple flow director support Jason Wang
2011-12-05 10:38   ` Stefan Hajnoczi
2011-12-05 20:09   ` Ben Hutchings
     [not found]   ` <1323115763.2887.12.camel@bwh-desktop>
2011-12-06  7:21     ` Jason Wang
2011-12-06 17:31       ` Ben Hutchings
2011-12-05  8:59 ` [net-next RFC PATCH 3/5] macvtap: " Jason Wang
2011-12-05 20:11   ` Ben Hutchings
2011-12-05  8:59 ` [net-next RFC PATCH 4/5] virtio: introduce a method to get the irq of a specific virtqueue Jason Wang
2011-12-05  8:59 ` [net-next RFC PATCH 5/5] virtio-net: flow director support Jason Wang
     [not found] ` <20111205085925.6116.94352.stgit@dhcp-8-146.nay.redhat.com>
2011-12-05 10:55   ` Stefan Hajnoczi
2011-12-06  6:33     ` Jason Wang
2011-12-06  9:18       ` Stefan Hajnoczi
     [not found]       ` <CAJSP0QX5dDkpX+cRcQut2mb6K91zeqGLRrZBGAWT_r2p685gaQ@mail.gmail.com>
2011-12-06 10:21         ` Jason Wang
2011-12-06 13:15           ` Stefan Hajnoczi
     [not found]           ` <CAJSP0QXsLwvH5xYj6h0E_V4VLg6DuUc-GKXu9esEYzL2MFcFGw@mail.gmail.com>
2011-12-06 15:42             ` Sridhar Samudrala
2011-12-07  3:03             ` Jason Wang
2011-12-07  9:08               ` Stefan Hajnoczi
2011-12-07 12:10                 ` Jason Wang
2011-12-07 15:04                   ` Stefan Hajnoczi
     [not found]             ` <4EDE37FE.5090409@us.ibm.com>
2011-12-06 16:14               ` Michael S. Tsirkin
2011-12-06 23:10                 ` Sridhar Samudrala
2011-12-07 11:05                   ` Jason Wang
2011-12-07 11:02               ` Jason Wang
2011-12-09  2:00                 ` Sridhar Samudrala
2011-12-05 20:42   ` Ben Hutchings
2011-12-06  7:25     ` Jason Wang
2011-12-06 17:36       ` Ben Hutchings
2011-12-07  7:30 ` [net-next RFC PATCH 0/5] Series short description Rusty Russell
     [not found] ` <87ty5cj0sw.fsf@rustcorp.com.au>
2011-12-07 11:31   ` Jason Wang
2011-12-07 17:02     ` Ben Hutchings
2011-12-08 10:06       ` Jason Wang [this message]
2011-12-09  5:31       ` Rusty Russell
2011-12-15  1:36         ` Ben Hutchings
2011-12-15 23:12           ` Rusty Russell

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=4EE08C3D.5080306@redhat.com \
    --to=jasowang@redhat.com \
    --cc=bhutchings@solarflare.com \
    --cc=krkumar2@in.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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).