From: Simon Horman <horms@kernel.org>
To: Geetha sowjanya <gakula@marvell.com>
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
Date: Sat, 11 May 2024 15:10:36 +0100 [thread overview]
Message-ID: <20240511141036.GG2347895@kernel.org> (raw)
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 <gakula@marvell.com>
...
> 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;
> + }
...
next prev parent reply other threads:[~2024-05-11 14:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 16:39 [net-next PATCH v4 00/10] Introduce RVU representors Geetha sowjanya
2024-05-07 16:39 ` [net-next PATCH v4 01/10] octeontx2-pf: Refactoring RVU driver Geetha sowjanya
2024-05-07 16:39 ` [net-next PATCH v4 02/10] octeontx2-pf: RVU representor driver Geetha sowjanya
2024-05-10 3:35 ` Jakub Kicinski
2024-05-13 10:28 ` [EXTERNAL] " Geethasowjanya Akula
2024-05-07 16:39 ` [net-next PATCH v4 03/10] octeontx2-pf: Create representor netdev Geetha sowjanya
2024-05-10 3:28 ` Jakub Kicinski
2024-05-13 10:35 ` [EXTERNAL] " Geethasowjanya Akula
2024-05-11 14:10 ` Simon Horman [this message]
2024-05-13 10:38 ` Geethasowjanya Akula
2024-05-07 16:39 ` [net-next PATCH v4 04/10] octeontx2-pf: Add basic net_device_ops Geetha sowjanya
2024-05-07 16:39 ` [net-next PATCH v4 05/10] octeontx2-af: Add packet path between representor and VF Geetha sowjanya
2024-05-07 16:39 ` [net-next PATCH v4 06/10] octeontx2-pf: Get VF stats via representor Geetha sowjanya
2024-05-07 16:39 ` [net-next PATCH v4 07/10] octeontx2-pf: Add support to sync link state between representor and VFs Geetha sowjanya
2024-05-07 16:39 ` [net-next PATCH v4 08/10] octeontx2-pf: Configure VF mtu via representor Geetha sowjanya
2024-05-07 16:39 ` [net-next PATCH v4 09/10] octeontx2-pf: Add representors for sdp MAC Geetha sowjanya
2024-05-10 3:32 ` Jakub Kicinski
2024-05-13 10:32 ` [EXTERNAL] " Geethasowjanya Akula
2024-05-07 16:39 ` [net-next PATCH v4 10/10] octeontx2-pf: Add devlink port support Geetha sowjanya
2024-05-10 3:35 ` [net-next PATCH v4 00/10] Introduce RVU representors Jakub Kicinski
2024-05-13 10:31 ` [EXTERNAL] " Geethasowjanya Akula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240511141036.GG2347895@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).