From: Simon Horman <horms@kernel.org>
To: Jijie Shao <shaojijie@huawei.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, andrew+netdev@lunn.ch, shenjian15@huawei.com,
wangpeiyang1@huawei.com, liuyonglong@huawei.com,
chenhao418@huawei.com, jonathan.cameron@huawei.com,
shameerali.kolothum.thodi@huawei.com, salil.mehta@huawei.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 3/3] net: hns3: store rx VLAN tag offload state for VF
Date: Wed, 2 Apr 2025 15:01:55 +0100 [thread overview]
Message-ID: <20250402140155.GR214849@horms.kernel.org> (raw)
In-Reply-To: <20250402121001.663431-4-shaojijie@huawei.com>
On Wed, Apr 02, 2025 at 08:10:01PM +0800, Jijie Shao wrote:
> From: Jian Shen <shenjian15@huawei.com>
>
> The VF driver missed to store the rx VLAN tag strip state when
> user change the rx VLAN tag offload state. And it will default
> to enable the rx vlan tag strip when re-init VF device after
> reset. So if user disable rx VLAN tag offload, and trig reset,
> then the HW will still strip the VLAN tag from packet nad fill
> into RX BD, but the VF driver will ignore it for rx VLAN tag
> offload disabled. It may cause the rx VLAN tag dropped.
>
> Fixes: b2641e2ad456 ("net: hns3: Add support of hardware rx-vlan-offload to HNS3 VF driver")
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Overall this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
...
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
> index cccef3228461..1e452b14b04e 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
> @@ -252,7 +252,8 @@ struct hclgevf_dev {
> u16 *vector_status;
> int *vector_irq;
>
> - bool gro_en;
> + u32 gro_en :1;
> + u32 rxvtag_strip_en :1;
FWIIW, as there is space I would have used two bools here.
>
> unsigned long vlan_del_fail_bmap[BITS_TO_LONGS(VLAN_N_VID)];
>
> --
> 2.33.0
>
next prev parent reply other threads:[~2025-04-02 14:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 12:09 [PATCH net 0/3] There are some bugfix for the HNS3 ethernet driver Jijie Shao
2025-04-02 12:09 ` [PATCH net 1/3] net: hns3: fix a use of uninitialized variable problem Jijie Shao
2025-04-02 13:58 ` Simon Horman
2025-04-03 1:27 ` Jijie Shao
2025-04-02 12:10 ` [PATCH net 2/3] net: hns3: fix spelling mistake "reg_um" -> "reg_num" Jijie Shao
2025-04-02 13:59 ` Simon Horman
2025-04-03 1:22 ` Jijie Shao
2025-04-02 12:10 ` [PATCH net 3/3] net: hns3: store rx VLAN tag offload state for VF Jijie Shao
2025-04-02 14:01 ` Simon Horman [this message]
2025-04-03 1:21 ` Jijie Shao
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=20250402140155.GR214849@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=chenhao418@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jonathan.cameron@huawei.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shaojijie@huawei.com \
--cc=shenjian15@huawei.com \
--cc=wangpeiyang1@huawei.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).