netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
To: Alexandre DERUMIER <aderumier@odiso.com>
Cc: netdev@vger.kernel.org, Vlad Yasevich <vyasevic@redhat.com>
Subject: Re: bridge vlan_filtering don't work with tap devices (qemu guests)
Date: Fri, 27 Dec 2013 17:28:37 +0900	[thread overview]
Message-ID: <1388132917.8290.22.camel@ubuntu-vm-makita> (raw)
In-Reply-To: <eb3c68d9-fa1b-402a-9416-1ea38a78b68b@mailpro>

2013-12-26 (木) の 14:57 +0100 に Alexandre DERUMIER さんは書きました:
> Hello Again,
> 
> One more question :
> 
> If I use tcpdump on br0, I don't see any tagged vlan10 packets on the bridge.
> with 
> # bridge vlan add dev tap0 vid 10 pvid untagged 
> # bridge vlan add dev tap1 vid 10 pvid untagged 

With these settings, you should be able to see tagged frames on bridge
device with promisc mode.
Are you sure you enabled vlan_filtering by sysfs?
Or didn't you set br0 in the same way as other ports like below?
# bridge vlan add dev br0 vid 10 pvid untagged self

> 
> 
> What I would like to do, is tagging vlan10, incoming (untagged) packets from tap0 and tap1.
> 
> Is it possible ?

If you set pvid, incoming frames from the port will be tagged with the
vlan.
If you set untagged, outgoing frames with the vlan from the port will be
untagged.

So, if you want to send frames tagged with vlan 10, please don't set vid
10 untagged on outgoing ports you want.


BTW:
(CC: Vlad)
I tested to execute tcpdump on br0 with vlan_filtering enabled, but
kernel panic occurred with upstream net-tree kernel. br_handle_vlan()
seems to have a bug that it doesn't check pv is NULL or not.
br_pass_frame_up() calls br_handle_vlan() even if br->vlan_info is NULL
when bridge device is promisc mode.
This will occur if we don't add any vlan on the bridge device.
I'm going to make a patch to fix it.

Thanks,
Toshiaki Makita

> 
> With openvswitch, I can do it simply with "ovs-vsctl set port tap0 tag=10"
> 

  reply	other threads:[~2013-12-27  8:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <04e69925-f469-49b2-9988-9077eb7d50d7@mailpro>
2013-12-23 16:02 ` bridge vlan_filtering don't work with tap devices (qemu guests) Alexandre DERUMIER
2013-12-24 12:45   ` Toshiaki Makita
2013-12-24 19:28     ` Alexandre DERUMIER
2013-12-26 13:57       ` Alexandre DERUMIER
2013-12-27  8:28         ` Toshiaki Makita [this message]
2013-12-27  9:46           ` Alexandre DERUMIER
2013-12-27 16:17             ` Alexandre DERUMIER
2013-12-28 13:00               ` Toshiaki Makita
2014-01-03 15:33                 ` Vlad Yasevich

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=1388132917.8290.22.camel@ubuntu-vm-makita \
    --to=makita.toshiaki@lab.ntt.co.jp \
    --cc=aderumier@odiso.com \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevic@redhat.com \
    /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).