From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E533C433E6 for ; Tue, 16 Mar 2021 18:05:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF14A65140 for ; Tue, 16 Mar 2021 18:05:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239775AbhCPSFa (ORCPT ); Tue, 16 Mar 2021 14:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232783AbhCPSDw (ORCPT ); Tue, 16 Mar 2021 14:03:52 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2BF9C06174A; Tue, 16 Mar 2021 11:03:51 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id 81so38154331iou.11; Tue, 16 Mar 2021 11:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CafEaY8564FXEYcCceAauk7BwBP9On3BTyx0/8WTv5s=; b=nkiECfBcjbDkFCe0f2FFi1QQ7HqzKuS9ztWFfqjpN9mWjLhQFpLWW9oQxvBx8k1Z9w FLJNr8D9OJ13SKaITpQFVdnjQ9eKJy4MJfWE/NL6Q2nw9ZZJqM2ocf//9/PlFZbRc4lI 95Rt0HoZAXiWBZP1ZJktx22gWTh/t85dQE1gJTFMDMCt9yd7AH9Hp3109xtkLGRZhKx5 GRpX5UNx5nVfbT8JWPP+p9ewkvDh0fXhC4NUKEAGsYotCkoePwkM4iaAFXD97THiC0Tp MPHUJlUpOE56fs6o3vz0bFby1wsyO8JHenqp3i/oDq60JJn/OGkjhvLeMDsHc6NtBT6T KUVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CafEaY8564FXEYcCceAauk7BwBP9On3BTyx0/8WTv5s=; b=cvZwgW+vecM8owZst8bDE04JgCWaoAzcf4C+tcW2ORYF00IV/LWpm+HlrUYKke0sD7 TmtsoEkLeWpHebwZH0q/YPO8Rmu8DyubahPEipQYBxhXQ7Jv9Hy4CElUnXVJNSvNRCNK 3edtp4KapTZwpJPvCgftGRTFTEHGxKUtUx6yikwsN61HjAbeAhPk2mJgwQ3YiSoEWton i2j85/Ey0jo9U2FOMMuY7iu50q/jtrilpLnAws8WKLWwIlr20QVbqa9MdQyT18CUgUFT RFzqik9ARlaAbof2D9cHguQd87iYR76dxgLPSuu1Q1mnXtVvZhgwwSJO9J0CFxqrvZNl +TiQ== X-Gm-Message-State: AOAM533ZmB2y+zFoSYkK0EZxsYC+62Mnhw0g2Cj3jZ5txQ8MI0mqxuyv t8EZfgxHr8wMRPtgNwcR3PoThBxssfQeewtFoos= X-Google-Smtp-Source: ABdhPJxi1FvF+fi+k58yo4fMN7krMCCEGP0T6HQW4wj2wykGCp6iFI7yrCvkeZ0/50PIIQEfkzu8YgDKz4WOWzwaMuc= X-Received: by 2002:a02:94cb:: with SMTP id x69mr15581624jah.8.1615917831173; Tue, 16 Mar 2021 11:03:51 -0700 (PDT) MIME-Version: 1.0 References: <1615886833-71688-1-git-send-email-hkelam@marvell.com> <1615886833-71688-4-git-send-email-hkelam@marvell.com> <20210316100432.666d9bd5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210316100432.666d9bd5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: sundeep subbaraya Date: Tue, 16 Mar 2021 23:33:40 +0530 Message-ID: Subject: Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private To: Jakub Kicinski Cc: Hariprasad Kelam , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , Sunil Kovvuri Goutham , lcherian@marvell.com, Geetha sowjanya , jerinj@marvell.com, Subbaraya Sundeep Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jakub, On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski wrote: > > On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote: > > From: Subbaraya Sundeep > > > > Memory for driver private structure rvu_devlink is > > also allocated during devlink_alloc. Hence use > > the allocated memory by devlink_alloc and access it > > by devlink_priv call. > > > > Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver") > > Signed-off-by: Subbaraya Sundeep > > Signed-off-by: Hariprasad Kelam > > Signed-off-by: Sunil Kovvuri Goutham > > Does it fix any bug? Looks like a coding improvement. Without this we cannot fetch our private struct 'rvu_devlink' from any of the functions in devlink_ops which may get added in future. Thanks, Sundeep