Re: VLAN packets silently dropped in promiscuous mode

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jesse Gross
Date: Thursday, September 30, 2010 - 7:37 pm

On Thu, Sep 30, 2010 at 3:04 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:

That's true.  Dropping here seems roughly equivalent to the effects of
a hardware VLAN filter, which will also not be tracked by a counter,
so that seems not too bad to me.

The thing that concerns me though is why so many drivers seem to have
this problem with completely dropping the VLAN header.  I know that
even several of the ones that work now were broken initially and had
to be fixed.  Seeing as the driver drops the VLAN information before
it gets to the general networking code I don't see a generic fix to
this as it is currently setup.  However, perhaps we could make it so
that it is harder to get wrong.  Something like this:

* Allow vlan_gro_receive() to take a NULL VLAN group and a tag of 0
(and do the same thing for vlan_hwaccel_rx())
* Now that the vlan functions can deal with non-VLAN packets, merge
them into their non-VLAN counterparts.
* We can now demultiplex between the VLAN/non-VLAN case in core
networking.  This is done anyways, it just prevents every driver from
needing that code block I copied above and allows us to fix these
types of problems centrally.
* Dump the VLAN tag into the SKB and hand off the packet to the
various consumers: VLAN devices, libpcap, bridge hook (not currently
done but should be for trunking).

I see a number of advantages of this:
* Fixes all the problems with cards dropping VLAN headers at once.
* Avoids having to disable VLAN acceleration when in promiscuous mode
(good for bridging since it always puts devices in promiscuous mode).
* Keeps VLAN tag separate until given to ultimate consumer, which
avoids needing to do header reconstruction as in tg3 unless absolutely
necessary.
* Consolidates common driver code in core networking.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: VLAN packets silently dropped in promiscuous mode, Jesse Gross, (Wed Sep 29, 10:44 am)
Re: VLAN packets silently dropped in promiscuous mode, Roger Luethi, (Thu Sep 30, 1:07 am)
Re: VLAN packets silently dropped in promiscuous mode, Eric Dumazet, (Thu Sep 30, 2:16 am)
Re: VLAN packets silently dropped in promiscuous mode, Eric Dumazet, (Thu Sep 30, 2:55 am)
Re: VLAN packets silently dropped in promiscuous mode, Eric Dumazet, (Thu Sep 30, 3:40 am)
Re: VLAN packets silently dropped in promiscuous mode, Patrick McHardy, (Thu Sep 30, 3:50 am)
Re: VLAN packets silently dropped in promiscuous mode, Eric Dumazet, (Thu Sep 30, 5:16 am)
Re: VLAN packets silently dropped in promiscuous mode, Jesse Gross, (Thu Sep 30, 2:21 pm)
Re: VLAN packets silently dropped in promiscuous mode, Eric Dumazet, (Thu Sep 30, 3:04 pm)
Re: VLAN packets silently dropped in promiscuous mode, David Miller, (Thu Sep 30, 6:04 pm)
Re: VLAN packets silently dropped in promiscuous mode, Jesse Gross, (Thu Sep 30, 7:37 pm)
Re: VLAN packets silently dropped in promiscuous mode, Eric Dumazet, (Thu Sep 30, 10:10 pm)
Re: VLAN packets silently dropped in promiscuous mode, Eric Dumazet, (Fri Oct 1, 1:41 am)
Re: VLAN packets silently dropped in promiscuous mode, Guillaume Gaudonville, (Fri Oct 15, 2:16 am)
Re: VLAN packets silently dropped in promiscuous mode, Jesse Gross, (Fri Oct 15, 2:33 pm)
Re: VLAN packets silently dropped in promiscuous mode, Guillaume Gaudonville, (Mon Oct 25, 6:48 am)
Re: VLAN packets silently dropped in promiscuous mode, Jesse Gross, (Mon Oct 25, 5:40 pm)
Re: VLAN packets silently dropped in promiscuous mode, Guillaume Gaudonville, (Wed Oct 27, 1:32 am)