All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, sbhatta@marvell.com
Cc: kernel-janitors@vger.kernel.org
Subject: Re: [bug report] octeontx2-af: Introduce internal packet switching
Date: Fri, 23 Jul 2021 14:38:13 +0100	[thread overview]
Message-ID: <dfc6a8c8-e2a6-bcd3-6d16-81a888e8fd98@canonical.com> (raw)
In-Reply-To: <20210723133633.GA18413@kili>

On 23/07/2021 14:36, Dan Carpenter wrote:
> Hello Subbaraya Sundeep,
> 
> The patch 23109f8dd06d: "octeontx2-af: Introduce internal packet
> switching" from Jul 19, 2021, leads to the following static checker
> warning:
> 
> 	drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220 rvu_switch_disable()
> 	error: uninitialized symbol 'numvfs'.
> 
> drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c
>     195 void rvu_switch_disable(struct rvu *rvu)
>     196 {
>     197 	struct npc_delete_flow_req uninstall_req = { 0 };
>     198 	struct npc_mcam_free_entry_req free_req = { 0 };
>     199 	struct rvu_switch *rswitch = &rvu->rswitch;
>     200 	struct rvu_hwinfo *hw = rvu->hw;
>     201 	int pf, vf, numvfs, hwvf;
>                             ^^^^^^
>     202 	struct msg_rsp rsp;
>     203 	u16 pcifunc;
>     204 	int err;
>     205 
>     206 	if (!rswitch->used_entries)
>     207 		return;
>     208 
>     209 	for (pf = 1; pf < hw->total_pfs; pf++) {
>     210 		if (!is_pf_cgxmapped(rvu, pf))
>     211 			continue;
>     212 
>     213 		pcifunc = pf << 10;
>     214 		err = rvu_switch_install_rx_rule(rvu, pcifunc, 0xFFF);
>     215 		if (err)
>     216 			dev_err(rvu->dev,
>     217 				"Reverting RX rule for PF%d failed(%d)\n",
>     218 				pf, err);
>     219 
> --> 220 		for (vf = 0; vf < numvfs; vf++, hwvf++) {
>                                           ^^^^^^
> Never initialized.

And hwvf too.

> 
>     221 			pcifunc = pf << 10 | ((vf + 1) & 0x3FF);
>     222 			err = rvu_switch_install_rx_rule(rvu, pcifunc, 0xFFF);
>     223 			if (err)
>     224 				dev_err(rvu->dev,
>     225 					"Reverting RX rule for PF%dVF%d failed(%d)\n",
>     226 					pf, vf, err);
>     227 		}
>     228 	}
>     229 
>     230 	uninstall_req.start = rswitch->start_entry;
>     231 	uninstall_req.end =  rswitch->start_entry + rswitch->used_entries - 1;
>     232 	free_req.all = 1;
>     233 	rvu_mbox_handler_npc_delete_flow(rvu, &uninstall_req, &rsp);
>     234 	rvu_mbox_handler_npc_mcam_free_entry(rvu, &free_req, &rsp);
>     235 	rswitch->used_entries = 0;
>     236 	kfree(rswitch->entry2pcifunc);
>     237 }
> 
> regards,
> dan carpenter
> 


      reply	other threads:[~2021-07-23 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 13:36 [bug report] octeontx2-af: Introduce internal packet switching Dan Carpenter
2021-07-23 13:38 ` Colin Ian King [this message]

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=dfc6a8c8-e2a6-bcd3-6d16-81a888e8fd98@canonical.com \
    --to=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=sbhatta@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.