Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4464735pxf; Tue, 16 Mar 2021 14:20:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL4DLYY+0Wx7qgdWOCDq0UZpuDr4CNBCiOqtDyglAnVoztBz9tYamiwA6UEZ67k3lG+trK X-Received: by 2002:aa7:d4d6:: with SMTP id t22mr39245168edr.376.1615929633466; Tue, 16 Mar 2021 14:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615929633; cv=none; d=google.com; s=arc-20160816; b=BtrzL5jV4qFlbpZN9MWf+xhR+QjKyuAMa5WkRPbHiXzHyjhXu/jWHe4H5cWuS4nJTk qjjDKSfM9BdMnpwpakwZGQlWCOHkdODRgyWEszdB1tUDUlUisjUiWiw4lWmU423GUD65 1bWxlZv9cRCUeKT9XszgysjC2n6pK8+dpuCIJrX894by3w9YhMzQdZj8MyK0UDy7QdEu uyO1GxlTVbHLhqQiCLNgLnDFcyoZl7FSjpcI9iJk7dZbB4cJSpCxnOiw2VE7Z8rghPkp yXtMDE5tx5R1hWm17H5/CWMsyjfYFoyCF8y4OEKeauUMj1sDRxNDG8QMrsIqEES4PmnR nyoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CafEaY8564FXEYcCceAauk7BwBP9On3BTyx0/8WTv5s=; b=QIod+TckmTYHC3QwXpoP+lD3VNnUN4L6lSH5gp8BWrD2gXdb4KSyISsts4OdvdtpAj Nm2CgxROKgBZcZXgYBHGwFcrU9VlvTe1q1AuKwGJ/pqCUp0vA9UzWAvTr1jJvaDaBend gw2bhO8xShCjwhW4UkJojenk6HWyYmI5slmy24B2RhL0Olt+n+yuJE5CKR4zCooJxTLa PEfeHNYNTLM0v8TwNRak42YK68jD0qEKatHJFRb9yMHczrXx5hIhtIPHrxa/PXAInRmQ M64RurvpspwJAoUSYn8kH4xwy3Ae8CdTlSPX38+S/qGxGGdbdbwUYGInR2cwOxZOjA8D H7Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nkiECfBc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ke20si13903165ejc.305.2021.03.16.14.20.05; Tue, 16 Mar 2021 14:20:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nkiECfBc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238954AbhCPSF0 (ORCPT + 99 others); Tue, 16 Mar 2021 14:05:26 -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-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