Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jesse Gross <jesse@nicira.com>
Cc: Roger Luethi <rl@hellgate.ch>,
	netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: Re: VLAN packets silently dropped in promiscuous mode
Date: Fri, 01 Oct 2010 07:10:31 +0200	[thread overview]
Message-ID: <1285909831.2705.41.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTi=Vdcn7xzJMPxkugvEVy32N7Bp=KVtir6NESnDF@mail.gmail.com>

Le jeudi 30 septembre 2010 à 19:37 -0700, Jesse Gross a écrit :

> 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.

This seems very reasonable ;)

I'll add a counter, a core generalization of 
commit 8990f468a (net: rx_dropped accounting)

Because we can drop packets _after_ netif_rx() if RPS is in action
anyway.




  reply	other threads:[~2010-10-01  5:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-29 11:37 VLAN packets silently dropped in promiscuous mode Roger Luethi
2010-09-29 17:44 ` Jesse Gross
2010-09-30  8:07   ` Roger Luethi
2010-09-30  9:16     ` Eric Dumazet
2010-09-30  9:55       ` Eric Dumazet
2010-09-30 10:40         ` Eric Dumazet
2010-09-30 10:50           ` Patrick McHardy
2010-09-30 12:16             ` Eric Dumazet
2010-10-01  1:04               ` David Miller
2010-09-30 21:21     ` Jesse Gross
2010-09-30 22:04       ` Eric Dumazet
2010-10-01  2:37         ` Jesse Gross
2010-10-01  5:10           ` Eric Dumazet [this message]
2010-10-01  7:06             ` [PATCH net-next] net: add a core netdev->rx_dropped counter Eric Dumazet
2010-10-04 20:27               ` Jesse Gross
2010-10-05 21:48               ` David Miller
2010-10-01  8:41             ` VLAN packets silently dropped in promiscuous mode Eric Dumazet
2010-10-04 20:21               ` Jesse Gross
2010-10-15  9:16       ` Guillaume Gaudonville
2010-10-15 21:33         ` Jesse Gross
2010-10-25 13:48           ` Guillaume Gaudonville
2010-10-26  0:40             ` Jesse Gross
2010-10-27  8:32               ` Guillaume Gaudonville

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=1285909831.2705.41.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=jesse@nicira.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=rl@hellgate.ch \
    /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