From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 667C1A04AA; Tue, 8 Sep 2020 11:15:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A60B2BA8; Tue, 8 Sep 2020 11:15:32 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 74673A3 for ; Tue, 8 Sep 2020 11:15:30 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.137]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 0CA01200C4; Tue, 8 Sep 2020 09:15:30 +0000 (UTC) Received: from us4-mdac16-71.at1.mdlocal (unknown [10.110.50.187]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id E2810600A1; Tue, 8 Sep 2020 09:15:29 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.12]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 057F3220096; Tue, 8 Sep 2020 09:14:52 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 861FD40069; Tue, 8 Sep 2020 09:14:52 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Sep 2020 10:14:49 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 8 Sep 2020 10:14:49 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 0889EnMF032398; Tue, 8 Sep 2020 10:14:49 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 261581613A9; Tue, 8 Sep 2020 10:14:49 +0100 (BST) From: Andrew Rybchenko To: CC: Thomas Monjalon , David Marchand , Ferruh Yigit Date: Tue, 8 Sep 2020 10:14:20 +0100 Message-ID: <1599556475-27820-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25652.003 X-TM-AS-Result: No-10.004100-8.000000-10 X-TMASE-MatchedRID: DvhDCCgKMr7bUSlFWXatlL9bzwD89thZE3EgF0+MVuB+SLLtNOiBhnjB aILWVRlCXOmsadtce2cGo3ZLl9NPAN7Jizf4VVgFuoibJpHRrFnpVMb1xnESMuSINShnjevrqNy CuIGQvC+zGwVgLOy2t7301l4eKsL/sj0iE9pOpuS5kFk6DtF9f1LjfGkHsKeQRu2i7U96I/sqLf Wyl6GIbghy9MlxtSYWFtlMm0id6Dq1wvjhqiJ59/FanwH6mNoslSphlGf1p5H5jAoS8LpAoyllM 5eVHMgW4HEFwUDiSZ63iFG6zxpQtSphhGDdyW8GMiMrbc70Pff6ZraQS6FEWt9RlPzeVuQQXt8b YDTmCQ+Iq8HJr0qYqPdRRoZN5SkAGbjm5ZdalUFIcJTn2HkqsX6NJZ3HRhRTP4XE9vEibPI8fE8 eLil3XqkEFI+nQ/gTpVemKkbZ8+zPF7rbsnga3YicBKfMHlV8UkCyfz2KH3jm5xVqTV9QwR/Mle 0hSGLF5RngtX2fL52/FMrXGzsDNGxu3yBJ7JYangIgpj8eDcCbifj2/J/1cXTKzu8nNCP8KrauX d3MZDUxKGx072ri2qpYZDVLcHOYskUnchETwDHM71gkTMjPyPIc1NwY8lr5 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--10.004100-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25652.003 X-MDID: 1599556529-1FZkUOiPiD7T Subject: [dpdk-dev] [PATCH 00/14] net/sfc: factor out common driver library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Network and vDPA drivers share libefx. So, libefx should be moved to common drivers. DPDK adaptation of the MCDI interface may be shared as well. The new common driver name is sfc_efx since it a new home of libefx base driver. sfc_ prefix is used to make it clear that it is related to net/sfc (and vdpa/sfc in the future). In theory, right now all exported libefx functions should be marked as internal, but it requires corresponding markup in base driver which sources should have no DPDK specifics since shared by many drivers. So, it is unclear what to do and how to solve it. The patch series makes these functions a part of DPDK_21 ABI to pass build checks. checkpatches.sh does not like it. Cc: Thomas Monjalon Cc: David Marchand Cc: Ferruh Yigit Andrew Rybchenko (14): net/sfc: include header with debug helpers directly net/sfc: introduce common driver library net/sfc: add dedicated header file with MCDI interface net/sfc: move MCDI helper interface to dedicated namespace net/sfc: make MCDI logging helper macros local net/sfc: start to make MCDI helpers interface shareable net/sfc: use own logging helper macros net/sfc: avoid usage of NIC pointer from adapter context net/sfc: avoid panic in the case of MCDI timeout net/sfc: add MCDI callbacks to allocate/free DMA memory net/sfc: add MCDI callback to schedule restart net/sfc: add MCDI callback to poll management event queue net/sfc: use MCDI control structure as libefx ops context net/sfc: move MCDI helpers to common driver MAINTAINERS | 1 + drivers/common/Makefile | 4 + drivers/common/meson.build | 2 +- drivers/common/sfc_efx/Makefile | 112 ++++++ .../{net/sfc => common/sfc_efx}/base/README | 0 .../sfc => common/sfc_efx}/base/ef10_ev.c | 0 .../sfc => common/sfc_efx}/base/ef10_evb.c | 0 .../sfc => common/sfc_efx}/base/ef10_filter.c | 0 .../sfc_efx}/base/ef10_firmware_ids.h | 0 .../sfc => common/sfc_efx}/base/ef10_image.c | 0 .../sfc => common/sfc_efx}/base/ef10_impl.h | 0 .../sfc => common/sfc_efx}/base/ef10_intr.c | 0 .../sfc => common/sfc_efx}/base/ef10_mac.c | 0 .../sfc => common/sfc_efx}/base/ef10_mcdi.c | 0 .../sfc => common/sfc_efx}/base/ef10_nic.c | 0 .../sfc => common/sfc_efx}/base/ef10_nvram.c | 0 .../sfc => common/sfc_efx}/base/ef10_phy.c | 0 .../sfc => common/sfc_efx}/base/ef10_proxy.c | 0 .../sfc => common/sfc_efx}/base/ef10_rx.c | 0 .../sfc_efx}/base/ef10_signed_image_layout.h | 0 .../sfc_efx}/base/ef10_tlv_layout.h | 0 .../sfc => common/sfc_efx}/base/ef10_tx.c | 0 .../sfc => common/sfc_efx}/base/ef10_vpd.c | 0 .../{net/sfc => common/sfc_efx}/base/efx.h | 0 .../sfc => common/sfc_efx}/base/efx_annote.h | 0 .../sfc => common/sfc_efx}/base/efx_bootcfg.c | 0 .../sfc => common/sfc_efx}/base/efx_check.h | 0 .../sfc => common/sfc_efx}/base/efx_crc32.c | 0 .../{net/sfc => common/sfc_efx}/base/efx_ev.c | 0 .../sfc => common/sfc_efx}/base/efx_evb.c | 0 .../sfc => common/sfc_efx}/base/efx_filter.c | 0 .../sfc => common/sfc_efx}/base/efx_hash.c | 0 .../sfc => common/sfc_efx}/base/efx_impl.h | 0 .../sfc => common/sfc_efx}/base/efx_intr.c | 0 .../sfc => common/sfc_efx}/base/efx_lic.c | 0 .../sfc => common/sfc_efx}/base/efx_mac.c | 0 .../sfc => common/sfc_efx}/base/efx_mcdi.c | 0 .../sfc => common/sfc_efx}/base/efx_mcdi.h | 0 .../sfc => common/sfc_efx}/base/efx_mon.c | 0 .../sfc => common/sfc_efx}/base/efx_nic.c | 0 .../sfc => common/sfc_efx}/base/efx_nvram.c | 0 .../sfc => common/sfc_efx}/base/efx_phy.c | 0 .../sfc => common/sfc_efx}/base/efx_phy_ids.h | 0 .../sfc => common/sfc_efx}/base/efx_port.c | 0 .../sfc => common/sfc_efx}/base/efx_proxy.c | 0 .../sfc => common/sfc_efx}/base/efx_regs.h | 0 .../sfc_efx}/base/efx_regs_ef10.h | 0 .../sfc_efx}/base/efx_regs_mcdi.h | 0 .../sfc_efx}/base/efx_regs_mcdi_aoe.h | 0 .../sfc_efx}/base/efx_regs_mcdi_strs.h | 0 .../sfc_efx}/base/efx_regs_pci.h | 0 .../{net/sfc => common/sfc_efx}/base/efx_rx.c | 0 .../sfc => common/sfc_efx}/base/efx_sram.c | 0 .../sfc => common/sfc_efx}/base/efx_tunnel.c | 0 .../{net/sfc => common/sfc_efx}/base/efx_tx.c | 0 .../sfc => common/sfc_efx}/base/efx_types.h | 0 .../sfc => common/sfc_efx}/base/efx_vpd.c | 0 .../sfc => common/sfc_efx}/base/hunt_impl.h | 0 .../sfc => common/sfc_efx}/base/hunt_nic.c | 0 .../sfc => common/sfc_efx}/base/mcdi_mon.c | 0 .../sfc => common/sfc_efx}/base/mcdi_mon.h | 0 .../sfc_efx}/base/medford2_impl.h | 0 .../sfc_efx}/base/medford2_nic.c | 0 .../sfc_efx}/base/medford_impl.h | 0 .../sfc => common/sfc_efx}/base/medford_nic.c | 0 .../sfc => common/sfc_efx}/base/meson.build | 0 .../sfc => common/sfc_efx}/base/siena_flash.h | 0 .../sfc => common/sfc_efx}/base/siena_impl.h | 0 .../sfc => common/sfc_efx}/base/siena_mac.c | 0 .../sfc => common/sfc_efx}/base/siena_mcdi.c | 0 .../sfc => common/sfc_efx}/base/siena_nic.c | 0 .../sfc => common/sfc_efx}/base/siena_nvram.c | 0 .../sfc => common/sfc_efx}/base/siena_phy.c | 0 .../sfc => common/sfc_efx}/base/siena_sram.c | 0 .../sfc => common/sfc_efx}/base/siena_vpd.c | 0 drivers/{net/sfc => common/sfc_efx}/efsys.h | 58 +-- drivers/common/sfc_efx/meson.build | 40 ++ .../sfc_efx/rte_common_sfc_efx_version.map | 119 ++++++ drivers/common/sfc_efx/sfc_efx.c | 23 ++ drivers/common/sfc_efx/sfc_efx_debug.h | 29 ++ drivers/common/sfc_efx/sfc_efx_log.h | 22 ++ drivers/common/sfc_efx/sfc_efx_mcdi.c | 343 ++++++++++++++++++ drivers/common/sfc_efx/sfc_efx_mcdi.h | 75 ++++ drivers/net/sfc/Makefile | 70 +--- drivers/net/sfc/meson.build | 6 +- drivers/net/sfc/sfc.c | 1 + drivers/net/sfc/sfc.h | 26 +- drivers/net/sfc/sfc_dp_tx.h | 1 + drivers/net/sfc/sfc_ef10.h | 2 + drivers/net/sfc/sfc_ef10_essb_rx.c | 1 + drivers/net/sfc/sfc_ef10_rx.c | 1 + drivers/net/sfc/sfc_ef10_rx_ev.h | 2 + drivers/net/sfc/sfc_ef10_tx.c | 1 + drivers/net/sfc/sfc_ethdev.c | 13 + drivers/net/sfc/sfc_filter.c | 1 + drivers/net/sfc/sfc_flow.c | 1 + drivers/net/sfc/sfc_log.h | 21 +- drivers/net/sfc/sfc_mcdi.c | 295 ++------------- drivers/net/sfc/sfc_port.c | 1 + mk/rte.app.mk | 1 + 100 files changed, 870 insertions(+), 402 deletions(-) create mode 100644 drivers/common/sfc_efx/Makefile rename drivers/{net/sfc => common/sfc_efx}/base/README (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_ev.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_evb.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_filter.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_firmware_ids.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_image.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_impl.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_intr.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_mac.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_mcdi.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_nic.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_nvram.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_phy.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_proxy.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_rx.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_signed_image_layout.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_tlv_layout.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_tx.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/ef10_vpd.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_annote.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_bootcfg.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_check.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_crc32.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_ev.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_evb.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_filter.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_hash.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_impl.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_intr.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_lic.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_mac.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_mcdi.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_mcdi.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_mon.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_nic.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_nvram.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_phy.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_phy_ids.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_port.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_proxy.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_regs.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_regs_ef10.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_regs_mcdi.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_regs_mcdi_aoe.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_regs_mcdi_strs.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_regs_pci.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_rx.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_sram.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_tunnel.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_tx.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_types.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/efx_vpd.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/hunt_impl.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/hunt_nic.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/mcdi_mon.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/mcdi_mon.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/medford2_impl.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/medford2_nic.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/medford_impl.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/medford_nic.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/meson.build (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_flash.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_impl.h (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_mac.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_mcdi.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_nic.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_nvram.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_phy.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_sram.c (100%) rename drivers/{net/sfc => common/sfc_efx}/base/siena_vpd.c (100%) rename drivers/{net/sfc => common/sfc_efx}/efsys.h (93%) create mode 100644 drivers/common/sfc_efx/meson.build create mode 100644 drivers/common/sfc_efx/rte_common_sfc_efx_version.map create mode 100644 drivers/common/sfc_efx/sfc_efx.c create mode 100644 drivers/common/sfc_efx/sfc_efx_debug.h create mode 100644 drivers/common/sfc_efx/sfc_efx_log.h create mode 100644 drivers/common/sfc_efx/sfc_efx_mcdi.c create mode 100644 drivers/common/sfc_efx/sfc_efx_mcdi.h -- 2.17.1