From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout11.his.huawei.com (canpmsgout11.his.huawei.com [113.46.200.226]) (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 5FDE1325724; Wed, 19 Nov 2025 12:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.226 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763556244; cv=none; b=ny+RkLDJtvWsxnMPXYblcj7MZqcX6rxPFrQ9XQXQHirCHN3iZJSw8rlb25oNLhTskK91tHqVenC5z/Oep2xWE4Fc2Z1CHYIWgKb0xfE3MQyuW7kd5KDwHPo03cw4t33+quovJ7L0rLLI6Rc1pEYjESs2X79iZpmduP+IC0mD/2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763556244; c=relaxed/simple; bh=m6Hd3VV+3qXKZAaHtrOFVHRgQNv77znfORKRsWNxK98=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=eiwcobA31VXG/Im6Z4RBN+GO7jug3CdC1v2UBVZAx6PSEO6VaTXPhOQFDo2kn4m+duKQFKB8Dza7SSdwVQ7XqoLPAlhGuPlxpVv/V/W6uHVq2M7q4/jhw121BqnspA0J8eKDSd1ftYqX2VQdIs+BiKMfsAc8Ec1MQsHrFls2kmg= 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=CtjmZm55; arc=none smtp.client-ip=113.46.200.226 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="CtjmZm55" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=uN7gmymovjdygZ1wTOdvrqFPpYExDqlO/6apNx70QGM=; b=CtjmZm55C2wnNT5n+IcQF7gXez3kPfAimn+5IFv5YEdeTxzFQFnN2aOTsEMoKUsTPaB9fjXQV mCz0VALZMwo2GKSwmCH6i2VooWW7J9fPIWFoMJ+5rgOuarD1UO5Ieq3Jijk1hRl5BNzumS2K4sV 2pIG6T0gssUiO0exO9FmNAM= Received: from mail.maildlp.com (unknown [172.19.88.234]) by canpmsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4dBLht2CSyzKm4D; Wed, 19 Nov 2025 20:42:06 +0800 (CST) Received: from kwepemf100013.china.huawei.com (unknown [7.202.181.12]) by mail.maildlp.com (Postfix) with ESMTPS id BB2F91402F2; Wed, 19 Nov 2025 20:43:50 +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.11; Wed, 19 Nov 2025 20:43:49 +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 , Meny Yossefi , Gur Stavi Subject: [PATCH net-next v07 0/9] net: hinic3: PF initialization Date: Wed, 19 Nov 2025 20:43:33 +0800 Message-ID: X-Mailer: git-send-email 2.51.0.windows.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To kwepemf100013.china.huawei.com (7.202.181.12) This is [1/3] part of hinic3 Ethernet driver second submission. With this patch hinic3 becomes a complete Ethernet driver with pf and vf. The driver parts contained in this patch: Add support for PF framework based on the VF code. Add PF management interfaces to communicate with HW. Add 7 netdev ops to configure NIC features. Support mac filter to unicast and multicast. Add netdev notifier interfaces to modify vlan features. Add HW event handler to manage port and link status. Changes: PATCH 01 V01: https://lore.kernel.org/netdev/cover.1760502478.git.zhuyikai1@h-partners.com/ PATCH 01 V02: https://lore.kernel.org/netdev/cover.1760685059.git.zhuyikai1@h-partners.com/ * Change the order of hinic3_netdev_event (Jakub Kicinski) * Use netdev_hold/put instead of dev_hold/put (Jakub Kicinski) * Remove the semicolon at the end of switch case (Jakub Kicinski) * Remove redundant PF judgement in hinic3_rx_tx_flush (Paven Chebbi) * change hinic3_send_mbox_to_mgmt errcode to EFAULT (Paven Chebbi) * Optimize hinic3_set_bdf_ctxt parameters (Paven Chebbi) * Modify main and CC recipients (Markus Elfring) PATCH 01 V03: https://lore.kernel.org/netdev/cover.1761362580.git.zhuyikai1@h-partners.com/ * Use disable_delayed_work_sync instead of cancel_delayed_work_sync (Paolo Abeni) * Fill in the missing hinic3_sync_time & hinic3_free_ppf_work (Paolo Abeni) * Refactor hinic3_mac_filter_sync to implement linux coding style(err label) and improve readability (Paolo Abeni & Markus Elfring) PATCH 01 V04: https://lore.kernel.org/netdev/cover.1761711549.git.zhuyikai1@h-partners.com/ * Use linux error value(EADDRINUSE) instead of custom value in set_mac (Simon Horman) * Use "hinic3_check_pf_set_vf_already" function instead of macro (Simon Horman) PATCH 01 V05: https://lore.kernel.org/netdev/cover.1762414088.git.zhuyikai1@h-partners.com/ * Code format fixes: wrap the code at 80 characters (Jakub Kicinski) * Use str_up_down instead of ternary expression (Simon Horman) * Remove needless override of error value (Simon Horman) PATCH 01 V06: https://lore.kernel.org/netdev/cover.1762581665.git.zhuyikai1@h-partners.com/ * Update dev_err messages (ALOK TIWARI) * Remove redundant codes "message from vf" in get_mbox_msg_desc (ALOK TIWARI) * Code spell fix (ALOK TIWARI) * Modfiy hinic3_uc_sync/unsync to hinic3_filter_mac_sync/unsync (ALOK TIWARI) * Modify hinic3_mac_filter_sync_hw to return error code (ALOK TIWARI) PATCH 01 V07: * Change port_state_sem to mutex (Jakub Kicinski) * Use DIM infrastructure to change itr moderation configuration (Jakub Kicinski) * Remove redundant TX TIMEOUT counter (Jakub Kicinski) * Use txqueue in tx_timeout instead of searching for timeout queue (Jakub Kicinski) * Remove redundant initialization to ndev features with more than 1 vlan depth. (Jakub Kicinski) * Split patch for one single thing and optimize commit information (Jakub Kicinski) Fan Gong (9): hinic3: Add PF framework hinic3: Add PF management interfaces hinic3: Add .ndo_tx_timeout and .ndo_get_stats64 hinic3: Add .ndo_set_features and .ndo_fix_features hinic3: Add .ndo_vlan_rx_add/kill_vid and .ndo_validate_addr hinic3: Add adaptive IRQ coalescing with DIM hinic3: Add mac filter ops hinic3: Add netdev notifier interfaces hinic3: Add HW event handler drivers/net/ethernet/huawei/hinic3/Makefile | 1 + .../net/ethernet/huawei/hinic3/hinic3_csr.h | 6 + .../ethernet/huawei/hinic3/hinic3_filter.c | 416 ++++++++++++++++++ .../ethernet/huawei/hinic3/hinic3_hw_comm.c | 115 +++++ .../ethernet/huawei/hinic3/hinic3_hw_comm.h | 6 + .../ethernet/huawei/hinic3/hinic3_hw_intf.h | 24 + .../net/ethernet/huawei/hinic3/hinic3_hwdev.c | 97 +++- .../net/ethernet/huawei/hinic3/hinic3_hwdev.h | 21 + .../net/ethernet/huawei/hinic3/hinic3_hwif.c | 90 +++- .../net/ethernet/huawei/hinic3/hinic3_hwif.h | 23 + .../net/ethernet/huawei/hinic3/hinic3_irq.c | 97 +++- .../net/ethernet/huawei/hinic3/hinic3_lld.c | 53 ++- .../net/ethernet/huawei/hinic3/hinic3_main.c | 270 +++++++++++- .../net/ethernet/huawei/hinic3/hinic3_mbox.c | 47 +- .../net/ethernet/huawei/hinic3/hinic3_mbox.h | 2 + .../net/ethernet/huawei/hinic3/hinic3_mgmt.c | 311 ++++++++++++- .../net/ethernet/huawei/hinic3/hinic3_mgmt.h | 53 +++ .../huawei/hinic3/hinic3_mgmt_interface.h | 69 +++ .../huawei/hinic3/hinic3_netdev_ops.c | 362 +++++++++++++++ .../ethernet/huawei/hinic3/hinic3_nic_cfg.c | 284 +++++++++++- .../ethernet/huawei/hinic3/hinic3_nic_cfg.h | 47 ++ .../ethernet/huawei/hinic3/hinic3_nic_dev.h | 61 ++- .../net/ethernet/huawei/hinic3/hinic3_rx.h | 21 + .../net/ethernet/huawei/hinic3/hinic3_tx.h | 16 + 24 files changed, 2456 insertions(+), 36 deletions(-) create mode 100644 drivers/net/ethernet/huawei/hinic3/hinic3_filter.c base-commit: 16a2206354d169bfd13552ad577e07ce66e439ab -- 2.43.0