From patchwork Mon Nov 26 22:38:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 10699245 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC0D11869 for ; Mon, 26 Nov 2018 22:39:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC6152A749 for ; Mon, 26 Nov 2018 22:39:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A08012A750; Mon, 26 Nov 2018 22:39:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DB322A749 for ; Mon, 26 Nov 2018 22:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727516AbeK0Jf2 (ORCPT ); Tue, 27 Nov 2018 04:35:28 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:38075 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727504AbeK0Jf1 (ORCPT ); Tue, 27 Nov 2018 04:35:27 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from saeedm@mellanox.com) with ESMTPS (AES256-SHA encrypted); 27 Nov 2018 00:45:34 +0200 Received: from sx1.mtl.com ([172.16.5.59]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wAQMdf1l019794; Tue, 27 Nov 2018 00:39:42 +0200 From: Saeed Mahameed To: Leon Romanovsky , saeedm@mellanox.com Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Jason Gunthorpe Subject: [PATCH mlx5-next 00/13] Mellanox, mlx5 core driver events API Date: Mon, 26 Nov 2018 14:38:55 -0800 Message-Id: <20181126223908.15988-1-saeedm@mellanox.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This patchset is for mlx5-next shared branch, and will be applied there once the review is done. The main idea of this change is to define a flexible scalable and simpler high level mlx5 core APIs to forward device and driver events to upper level interface drivers e.g mlx5_ib and mlx5e netdevice driver. Patch #1, Driver events notifier API: Use atomic notifier chain to fire events to mlx5 core driver consumers (mlx5e/mlx5_ib) and provide dynamic mlx5 register/unregister notifier API to replace the internal mlx5_interface->event and totally remove it. Patch #2, Forward port events via the new notifier chain. Patch #3, Use the mlx5 events API in mlx5e netdevice. Patch #4, Forward all device events sent via mlx5_core_event (old API) to the new notifier chain, this will allow seamless transition to the new AP. Patch #5, Use the new events API in mlx5_IB Patch #6, remove old interface callback, mlx5_interface->event Patch #7,8,9, mlx5_ib to handle raw FW events as is rather than the software version of them, this will remove any need for unnecessary processing of FW events in the low level mlx5_core driver. Patch #10, Remove unnecessary processing of FW events in the low level mlx5_core driver, all events are handled on demand by mlx5_ib and/or mlx5e netdevice. patch #11,12, forward QP and SRQ events via the new notifier chain, will be needed by mlx5_ib driver. Patch #13, Debug patch for mlx5 events. Thanks, Saeed. --- Saeed Mahameed (13): net/mlx5: Driver events notifier API net/mlx5: Allow port change event to be forwarded to driver notifiers chain net/mlx5e: Use the new mlx5 core notifier API net/mlx5: Forward all mlx5 events to mlx5 notifiers chain IB/mlx5: Use the new mlx5 core notifier API net/mlx5: Remove unused events callback and logic IB/mlx5: Handle raw port change event rather than the software version net/mlx5: Allow forwarding event type general event as is IB/mlx5: Handle raw delay drop general event net/mlx5: Remove all deprecated software versions of FW events net/mlx5: Forward QP/WorkQueues resource events net/mlx5: Forward SRQ resource events net/mlx5: Debug print for forwarded async events drivers/infiniband/hw/mlx5/main.c | 179 +++++++++++++----- drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/dev.c | 106 +---------- drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +- .../net/ethernet/mellanox/mlx5/core/en_main.c | 27 +-- .../net/ethernet/mellanox/mlx5/core/events.c | 150 ++++++--------- .../net/ethernet/mellanox/mlx5/core/health.c | 3 +- .../ethernet/mellanox/mlx5/core/lib/mlx5.h | 1 + .../net/ethernet/mellanox/mlx5/core/main.c | 10 - .../ethernet/mellanox/mlx5/core/mlx5_core.h | 3 - drivers/net/ethernet/mellanox/mlx5/core/qp.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/srq.c | 38 +--- include/linux/mlx5/driver.h | 30 +-- 13 files changed, 235 insertions(+), 326 deletions(-)