From nobody Fri Jan 9 00:59:26 2026 Received: from canpmsgout02.his.huawei.com (canpmsgout02.his.huawei.com [113.46.200.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4BDC2561AE; Mon, 5 Jan 2026 03:13:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.217 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767582815; cv=none; b=GvlcWvLtM3pWDlyBdPYiOjzCkHZUKuM1qucYvgobGkgesXWOBf01axXyoEYWoXBPOnL7XEzxbrHDZp9j9I3+Xc8ptynWOOynY2AqnB/FqgpLwj8lAb8sNIpPMPy8tMMhsv/sKe3PdnLunsVawV4L1j3yYqRKnWCGdpkmSQiCVSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767582815; c=relaxed/simple; bh=WBnmaYucWwVOxrXBnNiEc3LcTF6dn5hE+okTOwJ2HD4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aaVvTLELSwFDY2O9KAkuwp4walAUhsoyhcwgegOP8hVYwpVBdSETSr/Jopi1OAmZbEWVMVF/8jTTnJhJKjww5i6tZJdSnBoikHvuHRFca1wHSLNIu/hyJFx93yoBcTcfYIH1NY7YchDYKzzDVb5EC8AWtxmBWXsX+qwKOC1AcFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=etDUXfzA; arc=none smtp.client-ip=113.46.200.217 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="etDUXfzA" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=4QS5NfTeBevCcL2YpMjSMb96YkAu76UEm5tfLlCMo10=; b=etDUXfzA5DC6mwRDeMSjl6Q0VoNI/TU2U5o7kG9ZoZu+1ojQ2k8j5XZ6jT0GJTeIgA3wBx00C vSCNuMGx7X+YpEN6Ia2uLYlPPqvnJ/j8VERB0qx/fogBtqwW6oQzQN+FuVBZItUiWezZB0yMpty 5Bd78RJJYNvByvIkHc0aO3Q= Received: from mail.maildlp.com (unknown [172.19.162.140]) by canpmsgout02.his.huawei.com (SkyGuard) with ESMTPS id 4dkzn64VjNzcZyQ; Mon, 5 Jan 2026 11:10:02 +0800 (CST) Received: from kwepemf100013.china.huawei.com (unknown [7.202.181.12]) by mail.maildlp.com (Postfix) with ESMTPS id 542532016A; Mon, 5 Jan 2026 11:13:30 +0800 (CST) Received: from DESKTOP-62GVMTR.china.huawei.com (10.174.188.120) by kwepemf100013.china.huawei.com (7.202.181.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Mon, 5 Jan 2026 11:13:29 +0800 From: Fan Gong To: Fan Gong , Zhu Yikai , , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Andrew Lunn , Markus Elfring , Pavan Chebbi , ALOK TIWARI CC: , , luosifu , Xin Guo , Shen Chenyang , Zhou Shuai , Wu Like , Shi Jing , Luo Yang Subject: [PATCH net-next v08 4/9] hinic3: Add .ndo_set_features and .ndo_fix_features Date: Mon, 5 Jan 2026 11:13:07 +0800 Message-ID: X-Mailer: git-send-email 2.51.0.windows.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemf100013.china.huawei.com (7.202.181.12) Content-Type: text/plain; charset="utf-8" Implement following callback function: .ndo_set_features .ndo_fix_features The .ndo_set_features function includes five features: rx_csum, tso, lro, rx_cvlan and vlan_filter. Add these new features in netdev_feature_init. Co-developed-by: Zhu Yikai Signed-off-by: Zhu Yikai Signed-off-by: Fan Gong --- .../net/ethernet/huawei/hinic3/hinic3_main.c | 33 +++- .../huawei/hinic3/hinic3_mgmt_interface.h | 40 +++++ .../huawei/hinic3/hinic3_netdev_ops.c | 161 ++++++++++++++++++ .../ethernet/huawei/hinic3/hinic3_nic_cfg.c | 130 ++++++++++++++ .../ethernet/huawei/hinic3/hinic3_nic_cfg.h | 5 + .../ethernet/huawei/hinic3/hinic3_nic_dev.h | 2 + 6 files changed, 370 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c b/drivers/net= /ethernet/huawei/hinic3/hinic3_main.c index 4503c9303ee4..704afd3189ee 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_main.c @@ -227,6 +227,8 @@ static void hinic3_assign_netdev_ops(struct net_device = *netdev) static void netdev_feature_init(struct net_device *netdev) { struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev); + netdev_features_t hw_features =3D 0; + netdev_features_t vlan_fts =3D 0; netdev_features_t cso_fts =3D 0; netdev_features_t tso_fts =3D 0; netdev_features_t dft_fts; @@ -239,7 +241,29 @@ static void netdev_feature_init(struct net_device *net= dev) if (hinic3_test_support(nic_dev, HINIC3_NIC_F_TSO)) tso_fts |=3D NETIF_F_TSO | NETIF_F_TSO6; =20 - netdev->features |=3D 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 |=3D 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 |=3D NETIF_F_HW_VLAN_CTAG_FILTER; + + if (hinic3_test_support(nic_dev, HINIC3_NIC_F_VXLAN_OFFLOAD)) + tso_fts |=3D 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 |=3D NETIF_F_LRO; + + netdev->features |=3D dft_fts | cso_fts | tso_fts | vlan_fts; + netdev->vlan_features |=3D dft_fts | cso_fts | tso_fts; + hw_features |=3D netdev->hw_features | netdev->features; + netdev->hw_features =3D hw_features; + netdev->priv_flags |=3D IFF_UNICAST_FLT; + + netdev->hw_enc_features |=3D dft_fts; + if (hinic3_test_support(nic_dev, HINIC3_NIC_F_VXLAN_OFFLOAD)) + netdev->hw_enc_features |=3D cso_fts | tso_fts | NETIF_F_TSO_ECN; } =20 static int hinic3_set_default_hw_feature(struct net_device *netdev) @@ -254,6 +278,13 @@ static int hinic3_set_default_hw_feature(struct net_de= vice *netdev) return err; } =20 + err =3D hinic3_set_hw_features(netdev); + if (err) { + hinic3_update_nic_feature(nic_dev, 0); + hinic3_set_nic_feature_to_hw(nic_dev); + return err; + } + return 0; } =20 diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h b/d= rivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h index 3a6d3ee534d0..69405715e734 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h @@ -56,6 +56,22 @@ struct l2nic_cmd_update_mac { u8 new_mac[ETH_ALEN]; }; =20 +struct l2nic_cmd_vlan_offload { + struct mgmt_msg_head msg_head; + u16 func_id; + u8 vlan_offload; + u8 rsvd1[5]; +}; + +/* set vlan filter */ +struct l2nic_cmd_set_vlan_filter { + struct mgmt_msg_head msg_head; + u16 func_id; + u8 rsvd[2]; + /* bit0:vlan filter en; bit1:broadcast_filter_en */ + u32 vlan_filter_ctrl; +}; + struct l2nic_cmd_set_ci_attr { struct mgmt_msg_head msg_head; u16 func_idx; @@ -102,6 +118,26 @@ struct l2nic_cmd_set_dcb_state { u8 rsvd[7]; }; =20 +struct l2nic_cmd_lro_config { + struct mgmt_msg_head msg_head; + u16 func_id; + u8 opcode; + u8 rsvd1; + u8 lro_ipv4_en; + u8 lro_ipv6_en; + /* unit is 1K */ + u8 lro_max_pkt_len; + u8 resv2[13]; +}; + +struct l2nic_cmd_lro_timer { + struct mgmt_msg_head msg_head; + /* 1: set timer value, 0: get timer value */ + u8 opcode; + u8 rsvd[3]; + u32 timer; +}; + #define L2NIC_RSS_TYPE_VALID_MASK BIT(23) #define L2NIC_RSS_TYPE_TCP_IPV6_EXT_MASK BIT(24) #define L2NIC_RSS_TYPE_IPV6_EXT_MASK BIT(25) @@ -162,11 +198,15 @@ enum l2nic_cmd { L2NIC_CMD_SET_VPORT_ENABLE =3D 6, L2NIC_CMD_SET_SQ_CI_ATTR =3D 8, L2NIC_CMD_CLEAR_QP_RESOURCE =3D 11, + L2NIC_CMD_CFG_RX_LRO =3D 13, + L2NIC_CMD_CFG_LRO_TIMER =3D 14, L2NIC_CMD_FEATURE_NEGO =3D 15, L2NIC_CMD_GET_MAC =3D 20, L2NIC_CMD_SET_MAC =3D 21, L2NIC_CMD_DEL_MAC =3D 22, L2NIC_CMD_UPDATE_MAC =3D 23, + L2NIC_CMD_SET_VLAN_FILTER_EN =3D 26, + L2NIC_CMD_SET_RX_VLAN_OFFLOAD =3D 27, L2NIC_CMD_CFG_RSS =3D 60, L2NIC_CMD_CFG_RSS_HASH_KEY =3D 63, L2NIC_CMD_CFG_RSS_HASH_ENGINE =3D 64, diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c b/drive= rs/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c index 7361a4821cb8..526487bf57f4 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c @@ -12,6 +12,9 @@ #include "hinic3_rx.h" #include "hinic3_tx.h" =20 +#define HINIC3_LRO_DEFAULT_COAL_PKT_SIZE 32 +#define HINIC3_LRO_DEFAULT_TIME_LIMIT 16 + /* try to modify the number of irq to the target number, * and return the actual number of irq. */ @@ -476,6 +479,162 @@ static int hinic3_close(struct net_device *netdev) return 0; } =20 +#define SET_FEATURES_OP_STR(op) ((op) ? "Enable" : "Disable") + +static int hinic3_set_feature_rx_csum(struct net_device *netdev, + netdev_features_t wanted_features, + netdev_features_t features, + netdev_features_t *failed_features) +{ + netdev_features_t changed =3D wanted_features ^ features; + struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev); + struct hinic3_hwdev *hwdev =3D nic_dev->hwdev; + + if (changed & NETIF_F_RXCSUM) + dev_dbg(hwdev->dev, "%s rx csum success\n", + SET_FEATURES_OP_STR(wanted_features & NETIF_F_RXCSUM)); + + return 0; +} + +static int hinic3_set_feature_tso(struct net_device *netdev, + netdev_features_t wanted_features, + netdev_features_t features, + netdev_features_t *failed_features) +{ + netdev_features_t changed =3D wanted_features ^ features; + struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev); + struct hinic3_hwdev *hwdev =3D nic_dev->hwdev; + + if (changed & NETIF_F_TSO) + dev_dbg(hwdev->dev, "%s tso success\n", + SET_FEATURES_OP_STR(wanted_features & NETIF_F_TSO)); + + return 0; +} + +static int hinic3_set_feature_lro(struct net_device *netdev, + netdev_features_t wanted_features, + netdev_features_t features, + netdev_features_t *failed_features) +{ + netdev_features_t changed =3D wanted_features ^ features; + struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev); + struct hinic3_hwdev *hwdev =3D nic_dev->hwdev; + bool en =3D !!(wanted_features & NETIF_F_LRO); + int err; + + if (!(changed & NETIF_F_LRO)) + return 0; + + err =3D hinic3_set_rx_lro_state(hwdev, en, + HINIC3_LRO_DEFAULT_TIME_LIMIT, + HINIC3_LRO_DEFAULT_COAL_PKT_SIZE); + if (err) { + dev_err(hwdev->dev, "%s lro failed\n", SET_FEATURES_OP_STR(en)); + *failed_features |=3D NETIF_F_LRO; + } + + return err; +} + +static int hinic3_set_feature_rx_cvlan(struct net_device *netdev, + netdev_features_t wanted_features, + netdev_features_t features, + netdev_features_t *failed_features) +{ + bool en =3D !!(wanted_features & NETIF_F_HW_VLAN_CTAG_RX); + netdev_features_t changed =3D wanted_features ^ features; + struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev); + struct hinic3_hwdev *hwdev =3D nic_dev->hwdev; + int err; + + if (!(changed & NETIF_F_HW_VLAN_CTAG_RX)) + return 0; + + err =3D hinic3_set_rx_vlan_offload(hwdev, en); + if (err) { + dev_err(hwdev->dev, "%s rx vlan offload failed\n", + SET_FEATURES_OP_STR(en)); + *failed_features |=3D NETIF_F_HW_VLAN_CTAG_RX; + } + + return err; +} + +static int hinic3_set_feature_vlan_filter(struct net_device *netdev, + netdev_features_t wanted_features, + netdev_features_t features, + netdev_features_t *failed_features) +{ + bool en =3D !!(wanted_features & NETIF_F_HW_VLAN_CTAG_FILTER); + netdev_features_t changed =3D wanted_features ^ features; + struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev); + struct hinic3_hwdev *hwdev =3D nic_dev->hwdev; + int err; + + if (!(changed & NETIF_F_HW_VLAN_CTAG_FILTER)) + return 0; + + err =3D hinic3_set_vlan_filter(hwdev, en); + if (err) { + dev_err(hwdev->dev, "%s rx vlan filter failed\n", + SET_FEATURES_OP_STR(en)); + *failed_features |=3D NETIF_F_HW_VLAN_CTAG_FILTER; + } + + return err; +} + +static int hinic3_set_features(struct net_device *netdev, + netdev_features_t curr, + netdev_features_t wanted) +{ + netdev_features_t failed =3D 0; + int err; + + err =3D hinic3_set_feature_rx_csum(netdev, wanted, curr, &failed) | + hinic3_set_feature_tso(netdev, wanted, curr, &failed) | + hinic3_set_feature_lro(netdev, wanted, curr, &failed) | + hinic3_set_feature_rx_cvlan(netdev, wanted, curr, &failed) | + hinic3_set_feature_vlan_filter(netdev, wanted, curr, &failed); + if (err) { + netdev->features =3D wanted ^ failed; + return err; + } + + return 0; +} + +static int hinic3_ndo_set_features(struct net_device *netdev, + netdev_features_t features) +{ + return hinic3_set_features(netdev, netdev->features, features); +} + +static netdev_features_t hinic3_fix_features(struct net_device *netdev, + netdev_features_t features) +{ + netdev_features_t features_tmp =3D features; + + /* If Rx checksum is disabled, then LRO should also be disabled */ + if (!(features_tmp & NETIF_F_RXCSUM)) + features_tmp &=3D ~NETIF_F_LRO; + + return features_tmp; +} + +int hinic3_set_hw_features(struct net_device *netdev) +{ + netdev_features_t wanted, curr; + + wanted =3D netdev->features; + /* fake current features so all wanted are enabled */ + curr =3D ~wanted; + + return hinic3_set_features(netdev, curr, wanted); +} + static int hinic3_change_mtu(struct net_device *netdev, int new_mtu) { int err; @@ -595,6 +754,8 @@ static void hinic3_get_stats64(struct net_device *netde= v, static const struct net_device_ops hinic3_netdev_ops =3D { .ndo_open =3D hinic3_open, .ndo_stop =3D hinic3_close, + .ndo_set_features =3D hinic3_ndo_set_features, + .ndo_fix_features =3D hinic3_fix_features, .ndo_change_mtu =3D hinic3_change_mtu, .ndo_set_mac_address =3D hinic3_set_mac_addr, .ndo_tx_timeout =3D hinic3_tx_timeout, 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 @@ -57,6 +57,136 @@ bool hinic3_test_support(struct hinic3_nic_dev *nic_dev, return (nic_dev->nic_io->feature_cap & feature_bits) =3D=3D feature_bits; } =20 +static int hinic3_set_rx_lro(struct hinic3_hwdev *hwdev, u8 ipv4_en, u8 ip= v6_en, + u8 lro_max_pkt_len) +{ + struct l2nic_cmd_lro_config lro_cfg =3D {}; + struct mgmt_msg_params msg_params =3D {}; + int err; + + lro_cfg.func_id =3D hinic3_global_func_id(hwdev); + lro_cfg.opcode =3D MGMT_MSG_CMD_OP_SET; + lro_cfg.lro_ipv4_en =3D ipv4_en; + lro_cfg.lro_ipv6_en =3D ipv6_en; + lro_cfg.lro_max_pkt_len =3D lro_max_pkt_len; + + mgmt_msg_params_init_default(&msg_params, &lro_cfg, + sizeof(lro_cfg)); + + err =3D hinic3_send_mbox_to_mgmt(hwdev, MGMT_MOD_L2NIC, + L2NIC_CMD_CFG_RX_LRO, + &msg_params); + + if (err || lro_cfg.msg_head.status) { + dev_err(hwdev->dev, "Failed to set lro offload, err: %d, status: 0x%x\n", + err, lro_cfg.msg_head.status); + return -EFAULT; + } + + return 0; +} + +static int hinic3_set_rx_lro_timer(struct hinic3_hwdev *hwdev, u32 timer_v= alue) +{ + struct l2nic_cmd_lro_timer lro_timer =3D {}; + struct mgmt_msg_params msg_params =3D {}; + int err; + + lro_timer.opcode =3D MGMT_MSG_CMD_OP_SET; + lro_timer.timer =3D timer_value; + + mgmt_msg_params_init_default(&msg_params, &lro_timer, + sizeof(lro_timer)); + + err =3D hinic3_send_mbox_to_mgmt(hwdev, MGMT_MOD_L2NIC, + L2NIC_CMD_CFG_LRO_TIMER, + &msg_params); + + if (err || lro_timer.msg_head.status) { + dev_err(hwdev->dev, "Failed to set lro timer, err: %d, status: 0x%x\n", + err, lro_timer.msg_head.status); + + return -EFAULT; + } + + return 0; +} + +int hinic3_set_rx_lro_state(struct hinic3_hwdev *hwdev, u8 lro_en, + u32 lro_timer, u8 lro_max_pkt_len) +{ + u8 ipv4_en, ipv6_en; + int err; + + ipv4_en =3D lro_en ? 1 : 0; + ipv6_en =3D lro_en ? 1 : 0; + + dev_dbg(hwdev->dev, "Set LRO max coalesce packet size to %uK\n", + lro_max_pkt_len); + + err =3D hinic3_set_rx_lro(hwdev, ipv4_en, ipv6_en, lro_max_pkt_len); + if (err) + return err; + + /* we don't set LRO timer for VF */ + if (HINIC3_IS_VF(hwdev)) + return 0; + + dev_dbg(hwdev->dev, "Set LRO timer to %u\n", lro_timer); + + return hinic3_set_rx_lro_timer(hwdev, lro_timer); +} + +int hinic3_set_rx_vlan_offload(struct hinic3_hwdev *hwdev, u8 en) +{ + struct l2nic_cmd_vlan_offload vlan_cfg =3D {}; + struct mgmt_msg_params msg_params =3D {}; + int err; + + vlan_cfg.func_id =3D hinic3_global_func_id(hwdev); + vlan_cfg.vlan_offload =3D en; + + mgmt_msg_params_init_default(&msg_params, &vlan_cfg, + sizeof(vlan_cfg)); + + err =3D hinic3_send_mbox_to_mgmt(hwdev, MGMT_MOD_L2NIC, + L2NIC_CMD_SET_RX_VLAN_OFFLOAD, + &msg_params); + + if (err || vlan_cfg.msg_head.status) { + dev_err(hwdev->dev, "Failed to set rx vlan offload, err: %d, status: 0x%= x\n", + err, vlan_cfg.msg_head.status); + return -EFAULT; + } + + return 0; +} + +int hinic3_set_vlan_filter(struct hinic3_hwdev *hwdev, u32 vlan_filter_ctr= l) +{ + struct l2nic_cmd_set_vlan_filter vlan_filter; + struct mgmt_msg_params msg_params =3D {}; + int err; + + vlan_filter.func_id =3D hinic3_global_func_id(hwdev); + vlan_filter.vlan_filter_ctrl =3D vlan_filter_ctrl; + + mgmt_msg_params_init_default(&msg_params, &vlan_filter, + sizeof(vlan_filter)); + + err =3D hinic3_send_mbox_to_mgmt(hwdev, MGMT_MOD_L2NIC, + L2NIC_CMD_SET_VLAN_FILTER_EN, + &msg_params); + + if (err || vlan_filter.msg_head.status) { + dev_err(hwdev->dev, "Failed to set vlan filter, err: %d, status: 0x%x\n", + err, vlan_filter.msg_head.status); + return -EFAULT; + } + + return 0; +} + void hinic3_update_nic_feature(struct hinic3_nic_dev *nic_dev, u64 feature= _cap) { nic_dev->nic_io->feature_cap =3D feature_cap; diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.h b/drivers/= net/ethernet/huawei/hinic3/hinic3_nic_cfg.h index d4326937db48..a17cd56bce71 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.h +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.h @@ -57,6 +57,11 @@ bool hinic3_test_support(struct hinic3_nic_dev *nic_dev, enum hinic3_nic_feature_cap feature_bits); void hinic3_update_nic_feature(struct hinic3_nic_dev *nic_dev, u64 feature= _cap); =20 +int hinic3_set_rx_lro_state(struct hinic3_hwdev *hwdev, u8 lro_en, + u32 lro_timer, u8 lro_max_pkt_len); +int hinic3_set_rx_vlan_offload(struct hinic3_hwdev *hwdev, u8 en); +int hinic3_set_vlan_filter(struct hinic3_hwdev *hwdev, u32 vlan_filter_ctr= l); + int hinic3_init_function_table(struct hinic3_nic_dev *nic_dev); int hinic3_set_port_mtu(struct net_device *netdev, u16 new_mtu); =20 diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_dev.h b/drivers/= net/ethernet/huawei/hinic3/hinic3_nic_dev.h index b8c9c325a45a..a8e92e070d9e 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_dev.h +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_dev.h @@ -7,6 +7,7 @@ #include =20 #include "hinic3_hw_cfg.h" +#include "hinic3_hwdev.h" #include "hinic3_mgmt_interface.h" =20 enum hinic3_flags { @@ -98,6 +99,7 @@ struct hinic3_nic_dev { }; =20 void hinic3_set_netdev_ops(struct net_device *netdev); +int hinic3_set_hw_features(struct net_device *netdev); int hinic3_qps_irq_init(struct net_device *netdev); void hinic3_qps_irq_uninit(struct net_device *netdev); =20 --=20 2.43.0