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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 23EEDC282D7 for ; Wed, 30 Jan 2019 18:07:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F05A020869 for ; Wed, 30 Jan 2019 18:07:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732825AbfA3SHc (ORCPT ); Wed, 30 Jan 2019 13:07:32 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:47820 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731781AbfA3SHc (ORCPT ); Wed, 30 Jan 2019 13:07:32 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (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 921B214F450BF; Wed, 30 Jan 2019 10:07:31 -0800 (PST) Date: Wed, 30 Jan 2019 10:07:28 -0800 (PST) Message-Id: <20190130.100728.1647499346795026336.davem@davemloft.net> To: idosch@mellanox.com Cc: netdev@vger.kernel.org, jiri@mellanox.com, mlxsw@mellanox.com Subject: Re: [PATCH net-next 0/5] mlxsw: spectrum_acl: Include delta bits into hashtable key From: David Miller In-Reply-To: <20190130085813.32161-1-idosch@mellanox.com> References: <20190130085813.32161-1-idosch@mellanox.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Wed, 30 Jan 2019 10:07:31 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel Date: Wed, 30 Jan 2019 08:58:29 +0000 > The Spectrum-2 ASIC allows multiple rules to use the same mask provided > that the difference between their masks is small enough (up to 8 > consecutive delta bits). A more detailed explanation is provided in > merge commit 756cd36626f7 ("Merge branch > 'mlxsw-Introduce-algorithmic-TCAM-support'"). > > These delta bits are part of the rule's key and therefore rules that > only differ in their delta bits can be inserted with the same A-TCAM > mask. In case two rules share the same key and only differ in their > priority, then the second will spill to the C-TCAM. > > Current code does not take the delta bits into account when checking for > duplicate rules, which leads to unnecessary spillage to the C-TCAM. > This may result in reduced scale and performance. > > Patch #1 includes the delta bits in the rule's key to avoid the above > mentioned problem. > > Patch #2 adds a tracepoint when a rule is inserted into the C-TCAM. > > Patches #3-#5 add test cases to make sure unnecessary spillage into the > C-TCAM does not occur. Series applied, thanks.