From patchwork Tue Jul 5 23:02:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 12907182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78825CCA47C for ; Tue, 5 Jul 2022 23:02:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230136AbiGEXCR (ORCPT ); Tue, 5 Jul 2022 19:02:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbiGEXCQ (ORCPT ); Tue, 5 Jul 2022 19:02:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A87F5183A3 for ; Tue, 5 Jul 2022 16:02:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5B0D7B81A52 for ; Tue, 5 Jul 2022 23:02:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D51F0C341CD; Tue, 5 Jul 2022 23:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657062133; bh=AoHVBBZvBZ9YDTLlwYjl5aU2ZlYe6TapucRcMoW+S8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qw9B0KxytKBrsJyPFrl/1LHrqv1PmGHzxaE147WDeL07TFoQnb4Vak3zGYExNSq6B 3zH+Jj4ZDf3Uzrv3aCvzwgryQk/pXUKGvuhkPm/Jf7TDwg616nvbnzKoCUy1swAQ1P GvmERAxXRRr5Fni+V4jdWQ43ynzFNgOun7BlaUeuNkftnkCJZ9GvJkUSpJJdw4JN0H Hb1JRrn4uEasmdXkfqEcnundmQiGWyzBmD7fNyyKpv0yvm3S+rmBRhtsxzvkX4vWWn hjgmoZlufI2SBrHM8o9u6o1RBUXGm5UKmrp55YHzgshla9tapEuNBE38HCGfqDzsa2 Kq98jCWLSxV7Q== From: Jakub Kicinski To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, Jakub Kicinski , dennis.dalessandro@cornelisnetworks.com Subject: [PATCH rdma-next 1/3] IB/hfi1: switch to netif_napi_add_tx() Date: Tue, 5 Jul 2022 16:02:06 -0700 Message-Id: <20220705230208.924408-2-kuba@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220705230208.924408-1-kuba@kernel.org> References: <20220705230208.924408-1-kuba@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Switch to the new API not requiring the NAPI_POLL_WEIGHT argument. Signed-off-by: Jakub Kicinski --- CC: dennis.dalessandro@cornelisnetworks.com CC: jgg@ziepe.ca CC: leon@kernel.org CC: linux-rdma@vger.kernel.org --- drivers/infiniband/hw/hfi1/ipoib_tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c index d6bbdb8fcb50..5d9a7b09ca37 100644 --- a/drivers/infiniband/hw/hfi1/ipoib_tx.c +++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c @@ -742,9 +742,7 @@ int hfi1_ipoib_txreq_init(struct hfi1_ipoib_dev_priv *priv) kzalloc_node(sizeof(*tx->sdma_hdr), GFP_KERNEL, priv->dd->node); - netif_tx_napi_add(dev, &txq->napi, - hfi1_ipoib_poll_tx_ring, - NAPI_POLL_WEIGHT); + netif_napi_add_tx(dev, &txq->napi, hfi1_ipoib_poll_tx_ring); } return 0; From patchwork Tue Jul 5 23:02:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 12907180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3730BC43334 for ; Tue, 5 Jul 2022 23:02:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230359AbiGEXCR (ORCPT ); Tue, 5 Jul 2022 19:02:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbiGEXCQ (ORCPT ); Tue, 5 Jul 2022 19:02:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C700186C4 for ; Tue, 5 Jul 2022 16:02:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A6FD2B81A49 for ; Tue, 5 Jul 2022 23:02:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DA8CC341CE; Tue, 5 Jul 2022 23:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657062133; bh=5kbgVomMAGpyYs52SXNju5YosWNFO0hC1IHMJKnbBWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7unN78v8H6bfvy4XLBExJPbUoGKcjQnerf1v3Ys4rplKgJrcjAEqFdk3F+aNZX7s Vl/MJIgZVCyA4abyCa6fWxz2Q8wllT1q14DeULpUmVzHzqCnsZ93qI6yfPYc0Th5ZF 2o7h4O57NuLqT/6n5pVM2Fq7k4Y1jSNfSVJ6wVwNnhpzdMlMCz1ABOnw1ViyNfHE2B K6Gs03EvT3wO+9UffYx3ojErVhHZQogDTt29dOc2mXMbfEZylj6a/jzlmKJ5Zrfyab swqDr+UMXKqIqvauW/stkD//FzYetAZIQAUO8abCutbE6Zv7+I4KGtOT0hCTl6VMnl Dpc7n0BijKgGA== From: Jakub Kicinski To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, Jakub Kicinski , dennis.dalessandro@cornelisnetworks.com Subject: [PATCH rdma-next 2/3] IB/hfi1: switch to netif_napi_add_weight() Date: Tue, 5 Jul 2022 16:02:07 -0700 Message-Id: <20220705230208.924408-3-kuba@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220705230208.924408-1-kuba@kernel.org> References: <20220705230208.924408-1-kuba@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Since we'll remove the last argument from netif_napi_add() soon switch this RDMA driver to netif_napi_add_weight() for now to avoid cross-tree patches. Signed-off-by: Jakub Kicinski --- CC: dennis.dalessandro@cornelisnetworks.com CC: jgg@ziepe.ca CC: leon@kernel.org CC: linux-rdma@vger.kernel.org --- drivers/infiniband/hw/hfi1/netdev_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hfi1/netdev_rx.c b/drivers/infiniband/hw/hfi1/netdev_rx.c index 03b098a494b5..3dfa5aff2512 100644 --- a/drivers/infiniband/hw/hfi1/netdev_rx.c +++ b/drivers/infiniband/hw/hfi1/netdev_rx.c @@ -216,7 +216,7 @@ static int hfi1_netdev_rxq_init(struct hfi1_netdev_rx *rx) * right now. */ set_bit(NAPI_STATE_NO_BUSY_POLL, &rxq->napi.state); - netif_napi_add(dev, &rxq->napi, hfi1_netdev_rx_napi, 64); + netif_napi_add_weight(dev, &rxq->napi, hfi1_netdev_rx_napi, 64); rc = msix_netdev_request_rcd_irq(rxq->rcd); if (rc) goto bail_context_irq_failure; From patchwork Tue Jul 5 23:02:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 12907181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D16C6C433EF for ; Tue, 5 Jul 2022 23:02:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbiGEXCS (ORCPT ); Tue, 5 Jul 2022 19:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230158AbiGEXCQ (ORCPT ); Tue, 5 Jul 2022 19:02:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42D7F186C8 for ; Tue, 5 Jul 2022 16:02:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EAF87B81A53 for ; Tue, 5 Jul 2022 23:02:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CB78C341D0; Tue, 5 Jul 2022 23:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657062133; bh=izNugGZMhJ/GfuzadwaQToO1AjIs0aysSHFgrWobP5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SQdlsa0PlJZE6lqlRv7ERjq3evTf6fEGAMpfvkcUnfruwz54UhNR8GCVL82jeLyiw YChk3PmxuQZrUZhuOr7IqoxCoMgfC551sss18xPKY2ODrYt+QTq5Bvhl0N0hK0f9xa u2zd+fpPsgWiExN9FV73k3pNsWPFfSNptcUOyZdXQyByY4kIo4cdgscQ/f7esiviZu Eq7PNhgm4iBgeGXgNaqWqeJW566dSlYoDm8da2hG17ECwPrDS67GdLw8Tpo6fWCSUi 2jANnP2ZJPCmwwyASjZALLgyA5R3UlkRBIZwRMd9VpT0NZdL3tgrT8MZ85dzOVqFrZ Y0K6mntj8xN7Q== From: Jakub Kicinski To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, Jakub Kicinski Subject: [PATCH rdma-next 3/3] ipoib: switch to netif_napi_add_weight() Date: Tue, 5 Jul 2022 16:02:08 -0700 Message-Id: <20220705230208.924408-4-kuba@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220705230208.924408-1-kuba@kernel.org> References: <20220705230208.924408-1-kuba@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org We want to remove the weight argument from the basic netif_napi_add() API and just default to 64. Switch ipoib to the new API for explicitly specifing the weight. Signed-off-by: Jakub Kicinski --- CC: jgg@ziepe.ca CC: leon@kernel.org CC: linux-rdma@vger.kernel.org --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 2a8961b685c2..a4904371e2db 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1664,8 +1664,10 @@ static void ipoib_napi_add(struct net_device *dev) { struct ipoib_dev_priv *priv = ipoib_priv(dev); - netif_napi_add(dev, &priv->recv_napi, ipoib_rx_poll, IPOIB_NUM_WC); - netif_napi_add(dev, &priv->send_napi, ipoib_tx_poll, MAX_SEND_CQE); + netif_napi_add_weight(dev, &priv->recv_napi, ipoib_rx_poll, + IPOIB_NUM_WC); + netif_napi_add_weight(dev, &priv->send_napi, ipoib_tx_poll, + MAX_SEND_CQE); } static void ipoib_napi_del(struct net_device *dev)