From: Jiri Pirko <jiri@resnulli.us>
To: David Miller <davem@davemloft.net>
Cc: ivecera@redhat.com, netdev@vger.kernel.org, rmody@brocade.com
Subject: Re: [PATCH net] bna: don't disable VLAN tag stripping in promisc mode
Date: Fri, 28 Feb 2014 07:31:42 +0100 [thread overview]
Message-ID: <20140228063142.GA2823@minipsycho.orion> (raw)
In-Reply-To: <20140227.172403.1870812305847598692.davem@davemloft.net>
Thu, Feb 27, 2014 at 11:24:03PM CET, davem@davemloft.net wrote:
>From: Ivan Vecera <ivecera@redhat.com>
>Date: Thu, 27 Feb 2014 19:17:22 +0100
>
>> The recent commit "fe1624c bna: RX Filter Enhancements" disables
>> VLAN tag stripping if the NIC is in promiscuous mode. Received VLAN tagged
>> packets are recognized by the driver via BNA_CQ_EF_VLAN flag and for such
>> packets the driver calls __vlan_hwaccel_put_tag(). The problem is the HW
>> marks the tagged packets with this flags also when the stripping is
>> disabled and thus __vlan_hwaccel_put_tag() should not be called for them.
>>
>> A solution can be to call __vlan_hwaccel_put_tag() only when stripping is
>> enabled or to leave VLAN stripping engine enabled. The 2nd restores the
>> previous behavior and is IMHO better.
>>
>> Cc: Rasesh Mody <rmody@brocade.com>
>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
>
>At best, this is an incomplete change, because if we fix it like this
>then the stripping enable/disable functions are completely unused and
>therefore should be removed from the driver.
>
>But I really thing that checking if stripping is enabled at the
>__vlan_hwaccel_put_tag() call site is the best solution.
>
>You just need to check rxf->vlan_strip_status in addition to the
>descriptor flag.
>
>Please implement it this way, thanks.
Dave, do you think that enabling/disabling of vlan stripping should
depend on promisc on/off? That seems very odd to me...
Jiri
>
>
>--
>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
next prev parent reply other threads:[~2014-02-28 6:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 18:17 [PATCH net] bna: don't disable VLAN tag stripping in promisc mode Ivan Vecera
2014-02-27 19:59 ` Jiri Pirko
2014-02-27 22:24 ` David Miller
2014-02-28 6:31 ` Jiri Pirko [this message]
2014-02-28 9:09 ` Ivan Vecera
2014-02-28 17:55 ` David Miller
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=20140228063142.GA2823@minipsycho.orion \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=ivecera@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rmody@brocade.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;
as well as URLs for NNTP newsgroup(s).