From: Jakub Kicinski <kuba@kernel•org>
To: Fan Gong <gongfan1@huawei•com>
Cc: Zhu Yikai <zhuyikai1@h-partners•com>, <netdev@vger•kernel.org>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Paolo Abeni <pabeni@redhat•com>, Simon Horman <horms@kernel•org>,
Andrew Lunn <andrew+netdev@lunn•ch>,
Markus Elfring <Markus.Elfring@web•de>,
Pavan Chebbi <pavan.chebbi@broadcom•com>,
ALOK TIWARI <alok.a.tiwari@oracle•com>,
<linux-kernel@vger•kernel.org>, <linux-doc@vger•kernel.org>,
luosifu <luosifu@huawei•com>, Xin Guo <guoxin09@huawei•com>,
Shen Chenyang <shenchenyang1@hisilicon•com>,
Zhou Shuai <zhoushuai28@huawei•com>, Wu Like <wulike1@huawei•com>,
Shi Jing <shijing34@huawei•com>,
Luo Yang <luoyang82@h-partners•com>
Subject: Re: [PATCH net-next v08 4/9] hinic3: Add .ndo_set_features and .ndo_fix_features
Date: Mon, 5 Jan 2026 17:40:19 -0800 [thread overview]
Message-ID: <20260105174019.1bbe2bd3@kernel.org> (raw)
In-Reply-To: <f46d3f76a7662374544d2b0dd16ed1ef04f1b8e9.1767495881.git.zhuyikai1@h-partners.com>
AI code review points out:
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c
> index 7fec13bbe60e..c8944c51e6bf 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c
[ ... ]
> +int hinic3_set_rx_vlan_offload(struct hinic3_hwdev *hwdev, u8 en)
> +{
> + struct l2nic_cmd_vlan_offload vlan_cfg = {};
^^^^
Note the zero initialization here.
[ ... ]
> +int hinic3_set_vlan_filter(struct hinic3_hwdev *hwdev, u32 vlan_filter_ctrl)
> +{
> + struct l2nic_cmd_set_vlan_filter vlan_filter;
^
Should this be zero-initialized with = {} like the other similar
functions in this file (hinic3_set_rx_lro, hinic3_set_rx_lro_timer,
hinic3_set_rx_vlan_offload)?
When hinic3_send_mbox_to_mgmt() fails, vlan_filter.msg_head.status
contains garbage which is then printed in the dev_err() message below.
Additionally, the uninitialized rsvd[2] and msg_head fields are sent to
the firmware in the mailbox message.
> + struct mgmt_msg_params msg_params = {};
> + int err;
next prev parent reply other threads:[~2026-01-06 1:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 3:13 [PATCH net-next v08 0/9] net: hinic3: PF initialization Fan Gong
2026-01-05 3:13 ` [PATCH net-next v08 1/9] hinic3: Add PF framework Fan Gong
2026-01-06 1:39 ` Jakub Kicinski
2026-01-05 3:13 ` [PATCH net-next v08 2/9] hinic3: Add PF management interfaces Fan Gong
2026-01-05 3:13 ` [PATCH net-next v08 3/9] hinic3: Add .ndo_tx_timeout and .ndo_get_stats64 Fan Gong
2026-01-06 1:39 ` Jakub Kicinski
2026-01-05 3:13 ` [PATCH net-next v08 4/9] hinic3: Add .ndo_set_features and .ndo_fix_features Fan Gong
2026-01-06 1:40 ` Jakub Kicinski [this message]
2026-01-05 3:13 ` [PATCH net-next v08 5/9] hinic3: Add .ndo_features_check Fan Gong
2026-01-05 3:13 ` [PATCH net-next v08 6/9] hinic3: Add .ndo_vlan_rx_add/kill_vid and .ndo_validate_addr Fan Gong
2026-01-05 3:13 ` [PATCH net-next v08 7/9] hinic3: Add adaptive IRQ coalescing with DIM Fan Gong
2026-01-06 1:40 ` Jakub Kicinski
2026-01-05 3:13 ` [PATCH net-next v08 8/9] hinic3: Add mac filter ops Fan Gong
2026-01-06 1:41 ` Jakub Kicinski
2026-01-05 3:13 ` [PATCH net-next v08 9/9] hinic3: Add HW event handler Fan Gong
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=20260105174019.1bbe2bd3@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=Markus.Elfring@web$(echo .)de \
--cc=alok.a.tiwari@oracle$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=gongfan1@huawei$(echo .)com \
--cc=guoxin09@huawei$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=linux-doc@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=luosifu@huawei$(echo .)com \
--cc=luoyang82@h-partners$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=pavan.chebbi@broadcom$(echo .)com \
--cc=shenchenyang1@hisilicon$(echo .)com \
--cc=shijing34@huawei$(echo .)com \
--cc=wulike1@huawei$(echo .)com \
--cc=zhoushuai28@huawei$(echo .)com \
--cc=zhuyikai1@h-partners$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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