qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3] rtl8139: add vlan support
Date: Fri, 25 Feb 2011 19:39:58 -0500	[thread overview]
Message-ID: <1298680800-22995-1-git-send-email-benjamin.poirier@gmail.com> (raw)

I've posted v2 of these patches back in november
http://article.gmane.org/gmane.comp.emulators.qemu/84252

Changes since v2:

insertion:
	* moved insertion later in the process, to handle tso
	* use qemu_sendv_packet() to insert the tag for us
	* added dot1q_buf parameter to rtl8139_do_receive() to avoid some
	  memcpy() in loopback mode. Note that the code path through that
	  function is unchanged when dot1q_buf is NULL.

extraction:
	* reduced the amount of copying by moving the "frame too short" logic
	  after the removal of the vlan tag (as is done in e1000.c for
	  example). Unfortunately, that logic can no longer be shared betwen
	  C+ and C mode.

I've tested on the following combinations of guest and hosts:
host: x86_64, guest: x86_64
host: x86_64, guest: ppc32
host: ppc32, guest: ppc32

Testing on the x86_64 host used '-net tap' and consisted of:
* making an http transfert on the untagged interface.
* ping -s 0-1472 to another host on a vlan.
* making an scp upload to another host on a vlan.

Testing on the ppc32 host used '-net socket' connected to an x86_64 qemu-kvm
running the virtio nic and consisted of:
* establishing an ssh connection between the two using an untagged interface.
* ping -s 0-1472 to the ppc32 using a vlan.
* making an scp transfer in both directions using a vlan.

All that was successful. Nevertheless, it doesn't exercise all code paths so
care is in order.

Please note that the lack of vlan support in rtl8139 has taken a few people
aback:
https://bugzilla.redhat.com/show_bug.cgi?id=516587
http://article.gmane.org/gmane.linux.network.general/14266

Thanks,
-Ben

             reply	other threads:[~2011-02-26  0:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26  0:39 Benjamin Poirier [this message]
2011-02-26  0:39 ` [Qemu-devel] [PATCH v3 1/2] rtl8139: add vlan tag insertion Benjamin Poirier
2011-02-26 16:51   ` Blue Swirl
2011-02-26  0:40 ` [Qemu-devel] [PATCH v3 2/2] rtl8139: add vlan tag extraction Benjamin Poirier
2011-02-26 16:58   ` Blue Swirl
2011-02-28  9:14   ` Jason Wang
2011-02-28  8:42 ` [Qemu-devel] [PATCH v3] rtl8139: add vlan support 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=1298680800-22995-1-git-send-email-benjamin.poirier@gmail.com \
    --to=benjamin.poirier@gmail.com \
    --cc=qemu-devel@nongnu.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).