Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Antoine Reversat <a.reversat@gmail.com>
Cc: Stephen Hemminger <stephen.hemminger@vyatta.com>, netdev@vger.kernel.org
Subject: Re: [PATCH 001/001] forcedeth: Don't enable hardware vlan support on hardware that doesn't support it
Date: Thu, 16 Jun 2011 08:42:38 -0700	[thread overview]
Message-ID: <20110616084238.7830cd92@nehalam.ftrdhcpuser.net> (raw)
In-Reply-To: <BANLkTimqAXLDZ8cev5dgUTDR3pg-_Y3XUA@mail.gmail.com>

On Wed, 15 Jun 2011 17:08:18 -0400
Antoine Reversat <a.reversat@gmail.com> wrote:

> On Wed, Jun 15, 2011 at 4:53 PM, Stephen Hemminger
> <stephen.hemminger@vyatta.com> wrote:
> >
> > This shouldn't be necessary. rx_register should not be called
> > unless NETIF_F_HW_VLAN_RX is set; and device should not be setting
> > NETIF_F_HW_VLAN_RX unless DEV_HAS_VLAN is set.
> 
> I can confirm that rx_register gets called on hardware that doesn't
> have vlan support (namely MCP79).
> 
> From what I can see in vlan.c (in register_vlan_dev) there is no check
> on the features of the device before calling the register function :
> 
>     if (ngrp) {
>         if (ops->ndo_vlan_rx_register)
>             ops->ndo_vlan_rx_register(real_dev, ngrp);
>         rcu_assign_pointer(real_dev->vlgrp, ngrp);
>     }
> 
> If the function exists, it's called. Should I send a patch to call the
> function only if the hardware supports it ?
> 
> >
> > The real problem is vlan_dev.c, and applies to all devices.

That is was suggesting because other drivers may have the same issue
where they need to define rx_register for some hardware and control
usage of vlan by the feature bits.

  reply	other threads:[~2011-06-16 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <25664046.71236.1308171027618.JavaMail.root@tahiti.vyatta.com>
2011-06-15 20:53 ` [PATCH 001/001] forcedeth: Don't enable hardware vlan support on hardware that doesn't support it Stephen Hemminger
2011-06-15 21:08   ` Antoine Reversat
2011-06-16 15:42     ` Stephen Hemminger [this message]
2011-06-15 20:17 Antoine Reversat

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=20110616084238.7830cd92@nehalam.ftrdhcpuser.net \
    --to=shemminger@vyatta.com \
    --cc=a.reversat@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen.hemminger@vyatta.com \
    /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