[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACKFLinG4a8D-=erOkcU7JbHzq2UjbxRhqf7QXP9OBVo1rP9aw@mail.gmail.com>
Date: Sat, 8 Jun 2024 08:19:32 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Simon Horman <horms@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, andrew.gospodarek@...adcom.com,
Somnath Kotur <somnath.kotur@...adcom.com>, Pavan Chebbi <pavan.chebbi@...adcom.com>
Subject: Re: [PATCH net] bnxt_en: Cap the size of HWRM_PORT_PHY_QCFG forwarded response
On Fri, Jun 7, 2024 at 6:50 AM Simon Horman <horms@...nel.org> wrote:
>
> On Thu, Jun 06, 2024 at 10:51:07AM -0700, Michael Chan wrote:
> > Firmware interface 1.10.2.118 has increased the size of
> > HWRM_PORT_PHY_QCFG response beyond the maximum size that can be
> > forwarded. When the VF's link state is not the default auto state,
> > the PF will need to forward the response back to the VF to indicate
> > the forced state. This regression may cause the VF to fail to
> > initialize.
> >
> > Fix it by capping the HWRM_PORT_PHY_QCFG response to the maximum
> > 96 bytes. Also modify bnxt_hwrm_fwd_resp() to print a warning if the
> > message size exceeds 96 bytes to make this failure more obvious.
> >
> > Bug: DCSG01725771
> > Change-Id: I4cd5e06a7625f9d06e779e4acd9603d355883e7c
>
> Hi Michael,
>
> Does the above relate to publicly available information?
> If so, a link is probably in order. If not, let's drop it.
Sorry, my mistake. I will drop it in v2.
>
> > Fixes: 84a911db8305 ("bnxt_en: Update firmware interface to 1.10.2.118")
> > Reviewed-by: Somnath Kotur <somnath.kotur@...adcom.com>
> > Reviewed-by: Pavan Chebbi <pavan.chebbi@...adcom.com>
> > Signed-off-by: Michael Chan <michael.chan@...adcom.com>
>
> ...
>
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
>
> ...
>
> > @@ -1096,6 +1099,8 @@ static int bnxt_vf_set_link(struct bnxt *bp, struct bnxt_vf_info *vf)
> > mutex_unlock(&bp->link_lock);
> > phy_qcfg_resp.resp_len = cpu_to_le16(sizeof(phy_qcfg_resp));
> > phy_qcfg_resp.seq_id = phy_qcfg_req->seq_id;
> > + phy_qcfg_resp.option_flags &=
> > + ~PORT_PHY_QCAPS_RESP_FLAGS2_SPEEDS2_SUPPORTED;
>
> I may be missing something obvious, but it is not clear to me
> how this change relates to the rest of the patch.
The SPEEDS2 fields were added to the structure and made the structure
bigger. For example, support_speeds2 was added beyond the 96 bytes.
So here, we're clearing this SPEEDS2_SUPPORTED flag in the legacy
structure so that the VF driver will not interpret the new SPEEDS2
fields beyond the legacy structure.
I will add a comment to make it more clear. Thanks for the review.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists