Message ID | 1585064040-28201-1-git-send-email-bingz@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 235B4A058A; Tue, 24 Mar 2020 16:34:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE6262BCE; Tue, 24 Mar 2020 16:34:10 +0100 (CET) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id E07592BAE for <dev@dpdk.org>; Tue, 24 Mar 2020 16:34:08 +0100 (CET) From: Bing Zhao <bingz@mellanox.com> To: orika@mellanox.com, rasland@mellanox.com, matan@mellanox.com Cc: viacheslavo@mellanox.com, dev@dpdk.org Date: Tue, 24 Mar 2020 15:33:56 +0000 Message-Id: <1585064040-28201-1-git-send-email-bingz@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1580816002-159035-1-git-send-email-bingz@mellanox.com> References: <1580816002-159035-1-git-send-email-bingz@mellanox.com> Subject: [dpdk-dev] [PATCH v4 0/4] net/mlx5: move to non-cached mode for flow rules 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> |
Series |
net/mlx5: move to non-cached mode for flow rules
|
|
Message
Bing Zhao
March 24, 2020, 3:33 p.m. UTC
This patch set will remove the flow rules cache and move to the non-cached mode for both DV and Verbs mode. In the device closing stage, all the software resources for flows created will be freed and corresponding hardware resources will be released. Then the total cost of the memory will be reduced and the behavior of mlx5 PMD will comply fully with the ethdev API expectations. After closing a device, all the flow rules stored in application layer will no longer be valid anymore. Application should synchronize the database and do not try to destory any rule on this device. And after a device restarting, all the needed flow rules should be reinserted via the create routine in the rte_flow lib. --- v2 Changes: Fix the compiling error with MLX5 Debug mode in the 4th commit of "net/mlx5: introduce handle structure for DV flows". v3 Changes: Refactor the device flow related structures to support non-cached mode for both Verbs and DV flows. v4 Changes: Fix the code style warning for stdbool type and a typo in the code line comments. --- Bing Zhao (4): net/mlx5: change operations for non-cached flows net/mlx5: reorganize mlx5 flow structures net/mlx5: separate the flow handle resource net/mlx5: check device stat before creating flow drivers/net/mlx5/mlx5.c | 18 ++- drivers/net/mlx5/mlx5.h | 9 +- drivers/net/mlx5/mlx5_flow.c | 197 +++++++++++++++++------ drivers/net/mlx5/mlx5_flow.h | 179 ++++++++++++++------- drivers/net/mlx5/mlx5_flow_dv.c | 311 ++++++++++++++++++++----------------- drivers/net/mlx5/mlx5_flow_verbs.c | 156 +++++++++++-------- drivers/net/mlx5/mlx5_trigger.c | 26 ++-- 7 files changed, 573 insertions(+), 323 deletions(-)
Comments
From: Bing Zhao > This patch set will remove the flow rules cache and move to the non-cached > mode for both DV and Verbs mode. > > In the device closing stage, all the software resources for flows created will > be freed and corresponding hardware resources will be released. Then the > total cost of the memory will be reduced and the behavior of mlx5 PMD will > comply fully with the ethdev API expectations. > > After closing a device, all the flow rules stored in application layer will no > longer be valid anymore. Application should synchronize the database and do > not try to destory any rule on this device. > And after a device restarting, all the needed flow rules should be reinserted > via the create routine in the rte_flow lib. > > --- > v2 Changes: > Fix the compiling error with MLX5 Debug mode in the 4th commit > of "net/mlx5: introduce handle structure for DV flows". > v3 Changes: > Refactor the device flow related structures to support non-cached > mode for both Verbs and DV flows. > v4 Changes: > Fix the code style warning for stdbool type and a typo in the > code line comments. > --- > > Bing Zhao (4): > net/mlx5: change operations for non-cached flows > net/mlx5: reorganize mlx5 flow structures > net/mlx5: separate the flow handle resource > net/mlx5: check device stat before creating flow > > drivers/net/mlx5/mlx5.c | 18 ++- > drivers/net/mlx5/mlx5.h | 9 +- > drivers/net/mlx5/mlx5_flow.c | 197 +++++++++++++++++------ > drivers/net/mlx5/mlx5_flow.h | 179 ++++++++++++++------- > drivers/net/mlx5/mlx5_flow_dv.c | 311 ++++++++++++++++++++---------- > ------- > drivers/net/mlx5/mlx5_flow_verbs.c | 156 +++++++++++-------- > drivers/net/mlx5/mlx5_trigger.c | 26 ++-- > 7 files changed, 573 insertions(+), 323 deletions(-) Series-acked-by: Matan Azrad <matan@mellanox.com>
Hi, > -----Original Message----- > From: Bing Zhao <bingz@mellanox.com> > Sent: Tuesday, March 24, 2020 5:34 PM > To: Ori Kam <orika@mellanox.com>; Raslan Darawsheh > <rasland@mellanox.com>; Matan Azrad <matan@mellanox.com> > Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; dev@dpdk.org > Subject: [PATCH v4 0/4] net/mlx5: move to non-cached mode for flow rules > > This patch set will remove the flow rules cache and move to the > non-cached mode for both DV and Verbs mode. > > In the device closing stage, all the software resources for flows > created will be freed and corresponding hardware resources will be > released. Then the total cost of the memory will be reduced and the > behavior of mlx5 PMD will comply fully with the ethdev API > expectations. > > After closing a device, all the flow rules stored in application > layer will no longer be valid anymore. Application should synchronize > the database and do not try to destory any rule on this device. > And after a device restarting, all the needed flow rules should be > reinserted via the create routine in the rte_flow lib. > > --- > v2 Changes: > Fix the compiling error with MLX5 Debug mode in the 4th commit > of "net/mlx5: introduce handle structure for DV flows". > v3 Changes: > Refactor the device flow related structures to support non-cached > mode for both Verbs and DV flows. > v4 Changes: > Fix the code style warning for stdbool type and a typo in the > code line comments. > --- > > Bing Zhao (4): > net/mlx5: change operations for non-cached flows > net/mlx5: reorganize mlx5 flow structures > net/mlx5: separate the flow handle resource > net/mlx5: check device stat before creating flow > > drivers/net/mlx5/mlx5.c | 18 ++- > drivers/net/mlx5/mlx5.h | 9 +- > drivers/net/mlx5/mlx5_flow.c | 197 +++++++++++++++++------ > drivers/net/mlx5/mlx5_flow.h | 179 ++++++++++++++------- > drivers/net/mlx5/mlx5_flow_dv.c | 311 ++++++++++++++++++++---------- > ------- > drivers/net/mlx5/mlx5_flow_verbs.c | 156 +++++++++++-------- > drivers/net/mlx5/mlx5_trigger.c | 26 ++-- > 7 files changed, 573 insertions(+), 323 deletions(-) > > -- > 1.8.3.1 Series applied to next-net-mlx, Kindest regards, Raslan Darawsheh