[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251107082624.931-1-gongfan1@huawei.com>
Date: Fri, 7 Nov 2025 16:26:24 +0800
From: Fan Gong <gongfan1@...wei.com>
To: <alok.a.tiwari@...cle.com>
CC: <Markus.Elfring@....de>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
<edumazet@...gle.com>, <gongfan1@...wei.com>, <guoxin09@...wei.com>,
<gur.stavi@...wei.com>, <horms@...nel.org>, <kuba@...nel.org>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<luosifu@...wei.com>, <luoyang82@...artners.com>, <meny.yossefi@...wei.com>,
<netdev@...r.kernel.org>, <pabeni@...hat.com>, <pavan.chebbi@...adcom.com>,
<shenchenyang1@...ilicon.com>, <shijing34@...wei.com>, <wulike1@...wei.com>,
<zhoushuai28@...wei.com>, <zhuyikai1@...artners.com>
Subject: Re: [External] : [PATCH net-next v05 1/5] hinic3: Add PF framework
On 11/6/2025 10:19 PM, ALOK TIWARI wrote:
> > + if (src_func_id == MBOX_MGMT_FUNC_ID) {
> > + msg_ch = &mbox->mgmt_msg;
> > + } else if (HINIC3_IS_VF(hwdev)) {
> > + /* message from pf */
> > + msg_ch = mbox->func_msg;
> > + if (src_func_id != hinic3_pf_id_of_vf(hwdev) || !msg_ch)
> > + return NULL;
> > + } else if (src_func_id > hinic3_glb_pf_vf_offset(hwdev)) {
> > + /* message from vf */
> > + id = (src_func_id - 1) - hinic3_glb_pf_vf_offset(hwdev);
> > + if (id >= 1)
> > + return NULL;
>
> hard coding id >= 1, is only one VF supported?
Hi, Alok. Thanks for your reviews.
This is an oversight on "get_mbox_msg_desc". The part of "message from vf"
should be removed in this patch because currently hinic3 driver does not support
communication between VF and PF.
Besides, as it is incorrectly placed here, it appears to support only one vf
and pf communication. But actually pf can communicate with all vf that belongs
to it. This part of code will be contained in future SRIOV subject.
> > + if (HINIC3_IS_VF(hwdev)) {
> > + /* VF to PF mbox message channel */
> > + err = hinic3_init_func_mbox_msg_channel(hwdev);
> > + if (err)
> > + goto err_uninit_mgmt_msg_ch;
> > + }
> > +
> > err = hinic3_init_func_mbox_msg_channel(hwdev);
>
> is hinic3_init_func* second init for PF and
> VF executes both calls, is that correct?
hinic3_init_func* only inits for VF and PF initialization is in future SRIOV
subject. So this is oversight and we should remove the redundant initialization
for PF.
The rest comments will be solved in the next version sooner.
Thanks,
Fan Gong
Powered by blists - more mailing lists