From: Simon Horman <horms@kernel.org>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Cc: Chenyuan Yang <chenyuan0y@gmail.com>,
sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
hkelam@marvell.com, bbhushan2@marvell.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] octeontx2-pf: handle otx2_mbox_get_rsp errors
Date: Tue, 15 Apr 2025 19:51:13 +0100 [thread overview]
Message-ID: <20250415185113.GG395307@horms.kernel.org> (raw)
In-Reply-To: <Z/zrwJJhR1pDwfj/@mev-dev.igk.intel.com>
On Mon, Apr 14, 2025 at 01:04:32PM +0200, Michal Swiatkowski wrote:
> On Sat, Apr 12, 2025 at 01:33:27PM -0500, Chenyuan Yang wrote:
> > Adding error pointer check after calling otx2_mbox_get_rsp().
> >
> > This is similar to the commit bd3110bc102a
> > ("octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_flows.c").
> >
> > Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
> > Fixes: 6c40ca957fe5 ("octeontx2-pf: Adds TC offload support")
> > ---
> > drivers/net/ethernet/marvell/octeontx2/nic/rep.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
> > index 04e08e06f30f..7153a71dfc86 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
> > @@ -67,6 +67,8 @@ static int rvu_rep_mcam_flow_init(struct rep_dev *rep)
> >
> > rsp = (struct npc_mcam_alloc_entry_rsp *)otx2_mbox_get_rsp
> > (&priv->mbox.mbox, 0, &req->hdr);
> > + if (IS_ERR(rsp))
> > + goto exit;
>
> Changes looks fine:
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>
> BTW, looks like now you can use break instead of goto exit, as exit
> label is just after the while loop.
True. My suggestion would be to keep this patch as-is. And, once it has
hit net-next, send a follow-up to remove the exit label.
>
> >
> > for (ent = 0; ent < rsp->count; ent++)
> > rep->flow_cfg->flow_ent[ent + allocated] = rsp->entry_list[ent];
> > --
> > 2.34.1
>
next prev parent reply other threads:[~2025-04-15 18:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 18:33 [PATCH] octeontx2-pf: handle otx2_mbox_get_rsp errors Chenyuan Yang
2025-04-14 11:04 ` Michal Swiatkowski
2025-04-15 18:51 ` Simon Horman [this message]
2025-04-16 0:20 ` patchwork-bot+netdevbpf
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=20250415185113.GG395307@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=chenyuan0y@gmail.com \
--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=michal.swiatkowski@linux.intel.com \
--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 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.