From patchwork Fri Jul 1 16:40:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12903599 X-Patchwork-Delegate: kuba@kernel.org 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 76923C43334 for ; Fri, 1 Jul 2022 16:40:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232353AbiGAQkP (ORCPT ); Fri, 1 Jul 2022 12:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232399AbiGAQkO (ORCPT ); Fri, 1 Jul 2022 12:40:14 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9462927FF5 for ; Fri, 1 Jul 2022 09:40:12 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id v14so4014619wra.5 for ; Fri, 01 Jul 2022 09:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k+1kh73qPqurRHWbKKVu98io15cDFmP3DMcz791PA0E=; b=6vgzevYN/hmvW8PZvTzUN/LdS6FMZS0iz0yw3fN9i3DARO5sC3d2QrSd0FOMlnq21R TJMdPiTnZ0vZrHZmjrZQQuI/vnNtjoB2svzXlh4gHAmqZUW902DA3MrcwlAweugBDtCH jVJCaPHIg7NzMXaqYoqRCnXnQaNUslkCgl28rejGaPnfa+RwuneBhyg4i/Cv6oHjJ6bM rMq1jIek1WjKiOUGz1fG20l/mqFSGdSFjPXCm4Gvj80bCcfweYxcHBQw6FTQTCgV4IoW U2laSdVwM0ImKyUnRxWPE0vbUFN/FraUEYecYC5SgMLyobiW9aIp4a8JHnq1jId9jJyy zNqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k+1kh73qPqurRHWbKKVu98io15cDFmP3DMcz791PA0E=; b=y8LnY0cWwZ+S1kG92vTxaaWOZNjSq26nKVyckb/6OEu35P5aD3Aq/PGqT7IsLHqvYF ehdpo8oTGJIL0SR7fS0tJ8PCKcD4TUZ9teBbgctVfxrd053LwLWvBICIt4xSMhwDeJ+x YaiOrNbWmuqEazS3V0MJTGSmNosqz107JOnTAeYeAC4QTQT5GeRQypKo6dAq9Hj2uLak fpv1dr15aXdotQasGvCM2y0wHoSiMP7+7T7u6P1ZG1H3/Ob/3Zfghk/TF0ek2SlR6ii7 RQ8RU6VUl1GwqYYZm2qn4l68f0dEmywm/3kXo9BtBvyRRIfL9Ssf5qV74dBUS5yqMZUD /1YA== X-Gm-Message-State: AJIora9yEBk9qNq9IiaVCW++3FnGV98fr0bfY1lP2InFkynCuOmpyo5h MUnLkyvy/5ojWdugsbqmbxM8pmXoxoajMF6P X-Google-Smtp-Source: AGRyM1sgBhI0Nfy0KbXIZh+viHPvbMFVSD0/uz48PDQKDZ0+342GkOaUWhNa91bLAQpeIfinWB+DTA== X-Received: by 2002:adf:e3cb:0:b0:21b:8de5:ec7d with SMTP id k11-20020adfe3cb000000b0021b8de5ec7dmr14746898wrm.714.1656693611023; Fri, 01 Jul 2022 09:40:11 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id ba15-20020a0560001c0f00b0021bae66362esm19744442wrb.58.2022.07.01.09.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 09:40:10 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, mlxsw@nvidia.com, saeedm@nvidia.com, moshe@nvidia.com Subject: [patch net-next v2 1/3] net: devlink: move unlocked function prototypes alongside the locked ones Date: Fri, 1 Jul 2022 18:40:05 +0200 Message-Id: <20220701164007.1243684-2-jiri@resnulli.us> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220701164007.1243684-1-jiri@resnulli.us> References: <20220701164007.1243684-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko Maintain the same order as it is in devlink.c for function prototypes. The most of the locked variants would very likely soon be removed and the unlocked version would be the only one. Signed-off-by: Jiri Pirko --- include/net/devlink.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/include/net/devlink.h b/include/net/devlink.h index b8f54a8e9c82..edbfe6daa3b5 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1520,15 +1520,6 @@ void devl_unlock(struct devlink *devlink); void devl_assert_locked(struct devlink *devlink); bool devl_lock_is_held(struct devlink *devlink); -int devl_port_register(struct devlink *devlink, - struct devlink_port *devlink_port, - unsigned int port_index); -void devl_port_unregister(struct devlink_port *devlink_port); - -int devl_rate_leaf_create(struct devlink_port *port, void *priv); -void devl_rate_leaf_destroy(struct devlink_port *devlink_port); -void devl_rate_nodes_destroy(struct devlink *devlink); - struct ib_device; struct net *devlink_net(const struct devlink *devlink); @@ -1550,9 +1541,13 @@ void devlink_set_features(struct devlink *devlink, u64 features); void devlink_register(struct devlink *devlink); void devlink_unregister(struct devlink *devlink); void devlink_free(struct devlink *devlink); +int devl_port_register(struct devlink *devlink, + struct devlink_port *devlink_port, + unsigned int port_index); int devlink_port_register(struct devlink *devlink, struct devlink_port *devlink_port, unsigned int port_index); +void devl_port_unregister(struct devlink_port *devlink_port); void devlink_port_unregister(struct devlink_port *devlink_port); void devlink_port_type_eth_set(struct devlink_port *devlink_port, struct net_device *netdev); @@ -1568,8 +1563,11 @@ void devlink_port_attrs_pci_vf_set(struct devlink_port *devlink_port, u32 contro void devlink_port_attrs_pci_sf_set(struct devlink_port *devlink_port, u32 controller, u16 pf, u32 sf, bool external); +int devl_rate_leaf_create(struct devlink_port *port, void *priv); int devlink_rate_leaf_create(struct devlink_port *port, void *priv); +void devl_rate_leaf_destroy(struct devlink_port *devlink_port); void devlink_rate_leaf_destroy(struct devlink_port *devlink_port); +void devl_rate_nodes_destroy(struct devlink *devlink); void devlink_rate_nodes_destroy(struct devlink *devlink); void devlink_port_linecard_set(struct devlink_port *devlink_port, struct devlink_linecard *linecard); From patchwork Fri Jul 1 16:40:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12903600 X-Patchwork-Delegate: kuba@kernel.org 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 A353BC433EF for ; Fri, 1 Jul 2022 16:40:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232400AbiGAQkV (ORCPT ); Fri, 1 Jul 2022 12:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232498AbiGAQkQ (ORCPT ); Fri, 1 Jul 2022 12:40:16 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E6E933EAC for ; Fri, 1 Jul 2022 09:40:14 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id b26so4036003wrc.2 for ; Fri, 01 Jul 2022 09:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jC5TGMHuzDR4UggSsCXw2A6RZ1JvL6ydOH8TZ8J3Mjo=; b=tmCTGkztRZ1ugabXURCVaXLwcVeQ2TrZmzFUPhpXivYCKoXTL248Gwtoh11HtshJFG wz0XvmmOXLhDPvc2mGCMb0GiB2jVPu5wvL6DKICPHc9Ied9oj/6msBYjpNQdQfz+YM1T rAuvXEr59nVLTv786Ej5A8wQl/ZMZaNZxi+IAWwe+PdfCx24GaeNj+J5sBoHu6JrRNxx /GmEIcZzPPSusGdutj9AI6RenSSAhxHEHMMRVSlmE2a/S5ZAa4ZRWEvh9P6DavJIgtS3 GZqrQlOTL7hWg83JEDIKWOhhV+Kj59bJCIXvOXLdx6Op5yEl18wYri0dDqlCx+S3bep7 PO7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jC5TGMHuzDR4UggSsCXw2A6RZ1JvL6ydOH8TZ8J3Mjo=; b=tfTt0mfKTP4pgMDJ/qVShs4ymuXg7P15LpzKIKMWYUdwonUQIG0UU4oxOKc/G0OZj1 N1hpDrvDHVgQayaOoIdqG37DaWyht60QBM0BmQsbDegHDoZIZ9nWlhF0bKYVtXjWnMDc MwCRp5ZxDzQjYVZ5IWWKC8XHJo/lKDgM84LkoHrfb8kp4HrT3Kb7ZA4fOgKn708g4uyN wLi/zPZVe4lXdvc3oFtdtmkHFsCbw05Hi9/agF6Vbh2GFuOtLSfbV5QuHPvStdzsXWGe vM2enGILmEFR9JCfz56JQVmevXOhE8CJL2yWvijC+Z65A9JKl0kGKsQtKNU89MlxSVKr C2fg== X-Gm-Message-State: AJIora9SHa2ZYwgj1eoV8HfuXHjYejPkAGvldxPYY5OsUmxoD9nV5wnP Kju2BIhEOL6eD3I+omOU+9f9lEW6gase2jDI X-Google-Smtp-Source: AGRyM1sisUJvBes9dsX+Duoe281Mr8h68+MRzCYojptsHoV68MukyMfcR2LZk2rwfnCL6RPwqwcnTQ== X-Received: by 2002:adf:e68b:0:b0:21d:1c8d:9891 with SMTP id r11-20020adfe68b000000b0021d1c8d9891mr15083489wrm.37.1656693612611; Fri, 01 Jul 2022 09:40:12 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id g4-20020a5d5544000000b0021a39f5ba3bsm22642406wrw.7.2022.07.01.09.40.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 09:40:12 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, mlxsw@nvidia.com, saeedm@nvidia.com, moshe@nvidia.com Subject: [patch net-next v2 2/3] net: devlink: call lockdep_assert_held() for devlink->lock directly Date: Fri, 1 Jul 2022 18:40:06 +0200 Message-Id: <20220701164007.1243684-3-jiri@resnulli.us> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220701164007.1243684-1-jiri@resnulli.us> References: <20220701164007.1243684-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko In devlink.c there is direct access to whole struct devlink so there is no need to use helper. So obey the customs and work with lock directly avoiding helpers which might obfuscate things a bit. Signed-off-by: Jiri Pirko --- net/core/devlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index 25b481dd1709..a7477addbd59 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -10185,7 +10185,7 @@ int devl_rate_leaf_create(struct devlink_port *devlink_port, void *priv) struct devlink *devlink = devlink_port->devlink; struct devlink_rate *devlink_rate; - devl_assert_locked(devlink_port->devlink); + lockdep_assert_held(&devlink_port->devlink->lock); if (WARN_ON(devlink_port->devlink_rate)) return -EBUSY; @@ -10224,7 +10224,7 @@ void devl_rate_leaf_destroy(struct devlink_port *devlink_port) { struct devlink_rate *devlink_rate = devlink_port->devlink_rate; - devl_assert_locked(devlink_port->devlink); + lockdep_assert_held(&devlink_port->devlink->lock); if (!devlink_rate) return; @@ -10270,7 +10270,7 @@ void devl_rate_nodes_destroy(struct devlink *devlink) static struct devlink_rate *devlink_rate, *tmp; const struct devlink_ops *ops = devlink->ops; - devl_assert_locked(devlink); + lockdep_assert_held(&devlink->lock); list_for_each_entry(devlink_rate, &devlink->rate_list, list) { if (!devlink_rate->parent) From patchwork Fri Jul 1 16:40:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12903601 X-Patchwork-Delegate: kuba@kernel.org 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 5DD69C43334 for ; Fri, 1 Jul 2022 16:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232399AbiGAQkW (ORCPT ); Fri, 1 Jul 2022 12:40:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232561AbiGAQkU (ORCPT ); Fri, 1 Jul 2022 12:40:20 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ABEA27FF5 for ; Fri, 1 Jul 2022 09:40:14 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id o16-20020a05600c379000b003a02eaea815so4313558wmr.0 for ; Fri, 01 Jul 2022 09:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3gytAPwyfOtXarB0gmwWuVe9Ikqalz5MJ7KJtzEP1EE=; b=uK/eSCrA/1Shj2LUv3K9m7rVIxV/8Aw3Wjn3cs3i4/iv1+K9gCEIAE/t5oMbUBcfCH ebeIRfrRGvOrz4zoZ/lABSMA/+dPdxiNYLLt9hhN8OKQkrYAgCrlQFrRNGCBZHTb/xLe mO7/VOueh5PZ3cfPbcNAAhzEJECIdt2InRhMx/6tWbU4WuqpysJ0xA641tWV9HeHtRwJ 8DmVWcT0VJVl35KQZN4a5AYjbm9cQmzHUWxAqIVidOhM7x+FV/kGM+BoP0ryd2mW4Y8S hqn79/z/bj9p/hGwGP9bxdbjRfjgynw9KfleTO8JnlDOTO59amlmF9R6Ovdc83HKpbM5 qslA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3gytAPwyfOtXarB0gmwWuVe9Ikqalz5MJ7KJtzEP1EE=; b=wwJgP8FW4CHFFWHj2pf/MJ+FMKjumoY4CJGlLVz3hJZPWprPffLunJIhMQ3/0WjV0G bMxBRCkYg8Sq2Gm7QLeIXmkiUD+aDwBRRTGBghkONa3pF3MVdHsGQhjhv6RYp9pcDznp GIzHhWfmdlmDdKSGbvpqRV1t0CIAZ5oKouGMeAq9p7YGI+TWJCqFHbRIXi/T6bLIz3GQ 35ut3zMuIfD3x8WPyy4VQj9JBQW5MzDN/nX2kvMN/QjgWt1JuaxC5ksEIL0nN4c0Vjz8 7sHzdmpN4fHNwLswswa0V7w9TF/uSA2hVfcfWwtDQxgRm54Zj57UClBJzWr3NDUUSOPQ bOCA== X-Gm-Message-State: AJIora8JUWPRES77cMs7Jr1TXm1PqvVI1CfG6HDw/+BWYz05Ud9+BGta HMYf0QDG42/4trHwWXc/Ntle0G+ZOOLKBA4M X-Google-Smtp-Source: AGRyM1sBBHZpA9X9hjl2g8ctbPF+JQbk154j2D3VUe0teaNKXHAaM6uE0+ECm6DdmhNtx6DiF9eXpg== X-Received: by 2002:a05:600c:3d8b:b0:3a0:466c:b08d with SMTP id bi11-20020a05600c3d8b00b003a0466cb08dmr16822009wmb.125.1656693614071; Fri, 01 Jul 2022 09:40:14 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id f25-20020a7bcd19000000b0039c673952bfsm6724309wmj.6.2022.07.01.09.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 09:40:13 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, mlxsw@nvidia.com, saeedm@nvidia.com, moshe@nvidia.com Subject: [patch net-next v2 3/3] net: devlink: fix unlocked vs locked functions descriptions Date: Fri, 1 Jul 2022 18:40:07 +0200 Message-Id: <20220701164007.1243684-4-jiri@resnulli.us> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220701164007.1243684-1-jiri@resnulli.us> References: <20220701164007.1243684-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko To be unified with the rest of the code, the unlocked version (devl_*) of function should have the same description in documentation as the locked one. Add the missing documentation. Also, add "Context" annotation for the locked versions where it is missing. Signed-off-by: Jiri Pirko --- v1->v2: - s/devlink_/devl_/ for unregister comment - removed tabs - added ()s --- net/core/devlink.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/net/core/devlink.c b/net/core/devlink.c index a7477addbd59..330a7260fae0 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -9877,6 +9877,19 @@ static void devlink_port_type_warn_cancel(struct devlink_port *devlink_port) cancel_delayed_work_sync(&devlink_port->type_warn_dw); } +/** + * devl_port_register() - Register devlink port + * + * @devlink: devlink + * @devlink_port: devlink port + * @port_index: driver-specific numerical identifier of the port + * + * Register devlink port with provided port index. User can use + * any indexing, even hw-related one. devlink_port structure + * is convenient to be embedded inside user driver private structure. + * Note that the caller should take care of zeroing the devlink_port + * structure. + */ int devl_port_register(struct devlink *devlink, struct devlink_port *devlink_port, unsigned int port_index) @@ -9915,6 +9928,8 @@ EXPORT_SYMBOL_GPL(devl_port_register); * is convenient to be embedded inside user driver private structure. * Note that the caller should take care of zeroing the devlink_port * structure. + * + * Context: Takes and release devlink->lock . */ int devlink_port_register(struct devlink *devlink, struct devlink_port *devlink_port, @@ -9929,6 +9944,11 @@ int devlink_port_register(struct devlink *devlink, } EXPORT_SYMBOL_GPL(devlink_port_register); +/** + * devl_port_unregister() - Unregister devlink port + * + * @devlink_port: devlink port + */ void devl_port_unregister(struct devlink_port *devlink_port) { lockdep_assert_held(&devlink_port->devlink->lock); @@ -9946,6 +9966,8 @@ EXPORT_SYMBOL_GPL(devl_port_unregister); * devlink_port_unregister - Unregister devlink port * * @devlink_port: devlink port + * + * Context: Takes and release devlink->lock . */ void devlink_port_unregister(struct devlink_port *devlink_port) { @@ -10206,6 +10228,15 @@ int devl_rate_leaf_create(struct devlink_port *devlink_port, void *priv) } EXPORT_SYMBOL_GPL(devl_rate_leaf_create); +/** + * devlink_rate_leaf_create - create devlink rate leaf + * @devlink_port: devlink port object to create rate object on + * @priv: driver private data + * + * Create devlink rate object of type leaf on provided @devlink_port. + * + * Context: Takes and release devlink->lock . + */ int devlink_rate_leaf_create(struct devlink_port *devlink_port, void *priv) { @@ -10220,6 +10251,11 @@ devlink_rate_leaf_create(struct devlink_port *devlink_port, void *priv) } EXPORT_SYMBOL_GPL(devlink_rate_leaf_create); +/** + * devl_rate_leaf_destroy - destroy devlink rate leaf + * + * @devlink_port: devlink port linked to the rate object + */ void devl_rate_leaf_destroy(struct devlink_port *devlink_port) { struct devlink_rate *devlink_rate = devlink_port->devlink_rate;