From patchwork Wed Apr 15 06:39:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suanming Mou X-Patchwork-Id: 68470 Return-Path: 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 D1B12A0577; Wed, 15 Apr 2020 08:40:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 846331C138; Wed, 15 Apr 2020 08:40:05 +0200 (CEST) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id E5BF51BDAE for ; Wed, 15 Apr 2020 08:40:03 +0200 (CEST) From: Suanming Mou To: Cc: wentaoc@mellanox.com, rasland@mellanox.com, dev@dpdk.org Date: Wed, 15 Apr 2020 14:39:47 +0800 Message-Id: <1586932797-99533-1-git-send-email-suanmingm@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 00/10] net/mlx5: optimize flow structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch set is third part of the flow memory consumption optimization. It mainly optimizes the rte flow and mlx5 flow handle structure. For mlx5 flow handle structure: 1. As one flow has only one fate action, the fate actions are reorganized as union. 2. The action flags are optimized to be the limited bits the flow needs. 3. The bits members are reorganized to align with bytes. For rte flow structure: 1. Meter handle is converted to uint32_t type as unique meter id. 2. Fdir handle is converted to one bit to save the pointer to another list. 3. Metadata handle is converted to uint32_t type as indexed. 4. The bit members are reorganized to align with bytes. Some extra optimizations: 1. Allocate meter resource from indexed memory pool. 2. Allocate none RSS rte flow from indexed memory pool. 3. Split RSS type, level, key to common memory as they are not required for the flow destroy. This patch set should be applied after the patch series as below: https://patches.dpdk.org/cover/68226/ Suanming Mou (9): net/mlx5: reorganize fate actions as union net/mlx5: optimize action flags in flow handle net/mlx5: reorganize the mlx5 flow handle struct net/mlx5: optimize mlx5 flow RSS struct net/mlx5: allocate rte flow from indexed pool net/mlx5: optimize flow meter handle type net/mlx5: allocate meter from indexed pool net/mlx5: allocate metadata object from indexed pool net/mlx5: reorganize rte flow structure Wentao Cui (1): net/mlx5: optimize flow director filter memory drivers/net/mlx5/mlx5.c | 35 +++++++- drivers/net/mlx5/mlx5.h | 5 ++ drivers/net/mlx5/mlx5_flow.c | 168 +++++++++++++++++++++++++++---------- drivers/net/mlx5/mlx5_flow.h | 83 +++++++++++------- drivers/net/mlx5/mlx5_flow_dv.c | 135 ++++++++++++++++++----------- drivers/net/mlx5/mlx5_flow_meter.c | 11 +-- drivers/net/mlx5/mlx5_flow_verbs.c | 91 +++++++++++--------- 7 files changed, 363 insertions(+), 165 deletions(-)