Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2288287ybv; Mon, 24 Feb 2020 02:39:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyvma3kbJGxHfhdOIYffgPX2bKheftz6vP5V5r0KS+W5J2Vdao/ShS6bVNHPlqKkOZCJ21M X-Received: by 2002:a9d:3cf:: with SMTP id f73mr39702099otf.11.1582540795551; Mon, 24 Feb 2020 02:39:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582540795; cv=none; d=google.com; s=arc-20160816; b=TgvVL67HqUs/L4vtOci54r66WG+Axdc+WguHWAIYWjzZ57SgX/ey2oT6Jlygp4sEBT 9GjIBas595LIaTPlTgdkhV5fHzY+D1uvfj6XfopqOGetWGERQ11MJmOPbBaEZjhL37b5 ++yvXCPV78akAHIfyCcXaoL1XCjf4pN1qNGWSJrneDpZ6BOmH12w5GNLJ9zYcMlusfEs 5om75xsfyf0/iqavcG3CTsAI2vwCy8WUdd9OjV/aN/AqIans77wDKu1D+M6eYDld1R/a RJFFUhMmOBlsVVosYFD71BGlT0AV/gmsjDbXCRfDITrgSEfaDkJTAakWaeHBP3sfTuGD cRvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6Uw+EFVoa4I93GT2kj8Y5Rr/8NCWuvO6exBhY+QuuAk=; b=nF1dDG5RhTATETBzvYYw3NvNlBboOK11/qfidvF9W5O+xt9Wdi4OdFc+g5Cgj2Ww4A nMQhYtxCwD1kJr7Y3yHJbFADdeFLjlAq8ybK64aefMevTnc7zW2vZ/AnXN95lKMtR7aC 3jX3pF+Es/QlecKDJZq9FAWQGOphgw/a++j2y77r5xe8f46YPBLN8C+Eaqn3dEYs6ug+ tCg+GyxPfBbk4KegIzpZ48QViw/1skxIu3QNJhLRBxYwz3KyA0yisLM6f2dBBzf4BXGX FT5NgWymOfFK2g9KOLgYueOk20C4cOHDoOm8cMqANsU59RWB25S+gVWpwYSmuvW7YLq6 tdNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c5AcVu9P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si6135167otd.76.2020.02.24.02.39.42; Mon, 24 Feb 2020 02:39:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c5AcVu9P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727459AbgBXKi1 (ORCPT + 99 others); Mon, 24 Feb 2020 05:38:27 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:42907 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726216AbgBXKi1 (ORCPT ); Mon, 24 Feb 2020 05:38:27 -0500 Received: by mail-ed1-f65.google.com with SMTP id e10so11288449edv.9; Mon, 24 Feb 2020 02:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6Uw+EFVoa4I93GT2kj8Y5Rr/8NCWuvO6exBhY+QuuAk=; b=c5AcVu9PctAre5ABV75TS3znJyeDih2j1yHWb4Wfz/I/N1JpBKbK4dNfH2npBrnLnw IEQtZlIcQjmb0e/SMBt2xU46exTD4aA0NrjeDJfOz2dVMd2ad4zP7nzUacFVNyQWDiYH XNwbISsZTcUWTwPlQwL8SrZD416ykM+ccxrjrD5ee5rlPF0iMsdQ5p46Q7GGN6M+jjjb zGlhE+OCHvQy6b8sHfh8kJre4M2NlvfHrwzrUngGyukcrAMDkB1q1XL4JtNs0Z+iAbuz pV+OEi22T/RMZHB4Dk9dGs7XZH9j+0mu02SiNyc14s8a9LCyVzbCByAJ1NmEdl2SPqm7 cc0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6Uw+EFVoa4I93GT2kj8Y5Rr/8NCWuvO6exBhY+QuuAk=; b=BTaoHkiLuntczZN7/MOVzwFrLnkPieaLb9sPQB5cEyPhiTUJHaamRKjV4WGkuaz6fv V7E75R2vRnX30TSod0/AY9dUGnEUF4FwUa31ns/F6La6u2ftLjvsnSLGoaxqi2KJryKK 8mRoRpTpUsyMHfNIJrlQym1mMf4WDh7Ao+g6WVS3hDLf34bHhdboi5cOTTFMEjiFVRqt Yd/8SYBWW894K61Xw6V7yUKlguYJJvjJaQo/eB8bsH2/iLJA2vZGknX0M2qAGxfuRRjx owAci2GSv+h2hwsBDFsvq/tKCBJFTD9SpyxbSGg5OVpa2Cb5VPc2GOPKLg44t7xq6dmj FFbg== X-Gm-Message-State: APjAAAXw4dPdCEsOmk7W9Ydj5+c2CZHO5v4dXqlEFe1D6H1kO6il9TPk IKVSQqmxjMFg3VFXX8YmZmgh7jQ34yzCtubJvR7uFCr8 X-Received: by 2002:aa7:d3cb:: with SMTP id o11mr46199101edr.145.1582540704910; Mon, 24 Feb 2020 02:38:24 -0800 (PST) MIME-Version: 1.0 References: <1559287017-32397-1-git-send-email-horatiu.vultur@microchip.com> <1559287017-32397-2-git-send-email-horatiu.vultur@microchip.com> In-Reply-To: <1559287017-32397-2-git-send-email-horatiu.vultur@microchip.com> From: Vladimir Oltean Date: Mon, 24 Feb 2020 12:38:14 +0200 Message-ID: Subject: Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam To: Horatiu Vultur Cc: Alexandre Belloni , Microchip Linux Driver Support , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , "David S. Miller" , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, lkml , netdev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Horatiu, On Fri, 31 May 2019 at 10:18, Horatiu Vultur 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 > --- > 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? Thanks, -Vladimir