Netdev List
 help / color / mirror / Atom feed
From: Antoine Reversat <a.reversat@gmail.com>
To: Stephen Hemminger <stephen.hemminger@vyatta.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 001/001] forcedeth: Don't enable hardware vlan support on hardware that doesn't support it
Date: Wed, 15 Jun 2011 17:08:18 -0400	[thread overview]
Message-ID: <BANLkTimqAXLDZ8cev5dgUTDR3pg-_Y3XUA@mail.gmail.com> (raw)
In-Reply-To: <585670083.71238.1308171180725.JavaMail.root@tahiti.vyatta.com>

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

  reply	other threads:[~2011-06-15 21:08 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 [this message]
2011-06-16 15:42     ` Stephen Hemminger
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=BANLkTimqAXLDZ8cev5dgUTDR3pg-_Y3XUA@mail.gmail.com \
    --to=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