virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Krishna Kumar2 <krkumar2@in.ibm.com>
Cc: arnd@arndb.de, "Michael S. Tsirkin" <mst@redhat.com>,
	netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	levinsasha928@gmail.com, davem@davemloft.net
Subject: Re: [PATCH] macvtap: Fix macvtap_get_queue to use rxhash first
Date: Fri, 25 Nov 2011 11:21:57 +0800	[thread overview]
Message-ID: <4ECF09D5.4010700@redhat.com> (raw)
In-Reply-To: <OF86B15006.7F4BE3FB-ON65257953.00104C3E-65257953.0010EFCA@in.ibm.com>

On 11/25/2011 11:07 AM, Krishna Kumar2 wrote:
> "Michael S. Tsirkin"<mst@redhat.com>  wrote on 11/24/2011 09:44:31 PM:
>
>>> As far as I can see, ixgbe binds queues to physical cpu, so let
> consider:
>>> vhost thread transmits packets of flow A on processor M
>>> during packet transmission, ixgbe driver programs the card to
>>> deliver the packet of flow A to queue/cpu M through flow director
>>> (see ixgbe_atr())
>>> vhost thread then receives packet of flow A with from M
>>> ...
>>> vhost thread transmits packets of flow A on processor N
>>> ixgbe driver programs the flow director to change the delivery of
>>> flow A to queue N ( cpu N )
>>> vhost thread then receives packet of flow A with from N
>>> ...
>>>
>>> So, for a single flow A, we may get different queue mappings. Using
>>> rxhash instead may solve this issue.
>> Or better, transmit a single flow from a single vhost thread.
>>
>> If packets of a single flow get spread over different CPUs,
>> they will get reordered and things are not going to work well.
> My testing so far shows that guest sends on (e.g.) TXQ#2
> only, which is handled by vhost#2; and this doesn't change
> for the entire duration of the test. Incoming keeps
> changing for different packets but become same with
> this patch. To iterate, I have not seen the following:

Yes because guest chose the txq of virtio-net based on hash.

>
> "
> vhost thread transmits packets of flow A on processor M
> ...
> vhost thread transmits packets of flow A on processor N
> "

My description is not clear again :(
I mean the same vhost thead:

vhost thread #0 transmits packets of flow A on processor M
...
vhost thread #0 move to another process N and start to transmit packets 
of flow A

> - KK
>

  parent reply	other threads:[~2011-11-25  3:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24  8:17 [PATCH] macvtap: Fix macvtap_get_queue to use rxhash first Krishna Kumar
2011-11-24  9:36 ` jasowang
2011-11-24  9:59 ` Michael S. Tsirkin
2011-11-24 10:13   ` jasowang
2011-11-24 10:34     ` Michael S. Tsirkin
2011-11-24 12:56       ` jasowang
2011-11-24 16:14         ` Michael S. Tsirkin
2011-11-25  3:07           ` Krishna Kumar2
2011-11-25  3:09           ` Jason Wang
     [not found]           ` <OF86B15006.7F4BE3FB-ON65257953.00104C3E-65257953.0010EFCA@in.ibm.com>
2011-11-25  3:21             ` Jason Wang [this message]
2011-11-25  4:09               ` Krishna Kumar2
2011-11-25  6:35                 ` David Miller
2011-11-27 17:23                   ` Michael S. Tsirkin
2011-11-28  4:40                     ` Jason Wang
2011-12-07 16:10                   ` Michael S. Tsirkin
2011-12-07 18:52                     ` David Miller
2011-12-20 11:15                       ` Michael S. Tsirkin
2011-12-20 18:46                         ` David Miller
2011-12-08  9:46                     ` Jason Wang
2011-11-27 17:14                 ` Michael S. Tsirkin
2011-11-28  4:25                 ` Jason Wang
2011-11-28 17:42                   ` Stephen Hemminger
2011-11-24 11:14   ` Krishna Kumar2
     [not found]   ` <OF12661931.5C4899F8-ON65257952.003B84A6-65257952.003D8DA6@in.ibm.com>
2011-11-24 13:00     ` jasowang
2011-11-24 16:12       ` Michael S. Tsirkin
2011-11-25  2:58       ` Krishna Kumar2
     [not found]       ` <OF2886C7FB.135CFC23-ON65257953.000F9C8A-65257953.00101CBF@in.ibm.com>
2011-11-25  3:18         ` Jason Wang

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=4ECF09D5.4010700@redhat.com \
    --to=jasowang@redhat.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=krkumar2@in.ibm.com \
    --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).