From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87E8DC433E0 for ; Tue, 4 Aug 2020 01:13:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8678F2076C for ; Tue, 4 Aug 2020 01:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728259AbgHDBNu (ORCPT ); Mon, 3 Aug 2020 21:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726615AbgHDBNu (ORCPT ); Mon, 3 Aug 2020 21:13:50 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A7B3C06174A for ; Mon, 3 Aug 2020 18:13:50 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id CCA5D1278A794; Mon, 3 Aug 2020 17:57:03 -0700 (PDT) Date: Mon, 03 Aug 2020 18:13:48 -0700 (PDT) Message-Id: <20200803.181348.333074926504563408.davem@davemloft.net> To: idosch@idosch.org Cc: netdev@vger.kernel.org, kuba@kernel.org, jiri@mellanox.com, petrm@mellanox.com, amitc@mellanox.com, mlxsw@mellanox.com, idosch@mellanox.com Subject: Re: [PATCH net-next 0/9] mlxsw: Add support for buffer drop traps From: David Miller In-Reply-To: <20200803161141.2523857-1-idosch@idosch.org> References: <20200803161141.2523857-1-idosch@idosch.org> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 03 Aug 2020 17:57:04 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel Date: Mon, 3 Aug 2020 19:11:32 +0300 > From: Ido Schimmel > > Petr says: > > A recent patch set added the ability to mirror buffer related drops > (e.g., early drops) through a netdev. This patch set adds the ability to > trap such packets to the local CPU for analysis. > > The trapping towards the CPU is configured by using tc-trap action > instead of tc-mirred as was done when the packets were mirrored through > a netdev. A future patch set will also add the ability to sample the > dropped packets using tc-sample action. > > The buffer related drop traps are added to devlink, which means that the > dropped packets can be reported to user space via the kernel's > drop_monitor module. > > Patch set overview: > > Patch #1 adds the early_drop trap to devlink > > Patch #2 adds extack to a few devlink operations to facilitate better > error reporting to user space. This is necessary - among other things - > because the action of buffer drop traps cannot be changed in mlxsw > > Patch #3 performs a small refactoring in mlxsw, patch #4 fixes a bug that > this patchset would trigger. > > Patches #5-#6 add the infrastructure required to support different traps > / trap groups in mlxsw per-ASIC. This is required because buffer drop > traps are not supported by Spectrum-1 > > Patch #7 extends mlxsw to register the early_drop trap > > Patch #8 adds the offload logic for the "trap" action at a qevent block. > > Patch #9 adds a mlxsw-specific selftest. Series applied, thank you.