From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
"Microchip Linux Driver Support" <UNGLinuxDriver@microchip.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ralf Baechle <ralf@linux-mips.org>,
"Paul Burton" <paul.burton@mips.com>,
James Hogan <jhogan@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
<linux-mips@vger.kernel.org>, <devicetree@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam
Date: Mon, 24 Feb 2020 12:03:50 +0100 [thread overview]
Message-ID: <20200224110350.7kdzf4kml4iaem4i@soft-dev3.microsemi.net> (raw)
In-Reply-To: <CA+h21hoSA5DECsA+faJ91n0jBhAR5BZnkMm=Dx4JfNDp8J+xbw@mail.gmail.com>
Hi Vladimir,
The 02/24/2020 12:38, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Hi Horatiu,
>
> On Fri, 31 May 2019 at 10:18, Horatiu Vultur
> <horatiu.vultur@microchip.com> wrote:
> >
> > Add ACL support using the TCAM. Using ACL it is possible to create rules
> > in hardware to filter/redirect frames.
> >
> > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> > ---
> > arch/mips/boot/dts/mscc/ocelot.dtsi | 5 +-
> > drivers/net/ethernet/mscc/Makefile | 2 +-
> > drivers/net/ethernet/mscc/ocelot.c | 13 +
> > drivers/net/ethernet/mscc/ocelot.h | 8 +
> > drivers/net/ethernet/mscc/ocelot_ace.c | 777 +++++++++++++++++++++++++++++++
> > drivers/net/ethernet/mscc/ocelot_ace.h | 227 +++++++++
> > drivers/net/ethernet/mscc/ocelot_board.c | 1 +
> > drivers/net/ethernet/mscc/ocelot_regs.c | 11 +
> > drivers/net/ethernet/mscc/ocelot_s2.h | 64 +++
> > drivers/net/ethernet/mscc/ocelot_vcap.h | 403 ++++++++++++++++
> > 10 files changed, 1508 insertions(+), 3 deletions(-)
> > create mode 100644 drivers/net/ethernet/mscc/ocelot_ace.c
> > create mode 100644 drivers/net/ethernet/mscc/ocelot_ace.h
> > create mode 100644 drivers/net/ethernet/mscc/ocelot_s2.h
> > create mode 100644 drivers/net/ethernet/mscc/ocelot_vcap.h
> >
>
> I was testing this functionality and it looks like the MAC_ETYPE keys
> (src_mac, dst_mac) only match non-IP frames.
> Example, this rule doesn't drop ping traffic:
>
> tc qdisc add dev swp0 clsact
> tc filter add dev swp0 ingress flower skip_sw dst_mac
> 96:e1:ef:64:1b:44 action drop
>
> Would it be possible to do anything about that?
What you could do is to configure each port in such a way, to treat IP
frames as MAC_ETYPE frames. Have a look in ANA:PORT[0-11]:VCAP_S2_CFG.
There might be a problem with this approach. If you configure the port
in such a way, then all your rules with the keys IP6, IP4 will not be
match on that port.
>
> Thanks,
> -Vladimir
--
/Horatiu
next prev parent reply other threads:[~2020-02-24 11:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 7:16 [PATCH net-next v3 0/2] Add hw offload of TC flower on MSCC Ocelot Horatiu Vultur
2019-05-31 7:16 ` [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam Horatiu Vultur
2020-02-24 10:38 ` Vladimir Oltean
2020-02-24 11:03 ` Horatiu Vultur [this message]
2020-02-24 11:32 ` Vladimir Oltean
2020-04-22 21:26 ` Vladimir Oltean
2020-04-23 8:29 ` Horatiu Vultur
2020-04-23 9:18 ` Vladimir Oltean
2020-09-24 23:39 ` Vladimir Oltean
2020-09-26 11:20 ` Horatiu Vultur
2020-09-26 12:37 ` Vladimir Oltean
2020-09-26 18:55 ` Horatiu Vultur
2020-09-26 19:06 ` Vladimir Oltean
2019-05-31 7:16 ` [PATCH net-next v3 2/2] net: mscc: ocelot: Hardware ofload for tc flower filter Horatiu Vultur
2019-06-02 20:50 ` [PATCH net-next v3 0/2] Add hw offload of TC flower on MSCC Ocelot 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=20200224110350.7kdzf4kml4iaem4i@soft-dev3.microsemi.net \
--to=horatiu.vultur@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
/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).