On Thu, Nov 13, 2014 at 04:19:23PM +0100, Martin Pieuchot wrote:
> On 12/11/14(Wed) 00:22, Rafael Zalamena wrote:
> > The diff attached to this mail fixes the bridge output for VLANs noted in
> > this link:
> > http://marc.info/?l=openbsd-misc&m=141508025731320&w=2
> > 
> > Now when we are doing VLAN input we check whether the VLAN is a bridge port
> > or not, if it does then we have to do nothing and just pass the packet and
> > the bridge will handle it. This way we save some time by not doing VLAN
> > popping in the packets.
> 
> In this case, would it makes more sense to move the vlan_input() chunk 
> after the bridge_input() one in ether_input()?

The problem: (long answer)
It seems so, but this way (1) we are doing unnecessary VLAN popping (when
QinQ or no HW VLAN support), (2) we would have to add more code to do tag
re-insertion (the whole point of no (1)) and (3) it seems to be not working
with QinQ in the current code.

The whole problem with the bridge is that it shoves the packets directly
in the interface, and the VLANs no longer do tag insertion in if_start.
(which didn't look right btw)
We would assume that ether_output is always called, but in the bridge case
it assumes that the packet is already ready (ether_output was called),
so it looks to me to be 'more right' that we keep this promise to the bridge.
Otherwise we would have to add more VLAN code to the bridge or handle VLAN
cases everywhere receiving packets from the bridge.


Conclusion: (short answer)
The problem with moving the vlan_input chunk is that we have to do tag
re-insertion in some cases, might break QinQ and it looks to be a more
intrusive code change than it is with this diff.

>  
> > --- snipped ---

Reply via email to