Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1093796lqo; Sat, 11 May 2024 07:10:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXOYIamvyMst9DGZyCnA2KhZIaFmq4iT+JhvBNNlGzoaAiMJKRnB9P8X27320Cr4FqF8FbWe5Pi77a7Mb94zo8No2ThW1ZgS5EBxfKacQ== X-Google-Smtp-Source: AGHT+IFjJEnD3sOHUrYQ+GQHKOcXQeIht8dYAWuCAtsk9OCC1a4zNQkl157nNCU7NOYVcHBfD7Wa X-Received: by 2002:a05:6a00:2d8e:b0:6e6:946b:a983 with SMTP id d2e1a72fcca58-6f4e02ac8e1mr5969960b3a.10.1715436650286; Sat, 11 May 2024 07:10:50 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a91475si5660037b3a.113.2024.05.11.07.10.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 07:10:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=aLImxu8A; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-176568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C1F94282162 for ; Sat, 11 May 2024 14:10:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A15ED51034; Sat, 11 May 2024 14:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aLImxu8A" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF0A06FC6; Sat, 11 May 2024 14:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715436642; cv=none; b=ewJWrk/1bjPHlKoe3QdPWpCKGsissrwq1MSUcm+RWtnbcXeQZ8enjkY1Zqh7a3oRCQCpIUx2/J1yb7zOWsf5ES44zB2QWH7bziOCpg28zZnMb5S7zFy0wSVy5uoEQzrcQkaLHhOo9rxoI5VlFyIRQeWfSnj9mlEJUYAXlxWOq5I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715436642; c=relaxed/simple; bh=zD5fChJ3hY7Vmh3mn4DutQ/zNAJcBuVvGUeGdpCzZ5U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I0XmCQIT447QCXYMTcIUgwgsqTG5/kFawHmK1UadCKI+YT27JXE3EqDAB5a3A7YK9BPomZpVuR58G5/C6+sS3MJA0Vc4GmqkF5c6m3cFMHy/8z5HFLg2iKvVHsGmvS4OjkwVQG9LM0134Ltm6eR+ar868zVFpTmgZ00KusL0aHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aLImxu8A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C47DC2BBFC; Sat, 11 May 2024 14:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715436642; bh=zD5fChJ3hY7Vmh3mn4DutQ/zNAJcBuVvGUeGdpCzZ5U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aLImxu8ACnlb783mu9dsXGyEYmPsjqZH2+9wZnUrkFcH5PSKNwPGXtMcf40Ty6jDC 3WMfMAhe0s4E/hArSsdoSvTIk2jSWAxAqAKUEzH8Gge1Ey1V566lINOFPPzzyidBRW 9iQoWWLL7/UzAJajSWNhYynl/yExAP8f/rfWBLrHdUtjWtORtt2caYH/C0Wndn65vk C/vNe69SwXUt7orpUHNtSyR4fjyTVPbHWyDOsu7G/siDPgyA9qPnZZNqZAkwpxyjJf UquyN/e05Ple1A3vfLpdu2Jn4NAR5KBWJmuY8Ivk9qJ2BLoBJpLOZgaPeiByjHP8n5 5Nrub4l79alvw== Date: Sat, 11 May 2024 15:10:36 +0100 From: Simon Horman To: Geetha sowjanya Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, sgoutham@marvell.com, sbhatta@marvell.com, hkelam@marvell.com Subject: Re: [net-next PATCH v4 03/10] octeontx2-pf: Create representor netdev Message-ID: <20240511141036.GG2347895@kernel.org> References: <20240507163921.29683-1-gakula@marvell.com> <20240507163921.29683-4-gakula@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240507163921.29683-4-gakula@marvell.com> On Tue, May 07, 2024 at 10:09:14PM +0530, Geetha sowjanya wrote: > Adds initial devlink support to set/get the switchdev mode. > Representor netdevs are created for each rvu devices when > the switch mode is set to 'switchdev'. These netdevs are > be used to control and configure VFs. > > Signed-off-by: Geetha sowjanya .. > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c > index 33ebbcb223e1..ff4318f414f8 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c > @@ -28,6 +28,157 @@ MODULE_DESCRIPTION(DRV_STRING); > MODULE_LICENSE("GPL"); > MODULE_DEVICE_TABLE(pci, rvu_rep_id_table); > > +static int rvu_rep_napi_init(struct otx2_nic *priv, struct netlink_ext_ack *extack) > +{ > + struct otx2_cq_poll *cq_poll = NULL; > + struct otx2_qset *qset = &priv->qset; > + struct otx2_hw *hw = &priv->hw; > + int err = 0, qidx, vec; > + char *irq_name; Please consider using reverse xmas tree - longest line to shortest - for local variable declarations in new Networking code. This tool can be helpful: https://github.com/ecree-solarflare/xmastree .. > +int rvu_rep_create(struct otx2_nic *priv, struct netlink_ext_ack *extack) > +{ > + int rep_cnt = priv->rep_cnt; > + struct net_device *ndev; > + struct rep_dev *rep; > + int rep_id, err; > + u16 pcifunc; > + > + priv->reps = devm_kcalloc(priv->dev, rep_cnt, sizeof(struct rep_dev *), > + GFP_KERNEL); > + if (!priv->reps) > + return -ENOMEM; > + > + for (rep_id = 0; rep_id < rep_cnt; rep_id++) { > + ndev = alloc_etherdev(sizeof(*rep)); > + if (!ndev) { > + NL_SET_ERR_MSG_FMT_MOD(extack, "PFVF representor:%d > + creation failed", rep_id); gcc-13 seems unhappy with a string spanning multiple lines. I suggest living with a line longer than 80 columns in this case. Maybe: NL_SET_ERR_MSG_FMT_MOD(extack, "PFVF representor:%d creation failed", rep_id); > + err = -ENOMEM; > + goto exit; > + } ..