netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: "Jakub Kicinski" <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, "Claudiu Manoil" <claudiu.manoil@nxp.com>,
	"Alexandru Marginean" <alexandru.marginean@nxp.com>,
	"Vladimir Oltean" <vladimir.oltean@nxp.com>,
	"Markus Blöchl" <Markus.Bloechl@ipetronik.com>
Subject: Re: [PATCH v2 net 5/6] net: enetc: don't disable VLAN filtering in IFF_PROMISC mode
Date: Sat, 27 Feb 2021 14:18:20 +0100	[thread overview]
Message-ID: <7bb61f7190bebadb9b6281cb02fa103d@walle.cc> (raw)
In-Reply-To: <20210227001651.geuv4pt2bxkzuz5d@skbuf>

Am 2021-02-27 01:16, schrieb Vladimir Oltean:
> On Fri, Feb 26, 2021 at 03:49:22PM -0800, Jakub Kicinski wrote:
>> On Sat, 27 Feb 2021 01:42:44 +0200 Vladimir Oltean wrote:
>> > On Fri, Feb 26, 2021 at 03:28:36PM -0800, Jakub Kicinski wrote:
>> > > I don't understand what you're fixing tho.
>> > >
>> > > Are we trying to establish vlan-filter-on as the expected behavior?
>> >
>> > What I'm fixing is unexpected behavior, according to the applicable
>> > standards I could find.

In the referenced thread you quoted from the IEEE802.3 about the promisc
mode.
   The MAC sublayer may also provide the capability of operating in the
   promiscuous receive mode. In this mode of operation, the MAC sublayer
   recognizes and accepts all valid frames, regardless of their 
Destination
   Address field values.

Your argument was that the standard just talks about disabling the DMAC
filter. But was that really the _intention_ of the standard? Does the
standard even mention a possible vlan tag? What I mean is: maybe the
standard just mention the DMAC because it is the only filtering 
mechanism
in this standard and it's enough to disable it to "accept all valid 
frames".

I was biten by "the NIC drops frames with an unknown VLAN" even if
promisc mode was enabled. And IMHO it was quite suprising for me.

>> > If I don't mark this change as a bug fix but as
>> > a simple patch, somebody could claim it's a regression, since promiscuity
>> > used to be enough to see packets with unknown VLANs, and now it no
>> > longer is...
>> 
>> Can we take it into net-next? What's your feeling on that option?
> 
> I see how you can view this patch as pointless, but there is some
> context to it. It isn't just for tcpdump/debugging, instead NXP has 
> some
> TSN use cases which involve some asymmetric tc-vlan rules, which is how
> I arrived at this topic in the first place. I've already established
> that tc-vlan only works with ethtool -K eth0 rx-vlan-filter off:
> https://lore.kernel.org/netdev/CA+h21hoxwRdhq4y+w8Kwgm74d4cA0xLeiHTrmT-VpSaM7obhkg@mail.gmail.com/

Wasn't the conclusion that the VID should be added to the filter so it
also works with vlan filter enabled? Am I missing another discussion?

-michael

> and that's what we recommend doing, but while adding the support for
> rx-vlan-filter in enetc I accidentally created another possibility for
> this to work on enetc, by turning IFF_PROMISC on. This is not portable,
> so if somebody develops a solution based on that in parallel, it will
> most certainly break on other non-enetc drivers.
> NXP has not released a kernel based on the v5.10 stable yet, so there 
> is
> still time to change the behavior, but if this goes in through 
> net-next,
> the apparent regression will only be visible when the next LTS comes
> around (whatever the number of that might be). Now, I'm going to
> backport this to the NXP v5.10 anyway, so that's not an issue, but 
> there
> will still be the mild annoyance that the upstream v5.10 will behave
> differently in this regard compared to the NXP v5.10, which is again a
> point of potential confusion, but that seems to be out of my control.
> 
> So if you're still "yeah, don't care", then I guess I'm ok with leaving
> things alone on stable kernels.

  parent reply	other threads:[~2021-02-27 13:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 12:18 [PATCH v2 net 0/6] Fixes for NXP ENETC driver Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 1/6] net: enetc: don't overwrite the RSS indirection table when initializing Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 2/6] net: enetc: initialize RFS/RSS memories for unused ports too Vladimir Oltean
2021-02-27 13:19   ` Michael Walle
2021-02-25 12:18 ` [PATCH v2 net 3/6] net: enetc: take the MDIO lock only once per NAPI poll cycle Vladimir Oltean
2021-02-25 22:52   ` Andrew Lunn
2021-02-25 23:00     ` Vladimir Oltean
2021-02-25 23:08       ` Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 4/6] net: enetc: fix incorrect TPID when receiving 802.1ad tagged packets Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 5/6] net: enetc: don't disable VLAN filtering in IFF_PROMISC mode Vladimir Oltean
2021-02-26 23:28   ` Jakub Kicinski
2021-02-26 23:42     ` Vladimir Oltean
2021-02-26 23:49       ` Jakub Kicinski
2021-02-27  0:16         ` Vladimir Oltean
2021-02-27  0:45           ` Jakub Kicinski
2021-02-27  0:49             ` Vladimir Oltean
2021-02-27 13:18           ` Michael Walle [this message]
2021-02-28 22:48             ` Vladimir Oltean
2021-03-01 14:36               ` Michael Walle
2021-03-01 15:08                 ` Vladimir Oltean
2021-03-01 16:26                   ` Markus Blöchl
2021-03-01 17:02                     ` Vladimir Oltean
2021-03-01 20:17                       ` Jakub Kicinski
2021-02-25 12:18 ` [PATCH v2 net 6/6] net: enetc: force the RGMII speed and duplex instead of operating in inband mode Vladimir Oltean
2021-02-25 17:14   ` Russell King - ARM Linux admin

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=7bb61f7190bebadb9b6281cb02fa103d@walle.cc \
    --to=michael@walle.cc \
    --cc=Markus.Bloechl@ipetronik.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vladimir.oltean@nxp.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).