Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4983980ybi; Tue, 28 May 2019 05:51:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqySS78fmkFo6dOMh1o24+LiMRMRAB6YtmBKimGJDKxDmQN1EILh6Udct9GyqV8lXKn8x1oZ X-Received: by 2002:a63:e408:: with SMTP id a8mr45619183pgi.146.1559047868627; Tue, 28 May 2019 05:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559047868; cv=none; d=google.com; s=arc-20160816; b=KS5zaPk0AqwnkF0IDYKv2JmCqKNNFn84BpmlqT61D4+1+0hTJ/+Ybsx1+1wrYBmPD0 MGcQMADoY81Ld6O/vDYTCDxZejZyEVZuVNbFpYUQFAo1IgTWRZVCl0MtXC9oLjH0HAgP II+X43w0igbVAPEghtHGozWwDN4KyJzT1AXMcmKE71/7FIAH7acYHPdhVMrj/dp1hoH4 ZP9IxOsxyLWICWIc5X10Lb944iBAqLa0Lnay6RhJ66cOuRSqKRQnDrXK7x3FMHHW3ziF i61qvg6WstSYkFGNa0t7QERtXontgfv/ChCtzbXof99C4ofnfSdNeSU56WSzXt293hvU BYNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=yfUQC0TmmukumTLP+GJk8/i2i9pQ5IjLZXCNJjjQuHg=; b=IMcfP4jAYNwBwneCtJ+rAx9/TgjdclE0mIpBFh/fxWuARg/xwbSseEUdb4z2MPhOQr 3IKoHt25m+0VzVdppk+rWtFs7w5SMdCrd1ptFCIPA1Fd/Z6E5ap62zYHjgHtriykP3Tv 7BZeLbNksybrSKkIZnqd2Zh3p4ohf35QPtcLy4PllHHeoV958xqOMEh28ng8AGigliql Ecepu7cEemdDEQtK9r+ijWUG/lU7/FZw7ocoVP2YCUs3yynaHJ6+hcPbP5zRU/Ucuar0 7UODy953ZXnvg9yzxbto/XyPRbHKNqkJn4fWH1M+0bzIdRsXw+ZFofgB/erj2hISo9XM nc+w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si23268300plb.30.2019.05.28.05.50.52; Tue, 28 May 2019 05:51:08 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727543AbfE1Mtq (ORCPT + 99 others); Tue, 28 May 2019 08:49:46 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:18836 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfE1Mtp (ORCPT ); Tue, 28 May 2019 08:49:45 -0400 Received-SPF: Pass (esa2.microchip.iphmx.com: domain of Joergen.Andreasen@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Joergen.Andreasen@microchip.com"; x-sender="Joergen.Andreasen@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa2.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Joergen.Andreasen@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa2.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Joergen.Andreasen@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com X-IronPort-AV: E=Sophos;i="5.60,523,1549954800"; d="scan'208";a="34882554" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 May 2019 05:49:43 -0700 Received: from localhost (10.10.85.251) by mx.microchip.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1713.5; Tue, 28 May 2019 05:49:37 -0700 From: Joergen Andreasen To: CC: Joergen Andreasen , "Microchip Linux Driver Support" , Alexandre Belloni , "David S. Miller" , Subject: [PATCH net-next v3 0/1] Add hw offload of TC police on MSCC ocelot Date: Tue, 28 May 2019 14:49:16 +0200 Message-ID: <20190528124917.22034-1-joergen.andreasen@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190502094029.22526-1-joergen.andreasen@microchip.com> References: <20190502094029.22526-1-joergen.andreasen@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series enables hardware offload of ingress port policing on the MSCC ocelot board. Changes v2 -> v3: v3 now incorporates the following changes suggested by Jakub Kicinski: - Add a check in ndo_set_features() in order to prevent users to clear the NETIF_F_HW_TC flag while offload is active. - Reject the offload if the block is shared. Changes v1 -> v2: v2 now consists of only one patch: "[PATCH net-next v2 1/1] net: mscc: ocelot: Implement port policers via tc command". The patch, "[PATCH net-next 00/13] net: act_police offload support", from Jakub Kicinski, removed the need for this patch: "[PATCH net-next 1/3] net/sched: act_police: move police parameters". Alexandre Belloni asked me to remove patch, "[PATCH net-next 3/3] MIPS: generic: Add police related options to ocelot_defconfig", from the series and instead send it through the MIPS tree and I will do that. The remaining patch is now the only patch in this series and all suggested changes have been incorporated. Joergen Andreasen (1): net: mscc: ocelot: Implement port policers via tc command drivers/net/ethernet/mscc/Makefile | 2 +- drivers/net/ethernet/mscc/ocelot.c | 13 +- drivers/net/ethernet/mscc/ocelot.h | 3 + drivers/net/ethernet/mscc/ocelot_police.c | 227 ++++++++++++++++++++++ drivers/net/ethernet/mscc/ocelot_police.h | 22 +++ drivers/net/ethernet/mscc/ocelot_tc.c | 174 +++++++++++++++++ drivers/net/ethernet/mscc/ocelot_tc.h | 22 +++ 7 files changed, 460 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ethernet/mscc/ocelot_police.c create mode 100644 drivers/net/ethernet/mscc/ocelot_police.h create mode 100644 drivers/net/ethernet/mscc/ocelot_tc.c create mode 100644 drivers/net/ethernet/mscc/ocelot_tc.h -- 2.17.1