netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Paul Durrant <Paul.Durrant@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	David Vrabel <david.vrabel@citrix.com>,
	Malcolm Crossley <malcolm.crossley@citrix.com>,
	David Miller <davem@davemloft.net>
Subject: netfront: Compound pages problem
Date: Tue, 3 Jun 2014 23:03:17 +0100	[thread overview]
Message-ID: <538E4625.3080804@citrix.com> (raw)

Hi,

There were already discussions on this list and at Xen Hackathon about a 
netback/netfront issue:

http://lists.xenproject.org/archives/html/xen-devel/2014-06/msg00300.html

In a nutshell: due to compound pages an skb can consume more slots than 
we can transfer for a single packet. Lots of ideas came up about how to 
solve this problem, the preferred short term one is to poke the buffer 
layout of the affected skbs so they will finally fit onto the ring.
That might sound simple, but after 2 days of implementing an algorithm, 
which is:
- handle all the possible weird scenarios
- try to do as few memcpy's as possible
I can tell that it's not :). Now I'm at 110 lines without comments, and 
it's not ready yet.

Paul came up with an idea today: we can call dev_gso_segment() which 
will slice up the problematic skb into MTU size chunks. Then we can add 
this list of skbs to our queues and transmit them separately.

Pros:
- it already exists and works
- doesn't copy the payload apart from the headers

Cons:
- it is also very complicated, but at least a well tested code
- it creates new skbs and copies the header there, worst case 
max_gso_size / MTU times

I tend to say this could be a good solution for us, but I want to hear 
other opinions as well.

Regards,

Zoli

                 reply	other threads:[~2014-06-03 22:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=538E4625.3080804@citrix.com \
    --to=zoltan.kiss@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=davem@davemloft.net \
    --cc=david.vrabel@citrix.com \
    --cc=malcolm.crossley@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@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).