On 07/20/09 13:47, Garrett D'Amore wrote: > Darren Reed wrote: > >> >> Should mac_header_len() return sizeof(struct ether_header) for >> packets with the VLAN header intact? >> Or would that be a bug? > > I don't know... I suspect its a bug, but that might depend on how the > client is used. I don't have any experience with the mac consumer > API. (Whose job is it to do vlan tag insertion? The mac layers, or > the clients?)
we're talking about a private function here, so as long as caller and callee codes know what they're doing there may be misnaming, but no bug. The second question about whose job is it to insert the vlan tag is an interesting one. As of the first phase of Crossbow, we opted for having by default the MAC layer be fully responsible for the VLAN, both insertion and stripping for inbound tagged packets. We offer an exception to that behavior: A client calling mac_unicast_add() may specify the flags (MAC_UNICAST_TAG_DISABLE | MAC_UNICAST_STRIP_DISABLE) asking for tagged packets to be left alone. Seen from the virtual machines that use VNICs, the default behavior offers a bump-in-the-wire support for the VLANs of some sort, with the host domain (or global zone as the case may be) ensuring the security of the tagging. The rationale behind the exception is to allow more sophisticated trusted clients (LDOM's vsw code running in the service domain) to take on the VLAN processing themselves. Kais. > > - Garrett > > _______________________________________________ > crossbow-discuss mailing list > crossbow-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/crossbow-discuss >