[0/8] net/mlx5 counter optimize
Message ID | 1586231987-338112-1-git-send-email-suanmingm@mellanox.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5370CA0577; Tue, 7 Apr 2020 05:59:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 790C32BD8; Tue, 7 Apr 2020 05:59:55 +0200 (CEST) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id 81979FFA for <dev@dpdk.org>; Tue, 7 Apr 2020 05:59:53 +0200 (CEST) From: Suanming Mou <suanmingm@mellanox.com> To: Cc: dev@dpdk.org, rasland@mellanox.com Date: Tue, 7 Apr 2020 11:59:39 +0800 Message-Id: <1586231987-338112-1-git-send-email-suanmingm@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 0/8] net/mlx5 counter optimize X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Message
Suanming Mou
April 7, 2020, 3:59 a.m. UTC
In the plan of save the memory consumption for rte_flow, the counter memory consumption will be optimized from two perspective. Change the counter object saving as index instead of pointer in rte_flow. In this case, since currently the counters are allocated from the pool, counter can use the index as it is in the pool to address the object. The counter index ID is made up of the pool index and counter offset in the pool. Split the counter struct members are used only in batch and none batch. Currently, there are two kinds of counters, one as batch and others as none batch. The most widely used batch counters only use limited members in the counter struct. Split the members only used by none batch counters to the extend counter struct, and allocate the memory only for the none batch counter pools saves memory for batch counters. Suanming Mou (8): net/mlx5: fix incorrect counter container usage net/mlx5: optimize counter release query generation net/mlx5: change verbs counter allocator to indexed common/mlx5: add batch counter id offset net/mlx5: change Direct Verbs counter to indexed net/mlx5: optimize flow counter handle type net/mlx5: split the counter struct net/mlx5: reorganize fallback counter management drivers/common/mlx5/mlx5_prm.h | 9 + drivers/net/mlx5/mlx5.c | 6 +- drivers/net/mlx5/mlx5.h | 52 +++-- drivers/net/mlx5/mlx5_flow.c | 28 ++- drivers/net/mlx5/mlx5_flow.h | 10 +- drivers/net/mlx5/mlx5_flow_dv.c | 445 ++++++++++++++++++------------------- drivers/net/mlx5/mlx5_flow_verbs.c | 173 ++++++++++---- 7 files changed, 428 insertions(+), 295 deletions(-)