[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQsWBXonR4lwK6uo@horms.kernel.org>
Date: Wed, 5 Nov 2025 09:16:53 +0000
From: Simon Horman <horms@...nel.org>
To: Fan Gong <gongfan1@...wei.com>
Cc: Zhu Yikai <zhuyikai1@...artners.com>, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>, Markus.Elfring@....de,
pavan.chebbi@...adcom.com, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, luosifu <luosifu@...wei.com>,
Xin Guo <guoxin09@...wei.com>,
Shen Chenyang <shenchenyang1@...ilicon.com>,
Zhou Shuai <zhoushuai28@...wei.com>, Wu Like <wulike1@...wei.com>,
Shi Jing <shijing34@...wei.com>,
Luo Yang <luoyang82@...artners.com>,
Meny Yossefi <meny.yossefi@...wei.com>,
Gur Stavi <gur.stavi@...wei.com>
Subject: Re: [PATCH net-next v04 5/5] hinic3: Add netdev register interfaces
On Wed, Oct 29, 2025 at 02:16:29PM +0800, Fan Gong wrote:
...
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c b/drivers/net/ethernet/huawei/hinic3/hinic3_main.c
...
> @@ -250,7 +319,29 @@ static void netdev_feature_init(struct net_device *netdev)
> if (hinic3_test_support(nic_dev, HINIC3_NIC_F_TSO))
> tso_fts |= NETIF_F_TSO | NETIF_F_TSO6;
>
> - netdev->features |= dft_fts | cso_fts | tso_fts;
> + if (hinic3_test_support(nic_dev, HINIC3_NIC_F_RX_VLAN_STRIP |
> + HINIC3_NIC_F_TX_VLAN_INSERT))
> + vlan_fts |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
> +
> + if (hinic3_test_support(nic_dev, HINIC3_NIC_F_RX_VLAN_FILTER))
> + vlan_fts |= NETIF_F_HW_VLAN_CTAG_FILTER;
> +
> + if (hinic3_test_support(nic_dev, HINIC3_NIC_F_VXLAN_OFFLOAD))
> + tso_fts |= NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_UDP_TUNNEL_CSUM;
> +
> + /* LRO is disabled by default, only set hw features */
> + if (hinic3_test_support(nic_dev, HINIC3_NIC_F_LRO))
> + hw_features |= NETIF_F_LRO;
> +
> + netdev->features |= dft_fts | cso_fts | tso_fts | vlan_fts;
> + netdev->vlan_features |= dft_fts | cso_fts | tso_fts;
> + hw_features |= netdev->hw_features | netdev->features;
nit: The line above seems to be indented too much.
> + netdev->hw_features = hw_features;
> + netdev->priv_flags |= IFF_UNICAST_FLT;
> +
> + netdev->hw_enc_features |= dft_fts;
> + if (hinic3_test_support(nic_dev, HINIC3_NIC_F_VXLAN_OFFLOAD))
> + netdev->hw_enc_features |= cso_fts | tso_fts | NETIF_F_TSO_ECN;
> }
>
> static int hinic3_set_default_hw_feature(struct net_device *netdev)
...
Powered by blists - more mailing lists