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>,
Meny Yossefi <meny.yossefi@huawei.com>,
Gur Stavi <gur.stavi@huawei.com>
Subject: Re: [PATCH net-next v06 5/5] hinic3: Add netdev register interfaces
Date: Mon, 10 Nov 2025 19:04:59 -0800 [thread overview]
Message-ID: <20251110190459.1e67306d@kernel.org> (raw)
In-Reply-To: <992e9004fe0c32964a3d32a298dc9d869c00d6cb.1762581665.git.zhuyikai1@h-partners.com>
On Sat, 8 Nov 2025 14:41:40 +0800 Fan Gong wrote:
> Add netdev notifier to accept netdev event.
> Refine port event type to change link status.
Please explain the "why", why is this patch needed.
This commit message is woefully inadequate for this patch.
Plus the patch seems to, again, be doing multiple things.
> +static int hinic3_netdev_event(struct notifier_block *notifier,
> + unsigned long event, void *ptr)
> +{
> + struct net_device *ndev = netdev_notifier_info_to_dev(ptr);
> + struct hinic3_nic_dev *nic_dev = netdev_priv(ndev);
> + u16 vlan_depth;
> +
> + if (!is_vlan_dev(ndev))
> + return NOTIFY_DONE;
> +
> + netdev_hold(ndev, &nic_dev->tracker, GFP_ATOMIC);
> +
> + switch (event) {
> + case NETDEV_REGISTER:
> + vlan_depth = hinic3_get_vlan_depth(ndev);
> + if (vlan_depth == HINIC3_MAX_VLAN_DEPTH_OFFLOAD_SUPPORT) {
> + ndev->vlan_features &= (~HINIC3_VLAN_CLEAR_OFFLOAD);
> + } else if (vlan_depth > HINIC3_MAX_VLAN_DEPTH_OFFLOAD_SUPPORT) {
> + ndev->hw_features &= (~HINIC3_VLAN_CLEAR_OFFLOAD);
> + ndev->features &= (~HINIC3_VLAN_CLEAR_OFFLOAD);
> + }
Why are you doing this? Are vlan_features inherited across multiple
layers of vlan devices? Vlan tags can be pushed in multiple ways, not
just by stacking a device on top. If your device can't handle stacked
vlans and (somehow?) the stack is serving you multi-vlan frames I think
you need to fix it in ndo_features_check
prev parent reply other threads:[~2025-11-11 3:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 6:41 [PATCH net-next v06 0/5] net: hinic3: PF initialization Fan Gong
2025-11-08 6:41 ` [PATCH net-next v06 1/5] hinic3: Add PF framework Fan Gong
2025-11-08 6:41 ` [PATCH net-next v06 2/5] hinic3: Add PF management interfaces Fan Gong
2025-11-11 2:47 ` Jakub Kicinski
2025-11-08 6:41 ` [PATCH net-next v06 3/5] hinic3: Add NIC configuration ops Fan Gong
2025-11-11 2:56 ` Jakub Kicinski
2025-11-08 6:41 ` [PATCH net-next v06 4/5] hinic3: Add mac filter ops Fan Gong
2025-11-08 6:41 ` [PATCH net-next v06 5/5] hinic3: Add netdev register interfaces Fan Gong
2025-11-11 3:04 ` Jakub Kicinski [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=20251110190459.1e67306d@kernel.org \
--to=kuba@kernel.org \
--cc=Markus.Elfring@web.de \
--cc=alok.a.tiwari@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gongfan1@huawei.com \
--cc=guoxin09@huawei.com \
--cc=gur.stavi@huawei.com \
--cc=horms@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luosifu@huawei.com \
--cc=luoyang82@h-partners.com \
--cc=meny.yossefi@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=shenchenyang1@hisilicon.com \
--cc=shijing34@huawei.com \
--cc=wulike1@huawei.com \
--cc=zhoushuai28@huawei.com \
--cc=zhuyikai1@h-partners.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).