From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout07.his.huawei.com (canpmsgout07.his.huawei.com [113.46.200.222]) (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 295743C872E; Wed, 27 May 2026 07:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.222 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779868575; cv=none; b=Tg+PCNzIWgF5hHJDpq1sbS0eMFWypaDn4fBUhMMDctDL9rDx7Om/Q8iY3dp5aGrZSP4srLs4D7ymM3/O5nGaXvCHzcIqbb8OgdDKrprkSjtFmhi4D1SUOiNLnFunD5HIlz7PcpmBFJaG4XMSBujisGEfkNgUL8PKE/L4xnxxgFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779868575; c=relaxed/simple; bh=x8vK8ZWOUhg/tEx5q9P0ai4gwCH4AVza2ffIZnneLCk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PcFu+xHZe8rEA+YGdfXkAqv6ZdCS6nPzW6Ong/7ycQkOT45ihkPWbQO/Zzy8ZSI9Ze7MQ6r5UJn79Y+HK4NxV5q70G5idlvd8A96J3Udl+8pvHvY46oPkxmo1BY+Pvubt4x9/3IwLBHFBIr9w9RlizhbGXCJtlCbSqAtjED9fhs= 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=eUZdS3Dq; arc=none smtp.client-ip=113.46.200.222 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="eUZdS3Dq" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=vXgwY22bMiSZf/BdioBEU4Mj0uV+XIo7IVi56h/mHZk=; b=eUZdS3Dqz7Ium6c+xy/NXqn+KtQ3Y9cC1A88qf+OD13w1mtyFLVUsjmKMPIvs7g+tUEXz2RwU jSWTSIchaWfZdxcSKN2aAnCCA4MYOLaZ2iOccstSZ6RgS2I9wpvBQnBeZ85zE1/duAhlGGmB2of 7EnUcctMR/tuB4HktgUNpfk= Received: from mail.maildlp.com (unknown [172.19.163.200]) by canpmsgout07.his.huawei.com (SkyGuard) with ESMTPS id 4gQMDk2GXBzLlT6; Wed, 27 May 2026 15:48:22 +0800 (CST) Received: from kwepemf100013.china.huawei.com (unknown [7.202.181.12]) by mail.maildlp.com (Postfix) with ESMTPS id 87F1840563; Wed, 27 May 2026 15:56:07 +0800 (CST) Received: from DESKTOP-62GVMTR.china.huawei.com (10.174.189.124) 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; Wed, 27 May 2026 15:56:06 +0800 From: Fan Gong To: Fan Gong , Zhu Yikai , , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Andrew Lunn , Ioana Ciornei , Mohsin Bashir CC: , , luosifu , Xin Guo , Zhou Shuai , Wu Like , Shi Jing , Zheng Jiezhen , Maxime Chevallier Subject: [PATCH net-next v06 0/6] net: hinic3: PF initialization Date: Wed, 27 May 2026 15:55:55 +0800 Message-ID: X-Mailer: git-send-email 2.50.1.windows.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To kwepemf100013.china.huawei.com (7.202.181.12) This is [3/3] part of hinic3 Ethernet driver second submission. With this patch hinic3 becomes a complete Ethernet driver with pf and vf. Add 20 ethtool ops for information of queue, rss, coalesce and eth data. Add MTU size validation Config netdev watchdog timeout. Remove unneed coalesce parameters. Changes: PATCH 03 V01: https://lore.kernel.org/netdev/cover.1773387649.git.zhuyikai1@h-partners.com/ * Add rmon/pause/phy/mac/ctrl stats (Ioana Ciornei) PATCH 03 V02: https://lore.kernel.org/netdev/cover.1774684571.git.zhuyikai1@h-partners.com/ * Modify "return -EINVAL" intension problem (AI review) * Use le16_to_cpu for rss_indir pair.out->buf (AI review) * Use u32 instead of int in coalesce_limits to avoid overflow (AI review) * Remove redundant u64_stats_update_begin/end when reading stats without concurrent reader (AI review) * Modify nic_dev->stats.syncp logic (AI review) * Complete rxq/txq stats stats fileds in hinic3_rx/txq_get_stats (AI review) * Remove statistics values in rtnl_link_stats64 from ethtool statistics values (AI review) * Add channel_cfg_lock & channel_res_lock to protect resources access (AI review) * Remove OutOfRangeLengthField, FrameToolong and InRangeLengthErrors (Ioana Ciornei) * Remove redundant mtu commit (Maxime Chevialler) PATCH 03 V03: https://lore.kernel.org/netdev/cover.1774940117.git.zhuyikai1@h-partners.com/ * Change unnedd to unneeded (AI review) * Remove packets,bytes,errors and dropped in hinic3_rx/tx_queue_stats (AI review) * Remove duplicated entried in hinic3_port_stats[] (AI review) * change stats_info.head.status to ps->head.status (AI review) PATCH 03 V04: https://lore.kernel.org/netdev/cover.1775618797.git.zhuyikai1@h-partners.com/ * Remove restore_drop_sge in hinic3_rx_queue_stats (AI review) * Remove hinic3_nic_stats (AI review) * Use old_q_param to store old config and use it in error handling (Mohsin Bashir) * Add netdev_info to inform the user that depth is trimmed (Mohsin Bashir) * Remove const in hinic3_get_qp_stats_strings parameters (Mohsin Bashir) * Change EOPNOTSUPP to ERANGE in is_coalesce_exceed_limit (Mohsin Bashir) * Update nic_dev->rss_type after hinic3_set_rss_type (Mohsin Bashir) * Modify MGMT_STATUS_CMD_UNSUPPORTED to EOPNOTSUPP for complying with the error code specifications (Mohsin Bashir) PATCH 03 V05: https://lore.kernel.org/netdev/cover.1775711066.git.zhuyikai1@h-partners.com/ * Clear HINIC3_CHANGE_RES_INVALID bit in error handling (AI review) * Use low >= high to avoid low=high in is_coalesce_legal (AI review) * As tx and rx share interrupts, we only use ETHTOOL_COALESCE_RX_USECS for user setting to avoid user misunderstanding. So we do not add ETHTOOL_COALESCE_TX_USECS. (Mohsin Bashir & AI review) PATCH 03 V06: * Remove redundant rx_jumbo_pending and rx_mini_pending judgement (Jakub Kicinski) * Remove redundant max tx_pending judgement when .get_ringparam already got the max value (Jakub Kicinski) * Use extack instead of netdev_err/netdev_info/netdev_warning (Jakub Kicinski) * Remove HINIC3_CHANNEL_RES_VALID and only use HINIC3_CHANGE_RES_INVALID bit (Jakub Kicinski) * Deference freed pointers in hinic3_change_channel_settings error handling (Jakub Kicinski) * Modify hinic3_open_channel (Jakub Kicinski) Fan Gong (6): hinic3: Add ethtool queue ops hinic3: Add ethtool statistic ops hinic3: Add ethtool coalesce ops hinic3: Add ethtool rss ops hinic3: Configure netdev->watchdog_timeo to set nic tx timeout hinic3: Remove unneeded coalesce parameters .../ethernet/huawei/hinic3/hinic3_ethtool.c | 835 +++++++++++++++++- .../ethernet/huawei/hinic3/hinic3_hw_intf.h | 13 +- .../net/ethernet/huawei/hinic3/hinic3_irq.c | 9 +- .../net/ethernet/huawei/hinic3/hinic3_main.c | 7 + .../huawei/hinic3/hinic3_mgmt_interface.h | 39 + .../huawei/hinic3/hinic3_netdev_ops.c | 105 ++- .../ethernet/huawei/hinic3/hinic3_nic_cfg.c | 64 ++ .../ethernet/huawei/hinic3/hinic3_nic_cfg.h | 109 +++ .../ethernet/huawei/hinic3/hinic3_nic_dev.h | 8 + .../ethernet/huawei/hinic3/hinic3_nic_io.c | 4 +- .../ethernet/huawei/hinic3/hinic3_nic_io.h | 8 +- .../net/ethernet/huawei/hinic3/hinic3_rss.c | 487 +++++++++- .../net/ethernet/huawei/hinic3/hinic3_rss.h | 19 + .../net/ethernet/huawei/hinic3/hinic3_rx.c | 61 +- .../net/ethernet/huawei/hinic3/hinic3_rx.h | 18 +- .../net/ethernet/huawei/hinic3/hinic3_tx.c | 71 +- .../net/ethernet/huawei/hinic3/hinic3_tx.h | 2 + 17 files changed, 1823 insertions(+), 36 deletions(-) base-commit: aa064a614efcfa4c300609d1f01134e99a12ad10 -- 2.43.0