Hello, sorry about the delay, On Fri, 29 Aug 2014 15:10:46 +0800 Wei-Li Tang <[email protected]> wrote:
> I tried to add a flow which matches non-VLAN-tagged packets by specifying > VLAN_VID match field without OFPVID_PRESENT bit, but it didn't work. It > seems that Ryu always sets OXM_OF_VLAN_VID with OFPVID_PRESENT bit during > serialization in ofproto_v1_3_parser.MTVlanVid: > > class MTVlanVid(OFPMatchField): > pack_str = '!H' > > def __init__(self, header, value, mask=None): > super(MTVlanVid, self).__init__(header) > self.value = value > self.mask = mask > > @classmethod > def field_parser(cls, header, buf, offset): > m = super(MTVlanVid, cls).field_parser(header, buf, offset) > m.value &= ~ofproto.OFPVID_PRESENT > return m > > def serialize(self, buf, offset): > self.value |= ofproto.OFPVID_PRESENT > super(MTVlanVid, self).serialize(buf, offset) > > It makes OFPVID_NONE impossible to be assigned to OXM_OF_VLAN_VID as > described in Table 13, openflow spec 1.3.4. I'm not sure it's fine to > remove `self.value |= ofproto.OFPVID_PRESENT` if there have been many users > depend on it. If you use the new API such OFPMatch(vlan_vid=0), the above code is not used. With the new API, you need to specify OFPVID_PRESENT like OFPMatch(vlan_vid=0x1000|4) for match a specific vid. ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
