netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Andrew Bennieston <andrew.bennieston@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>, <xen-devel@lists.xenproject.org>,
	<ian.campbell@citrix.com>, <paul.durrant@citrix.com>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH V2 net-next 0/5] xen-net{back,front}: Multiple transmit and receive queues
Date: Fri, 14 Feb 2014 15:52:36 +0000	[thread overview]
Message-ID: <20140214155236.GF18398@zion.uk.xensource.com> (raw)
In-Reply-To: <52FE390B.3020102@citrix.com>

On Fri, Feb 14, 2014 at 03:40:59PM +0000, Andrew Bennieston wrote:
[...]
> >Wei.
> 
> Let me attempt to clear this up. Bear with me...
> 
> Queue selection is a decision by a transmitting system about which
> queue it uses for a particular packet. A well-behaved receiving
> system will pick up packets on any queue and throw them up into its
> network stack as normal. In this manner, the details of queue
> selection don't matter from the point of view of a receiving guest
> (either frontend or backend). That is; if a "malicious" frontend
> sends all of its packets on a single queue, then it is only damaging
> itself - by reducing its effective throughput to that of a single
> queue. This will not cause a problem to the backend. The same goes
> for the "select a random queue" scenario, although here you probably
> shouldn't expect decent TCP performance. Certainly there will be no
> badness in terms of affecting the backend or other systems, beyond
> that which a guest could achieve with a broken TCP stack anyway.
> 

Cool, this is much clearer about this feature and what I want to know.
In a word, there's no coupling what's so ever when frontend / backend
select which algorithm to use. Then there's nothing to fix. Thank you
for being patient to explain it to a dumb guy. :-)

> In light of this, algorithm selection is (mostly) a function of the
> transmitting side. The receiving side should be prepared to receive
> packets on any of the legitimately established queues. It just
> happens that the Linux netback and Linux netfront both use
> skb_get_hash() to determine this value.
> 

I somehow had the impression that two ends need to use the same
algorithm. They just happen to be using the same algorithm in the
current implementation. I understand now.

> In the future, some frontends (i.e. Windows) may need to do complex
> things like pushing hash state to the backend. This will be taken
> care of with extensions to the protocol at the point these are
> implemented.
> 

As long as this doesn't break that "no coupling" condition it is fine.

Wei.

> Andrew.
> 
> >
> >>Andrew.
> >>>
> >>>I don't see relevant code in this series to handle "rogue other end". I
> >>>presume for a simple hash algorithm like L4 is not very important (say,
> >>>even a packet ends up in the wrong queue we can still safely process
> >>>it), or core driver can deal with this all by itself (dropping)?
> >>>
> >>>Wei.
> >>>

      reply	other threads:[~2014-02-14 15:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 11:50 [PATCH V2 net-next 0/5] xen-net{back, front}: Multiple transmit and receive queues Andrew J. Bennieston
2014-02-14 11:50 ` [PATCH V2 net-next 1/5] xen-netback: Factor queue-specific data into queue struct Andrew J. Bennieston
2014-02-14 11:50 ` [PATCH V2 net-next 2/5] xen-netback: Add support for multiple queues Andrew J. Bennieston
2014-02-14 14:11   ` Wei Liu
2014-02-14 14:57     ` Andrew Bennieston
2014-02-14 15:36       ` Wei Liu
2014-02-14 15:42         ` Andrew Bennieston
2014-02-14 11:50 ` [PATCH V2 net-next 3/5] xen-netfront: Factor queue-specific data into queue struct Andrew J. Bennieston
2014-02-14 11:50 ` [PATCH V2 net-next 4/5] xen-netfront: Add support for multiple queues Andrew J. Bennieston
2014-02-14 14:13   ` Wei Liu
2014-02-14 14:58     ` Andrew Bennieston
2014-02-14 11:50 ` [PATCH V2 net-next 5/5] xen-net{back, front}: Document multi-queue feature in netif.h Andrew J. Bennieston
2014-02-14 14:06 ` [PATCH V2 net-next 0/5] xen-net{back,front}: Multiple transmit and receive queues Wei Liu
2014-02-14 14:53   ` Andrew Bennieston
2014-02-14 15:25     ` Wei Liu
2014-02-14 15:40       ` Andrew Bennieston
2014-02-14 15:52         ` Wei Liu [this message]

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=20140214155236.GF18398@zion.uk.xensource.com \
    --to=wei.liu2@citrix.com \
    --cc=andrew.bennieston@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.durrant@citrix.com \
    --cc=xen-devel@lists.xenproject.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).