From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=113.46.200.224 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796357335; b=lXmsIf0NUvyQYgKS4IFM7IQjeit8DTBx6OlgEdzSlo/R7HEbhzc6it1p+/r6LPZyVX/f jkR0t2m03KNx97PTZWt4Wvoq/HG0Qt1fTZmuOHzIUlt5HbIn2b7HtN+ysgFaKx3OVSw4u cqgbW73ksfni8khLkqj93OS3cu2ccn+ustkOjrIj1TL8KRsVmC8LmmA0stbG1DuQv2nAi /8jJeN4Qz/O6SJAipLPYO0kiQtT94Y2MjHjaaYQbpNdOv2XkXunVjPJ5KTMuAcYe/2Mcg 0qcWmZ2QWDjsh0MTsQKU5zvjNwcq78571MXaem3q+WaUIqlBlei0vFFjKbgLCmra6BQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796357335; h=DMARC-Filter:dkim-signature:Received:Received:Received:Received:From: To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy; bh=heJUa3bN4KEIzw9QpH05SgehXuS2ZJPBqlvlsHp+vo0=; b=ZAdMClS1xOkhKwwspbATGn/Tyqm0NfAiS0+vpFnY8G/hJojqOX5qhfslATsrR5TtBuqQ scUffNUgzrM323VH01qYc5VlnCBqU8VLHYpliRKWRq4j2FoaD/CcbPUXyiyMXE8jyP8IV nU+6n0gj+kyDfC/o663xLE3DBY/KNX1B89y6lbUZ7N2Pto0ogTU/DTPe6MQB3tUvTaRVY temMhQn9Y+fkuMtEPLWxhpj/aPjpWGMBiOTDIkPlCc+iVM2+q1lvXmlzR17wk+HwmCZhd ljOCRPqOA7p55D1VArX8hODRll2q+kyUF01h9XgokTvCAQBUAUwlhBKTuWqYa6TX+lg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=kJ+TYcQB; arc=none smtp.remote-ip=113.46.200.224 Received: from canpmsgout09.his.huawei.com (canpmsgout09.his.huawei.com [113.46.200.224]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B11E2606A33D; Fri, 4 Dec 2026 04:08:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B11E2606A33D 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.a=rsa-sha256 header.s=dkim header.b=kJ+TYcQB dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=heJUa3bN4KEIzw9QpH05SgehXuS2ZJPBqlvlsHp+vo0=; b=kJ+TYcQBJMPmSNFjPvM3Ks2JNPR8tlONSmnqsoRw9wPw2ba4jZenr7qgq9x/5YjAMHu7jPmAN oYRd1yBzF2OrGRlzRvB5uufYbXAbi5aVQFY+kjGAUkvi9MCdLUfShfHE8hAQWDtdW8arx5/uroU LnxcFAwCJDcvW4OTnPBmgYs= Received: from mail.maildlp.com (unknown [172.19.163.15]) by canpmsgout09.his.huawei.com (SkyGuard) with ESMTPS id 4jgdJX5KCvz1cyP2; Fri, 4 Dec 2026 12:08:12 +0800 (CST) Received: from dggpemr200018.china.huawei.com (unknown [7.185.36.238]) by mail.maildlp.com (Postfix) with ESMTPS id 62C7740586; Fri, 4 Dec 2026 12:08:42 +0800 (CST) Received: from whupemq100015.china.huawei.com (7.152.185.230) by dggpemr200018.china.huawei.com (7.185.36.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Fri, 4 Dec 2026 12:08:42 +0800 Received: from DESKTOP-62GVMTR.china.huawei.com (10.174.174.76) by whupemq100015.china.huawei.com (7.152.185.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Fri, 4 Dec 2026 12:08:39 +0800 From: Fan Gong To: Fan Gong , Wu Di , Teng Peisen , , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Andrew Lunn , Ioana Ciornei , Maxime Chevallier , Mohsin Bashir , Dimitri Daskalakis , Harshitha Ramamurthy , Larysa Zaremba , "Vadim Fedorenko" CC: , , Zhou Shuai , Wu Like Subject: [PATCH net-next v19 0/4] net: hinic3: Support ethtool ops Date: Fri, 4 Dec 2026 12:08:31 +0800 Message-ID: X-Mailer: git-send-email 2.50.1.windows.1 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To whupemq100015.china.huawei.com (7.152.185.230) This series adds the ethtool statistics, per-queue netdev-genl stats and pause parameter support for the hinic3 driver. It is a subset of the larger hinic3 patch set; the RX stall fix is already in net-next, and the link settings, PHY LED, FEC, ringparam and Hi1872/HTN patches will be sent separately. Add ethtool ops: .get_strings .get_sset_count .get_ethtool_stats .get_eth_phy_stats .get_eth_mac_stats .get_eth_ctrl_stats .get_rmon_stats .get_pause_stats .get_pauseparam .set_pauseparam Add netdev ops: .get_queue_stats_rx .get_queue_stats_tx .get_base_stats 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/ * Remove OutOfRangeLengthField, FrameToolong and InRangeLengthErrors (Ioana Ciornei) * Remove redundant mtu commit (Maxime Chevallier) * 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) 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/ * 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) * Remove restore_drop_sge in hinic3_rx_queue_stats (AI Review) * Remove hinic3_nic_stats (AI Review) PATCH 03 V05: https://lore.kernel.org/netdev/cover.1775711066.git.zhuyikai1@h-partners.com/ * 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) * Clear HINIC3_CHANGE_RES_INVALID bit in error handling (AI Review) * Use low >= high to avoid low=high in is_coalesce_legal (AI Review) PATCH 03 V06: https://lore.kernel.org/netdev/cover.1779867397.git.zhuyikai1@h-partners.com/ * 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) PATCH 03 V07: https://lore.kernel.org/netdev/cover.1779940072.git.zhuyikai1@h-partners.com/ * Remove the trailing '\n' in NL_SET_ERR_MSG* (Jakub Kicinski) PATCH 03 V08: https://lore.kernel.org/netdev/cover.1780907605.git.wudi234@huawei.com/ * Update patch commit to be more accurate for change information (AI Review) * Modify to (AI Review) * Use sq/rq_depth instead of rx/txqs[0].q_depth (AI Review) * hinic3_change_channel_settings() runs under change_res_mutex to protect dynamic channel updates (AI Review) * hinic3_close() serializes close and channel reconfiguration paths (AI Review) * Remove useless u64_stats_init in hinic3_get_drv_queue_stats() (AI Review) * hinic3_get_drv_queue_stats() fills rxq stats at correct idx when txq is null (AI Review) * Remove unnecessary semicolons after the closing bracket of static inline functions (AI Review) * Disable preemption in hinic3_rx_fill_buffers() (AI Review) * Add spinlock to protect per-queue coalesce parameters from concurrent access (AI Review) * Reject static coalesce config when adaptive RX coalesce is enabled (AI Review) * Validate interface state and queue ID before modifying coalesce parameters (AI Review) * Differentiate get_coalesce output for adaptive/static modes and zero-fill the struct (AI Review) * Return -ERANGE for invalid coalesce frame limits and simplify error message (AI Review) * Remove unused watchdog timeout definition and assignment (AI Review) * Return -EOPNOTSUPP when RSS type query is unsupported by firmware (AI Review) * Reject L4 hash bits for pure L3 flow types (AI Review) * Split RSS type conversion to correctly handle L3-only flows (AI Review) * Reprogram RSS indir table and HW parameters after channel count changes (AI Review) * Propagate exact error code from channel parameter validation (AI Review) * Update SW RSS indir copy only after HW programming succeeds (AI Review) * Program RSS hash type to HW before updating SW state to prevent inconsistency (AI Review) PATCH 03 V09: https://lore.kernel.org/netdev/cover.1781062575.git.wudi234@huawei.com/ * Remove useless messages in hinic3_set_ringparam() (Jakub Kicinski) * Solve the big-endian and little-endian issue (Jakub Kicinski) PATCH 03 V10: https://lore.kernel.org/netdev/cover.1782718232.git.wudi234@huawei.com/ * Unify 3 mutex in struct hinic3_nic_dev: port_state_mutex, change_res_mutex, coal_lock.(Simon Horman) * Use rxq->q_mask instead of rxq->q_depth - 1 in hinic3_configure_rxqs() (Dimitri Daskalakis) * Implement dedicated get_rx_ring_count ethtool operation (Dimitri Daskalakis) * Correct copy-paste error in hinic3_get_ringparam() (AI Review and Harshitha Ramamurthy) * Clarify extack error message in hinic3_check_ringparam_valid() (Harshitha Ramamurthy) * Use rounddown_pow_of_two() instead of 1U << ilog2() in hinic3_set_ringparam() for readability. (Harshitha Ramamurthy) * hinic3_set_interrupt_moder() now compare q_id and num_qps inside mutex lock (AI Review) * Error branches in hinic3_link_status_change() goto unlock mutex before return (AI Review) * In hinic3_change_channel_settings(), hinic3_config_num_qps() and hinic3_alloc_channel_resources() now run inside mutex lock. (AI Review) * Call hinic3_free_qp_ctxts() in error paths of hinic3_open_channel(), thus hinic3_change_channel_settings() don't call it in error path (AI Review) * Unset HINIC3_INTF_UP during close and reopen in hinic3_change_channel_settings * hinic3_change_channel_settings() restore previous resources before freeing new_qp_params (AI Review) * Delete unused macro HINIC3_LRO_PKT_HDR_LEN (AI Review) * Drop packets when skb_checksum_help() return error (AI Review) * Protect interrupt coalesce parameter reads with state_lock to prevent data races(AI Review) * Restore previous coalesce parameters on HW configuration failure (AI Review) * Always report all coalesce parameters regardless of adaptive mode (AI Review) * Safely stop DIM work when disabling adaptive RX coalescing (AI Review) * Change coalesce disabled message from extack error to info log (AI Review) * Pass new RSS hash type to HW instead of the old one (AI Review) * Initialize default RSS indirection table before HW programming when not user-configured(AI Review) * Revert queue count on RSS reprogramming failure (AI Review) * Use sizeof for RSS indirection table copy to prevent size mismatch (AI Review) PATCH 03 V11: https://lore.kernel.org/all/cover.1784538912.git.root@localhost.localdomain/ * Remove state_lock in hinic3_set_interrupt_moder() and hinic3_link_status_change() (Andrew Lunn and AI Review) * In hinic3_change_channel_settings(), cur_trxq_params is read after taking lock, and get symmetrically restored when alloc resources failed. (AI Review) * Remove preempt_disable()/preempt_enable() pairs in hinic3_rx_fill_buffers(). (AI Review) * Add a comment about csum_err, and rewrite its judgement in hinic3_rx_csum(). (AI Review) * Rollback hash function type to previous state if setting RSS indirection table or key fails (AI Review) * Allow users to disable L3 hashing for IPV4/IPV6 flows by properly handling empty hash tuple in ethtool (AI Review) * Update software queue coalesce state only after successful hardware configuration to avoid manual rollback (AI Review) * Use READ_ONCE and WRITE_ONCE for adaptive_rx_coal to ensure safe concurrent memory access (AI Review) * Reset RX queue DIM state to DIM_START_MEASURE when canceling adaptive RX coalescing work (AI Review) * Remove unnecessary state_lock mutexes when reading queue coalesce parameters in IRQ and update paths (AI Review) * Rename is_coalesce_legal to hinic3_validate_coalesce for better code readability and naming consistency (AI Review) PATCH 03 V12: https://lore.kernel.org/all/cover.1785120952.git.root@localhost.localdomain/ * Remove get_val_of_ptr() which is unnecessary (Dimitri Daskalakis) * Split the monolithic patch into multiple patches (Mohsin Bashir) * Fix MSI-X leak and defer q_params publication and add error-path rollback to prevent regressions (AI Review) * Rfactor hinic3_update_hash_func_type() (AI Review) * Guard irq_cfg traversal with INTF_UP check to prevent NULL dereference and fully reinitialize DIM state on adaptive re-enable (AI Review) * Snapshot per-queue coalesce configs before applying and rollback via backup array on partial failure to ensure atomic set_coalesce (AI Review) PATCH 03 V13: https://lore.kernel.org/netdev/cover.1786774752.git.tengpeisen@huawei.com/ * Split previous version into 3 parts. The first 2 patches were sent to net tree, patch #5, #6 and #8 stayes in this series, and others will be sent in the future. (Larysa Zaremba and Jakub Kicinski) * Remove dead size field from struct hinic3_stats and add HINIC3_STAT_SIZE_CHECK() with BUILD_BUG_ON_ZERO to enforce per-entry compile-time verification that all stats members are u64. (AI Review) * Remove never-incremented frag_len_overflow and frag_size_err from hinic3_txq_stats, hinic3_txq_clean_stats(), hinic3_txq_get_stats() and the hinic3_tx_queue_stats ethtool table. (AI Review) * Add missing txq_stats.busy increment in hinic3_send_one_skb() when returning NETDEV_TX_BUSY due to insufficient WQEBBs. (AI Review) * Add missing txq_stats.offload_cow_skb_err increment when offload type is invalid in hinic3_send_one_skb(). (AI Review) * Remove mac_tx_good_oct_num and mac_rx_good_oct_num from the hinic3_port_stats private table as they are already reported through the get_eth_mac_stats standard interface. (AI Review) * Fix OctetsTransmittedOK/ReceivedOK mapping in hinic3_get_eth_mac_stats() to use mac_tx/rx_good_oct_num instead of mac_tx/rx_total_oct_num per RFC 2863 (error-free frames only). (AI Review) * Add HINIC3_IS_VF guard to hinic3_get_eth_phy_stats() to prevent VF from reading physical port stats, consistent with the ethtool -S path which already gates hinic3_port_stats on PF-only. (AI Review) * Use u64_stats_update_begin_irqsave/end_irqrestore in hinic3_rx_fill_buffers() where the function can be called from preemptible process context via hinic3_configure_rxqs(), avoiding seqcount deadlock on 32-bit systems. (AI Review) * Expand state_lock protection scope in hinic3_get_coalesce() and hinic3_set_coalesce() to cover intr_coalesce array accesses. (AI Review) * Use standard net_dim_work_cancel() in hinic3_set_coalesce() to cancel DIM work instead of manually clearing struct fields, ensuring safe DIM state reset and simplifying error rollback. (AI Review) PATCH 03 V14: https://lore.kernel.org/netdev/cover.1791858167.git.gongfan1@huawei.com/ * Remove if (!nic_dev->txqs) & if (!nic_dev->rxqs). (Vadim Fedorenko) * All comments regarding this submission have been documented and will be addressed incrementally in subsequent patch-set. PATCH 03 V15: https://lore.kernel.org/netdev/cover.1792053295.git.gongfan1@huawei.com/ * Break get_ethtool_stats into the standard statistic groups. Only retain the counters which are not part of standard groups. (Andrew Lunn and AI Review) * Netdev netlink qstats (struct netdev_stat_ops) does not be implemented by hinic3, it will be implemented in future. So the per-queue stats of rxq%d_csum_errors etc. will be retained in ethtool -S.(AI Review) * Change netdev_err to netdev_err_once and dev_err to dev_err_once. (AI Review) * The stall of hinic3_rx_fill_buffers() and LRO in extreme condition will go in a separate patch.(AI Review) * Use the same algorithms for calculating the number of bytes and packets in the TSO and LRO statistics.(AI Review) * Replace skb_inner_transport_header() with skb_inner_tcp_all_headers() will go in a separate patch.(AI Review) * Drops taken in hinic3_xmit_frame() are counted.(AI Review) * u64_stats_update_begin() in hinic3_rxq_clean_stats() and hinic3_txq_clean_stats() will go in a separate patch.(AI Review) * get_pauseparam callback will go in a separate patch.(AI Review) PATCH 03 V16: https://lore.kernel.org/netdev/cover.1792149958.git.gongfan1@huawei.com/ * Change lro_packets = 1 to lro_packets++.(Mohsin Bashir) * Init txq at the correct place.(Mohsin Bashir) * Statistics in hinic3_function_stats and rtnl_link_stats64 originate from different sources: the chip records the former, while the driver records the latter. Chip statistics are readable via ethtool -S, and driver statistics are returned via rtnl_link_stats64.(AI Review) * Change u64 to __le64 in l2nic_vport_stats and mag_cmd_port_stats.(AI Review) * Reset lro_packets and gso_packets.(AI Review) PATCH 03 V17: https://lore.kernel.org/netdev/cover.1792378301.git.gongfan1@huawei.com/ * Use ethtool_puts().(Dimitri Daskalakis) * Remove the casting of char *p = (char *)data.(Dimitri Daskalakis) * It was clarified in the last patch that tx_unicast_pkts_vport and per-queue metrics are not standard statistics.(AI Review) * Use le64_to_cpu() to handle variables definded as __le64.(AI Review) * Optimize the txq initialization position to prevent out-of-bounds memory access.(Mohsin Bashir & AI Review) PATCH 03 V18: https://lore.kernel.org/netdev/cover.1792671176.git.gongfan1@huawei.com/ * Merge the alloc_skb_err and alloc_rx_buf_err counters into a standard alloc_fail counter.(Jakub Kicinski) * Rename mac_rx/tx_1519_max_* to mac_rx/tx_jumbo_*.(Jakub Kicinski) * Remove gso_packets and lro_packets.(Jakub Kicinski) * Implement netdev netlink qstats (struct netdev_stat_ops) in hinic3 for per-queue standard counter.(AI Review) * Remove some vport counters form ethtool -S. They will go in a separate patch.(AI Review) * Remove mac_tx/rx_pfc_pri_* counter from ethtool -S. They will go in a separate patch for the dcbnl struct ieee_pfc.(AI Review) * Move csum_errors to csum_bad in netdev netlink qstats.(AI Review) * Solve the coexistence of hinic3_get_stats64() and hinic3_get_pkt_stats() on a 32-bit system and remove hinic3_get_pkt_stats().(AI Review) * Detailed statistics of TSO and LRO will go in a separate patch. The problem in dim_update_sample() will be solved.(AI Review) * Implement .get_pauseparam and .set_pauseparam for hinic3_get_pause_stats(). (AI Review) PATCH 03 V19: * Save skb->len to a local variable before the doorbell, so the TX completion path cannot free the skb before the stats read.(AI Review) * Update the TX packet/byte counters from hinic3_tx_poll() when the device completes the descriptors, so in-flight and flushed skbs are not reported as sent.(AI Review) * Count TX wire packets with skb_shinfo(skb)->gso_segs and add the repeated TCP header length to tx_bytes for TCP GSO. Guard gso_segs against zero.(AI Review) * Count tx-stop only when netif_subqueue_try_stop()/maybe_stop() really stops the queue, and count the normal stop path as well.(AI Review) * Count RX packets with num_lro for LRO aggregates.(AI Review) * Move csum_errors to the standard rx-csum-bad qstats and keep only other_errors in rtnl_link_stats64.rx_errors.(AI Review) * Count csum_errors regardless of NETIF_F_RXCSUM so toggling RXCSUM does not change the meaning of the counter.(AI Review) * Add hinic3vf_ethtool_ops for VF, hinic3_ethtool_ops only for PF, so VF does not issue physical-port stats/pause commands.(AI Review) * Only initialize the supported counters in hinic3_get_base_stats(), add stats_rx->alloc_fail, and use netdev->real_num_{rx,tx}_queues as the lower bound so the base range cannot overlap the per-queue range.(AI Review) * Bound-check the queue index in hinic3_get_queue_stats_rx/tx().(AI Review) * Merge the 12288-16383 octet bucket into the last RMON histogram range, since ETHTOOL_RMON_HIST_MAX is 11.(AI Review) * Use the firmware pause values whenever hinic3_get_pause_info() succeeds and fall back to the cached state only on error.(AI Review) * Preserve the firmware auto_neg when setting pause parameters and reject an explicit change, since pause autonegotiation is not user configurable.(AI Review) * Change (u8)pause->rx_pause to !!pause->rx_pause to avoid values 2 to 255 being passed to firmware.(AI Review) * Initialize nic_cfg.cfg_mutex and protect the cached pause state. (AI Review) * Skip the pause query for VF during probe, since the firmware may not support L2NIC_CMD_CFG_PAUSE_INFO for VF.(AI Review) * The vport multicast/discard/err counters are removed from ethtool -S and will be exposed through rtnl_link_stats64 in a separate patch. PFC per-priority counters will go to the dcbnl ieee_pfc interface separately. * TX bytes expand the repeated TCP header for TCP GSO; UDP tunnel GSO and RX LRO wire byte accounting need hardware confirmation and will be addressed separately if required. Fan Gong (4): hinic3: Add ethtool statistic ops part(1/2) hinic3: Add ethtool statistic ops part(2/2) hinic3: Add per-queue netdev-genl stats hinic3: Add ethtool pause param ops .../ethernet/huawei/hinic3/hinic3_ethtool.c | 536 +++++++++++++++++- .../ethernet/huawei/hinic3/hinic3_hw_intf.h | 11 + .../net/ethernet/huawei/hinic3/hinic3_main.c | 8 + .../huawei/hinic3/hinic3_mgmt_interface.h | 37 ++ .../huawei/hinic3/hinic3_netdev_ops.c | 109 +++- .../ethernet/huawei/hinic3/hinic3_nic_cfg.c | 71 +++ .../ethernet/huawei/hinic3/hinic3_nic_cfg.h | 114 +++- .../ethernet/huawei/hinic3/hinic3_nic_dev.h | 3 + .../net/ethernet/huawei/hinic3/hinic3_rx.c | 69 ++- .../net/ethernet/huawei/hinic3/hinic3_rx.h | 10 +- .../net/ethernet/huawei/hinic3/hinic3_tx.c | 149 ++++- .../net/ethernet/huawei/hinic3/hinic3_tx.h | 9 +- 12 files changed, 1085 insertions(+), 41 deletions(-) base-commit: ed3135d0881a926de56a7f490dea3d51698ba118 -- 2.43.0