From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nbfkord-smmo01.seg.att.com (nbfkord-smmo01.seg.att.com [209.65.160.76]) by dpdk.org (Postfix) with ESMTP id 5297F37B6 for ; Tue, 29 Nov 2016 17:20:47 +0100 (CET) Received: from unknown [12.187.104.26] (EHLO nbfkord-smmo01.seg.att.com) by nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-7) with ESMTP id fdaad385.2b3e8e656940.83539.00-2487.173774.nbfkord-smmo01.seg.att.com (envelope-from ); Tue, 29 Nov 2016 16:20:47 +0000 (UTC) X-MXL-Hash: 583daadf3c2b48d2-06097c54d44982f5d20de38f94de3c922c9e7dad Received: from unknown [12.187.104.26] by nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-7) with SMTP id 3daad385.0.83400.00-2359.173542.nbfkord-smmo01.seg.att.com (envelope-from ); Tue, 29 Nov 2016 16:20:35 +0000 (UTC) X-MXL-Hash: 583daad36823090e-5c0f93a38105def326ede923b445db8e6b2bdd81 Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Tue, 29 Nov 2016 08:20:24 -0800 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25 via Frontend Transport; Tue, 29 Nov 2016 08:20:24 -0800 Received: from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com [10.17.10.10]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id uATGKNwO029892; Tue, 29 Nov 2016 16:20:23 GMT Received: from uklogin.uk.solarflarecom.com (localhost.localdomain [127.0.0.1]) by uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id uATGKM18021233; Tue, 29 Nov 2016 16:20:22 GMT From: Andrew Rybchenko To: CC: Date: Tue, 29 Nov 2016 16:18:32 +0000 Message-ID: <1480436367-20749-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1479740470-6723-1-git-send-email-arybchenko@solarflare.com> References: <1479740470-6723-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-AnalysisOut: [v=2.1 cv=UoJlQrEB c=1 sm=1 tr=0 a=8BlWFWvVlq5taO8ncb8nKg==] X-AnalysisOut: [:17 a=L24OOQBejmoA:10 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=] X-AnalysisOut: [ib9FjbD_CwAm02ORetkA:9 a=CjJlJmXOVZ_S-xcL:21 a=IjZwj45LgO3] X-AnalysisOut: [ly-622nXo:22 a=Bn2pgwyD2vrAyMmN8A2t:22] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [12.187.104.26] Subject: [dpdk-dev] [PATCH v2 00/55] Solarflare libefx-based PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 16:20:47 -0000 The patch series adds Solarflare libefx-based network PMD. This version of the driver supports Solarflare SFN7xxx and SFN8xxx families of 10/40 Gbps adapters. libefx is a platform-independent library to implement drivers for Solarflare network adapters. It provides unified adapter family independent interface (if possible). FreeBSD [1] and illumos [2] drivers are built on top of the library. The patch series could be logically structured into 5 sub-series: 1. (1) add the driver skeleton including documentation 2. (2-30) import libefx and include it in build with the latest patch 3. (31-42) implement minimal device level operations in steps 4. (43-50) implement Rx subsystem 5. (51-55) implement Tx subsystem Functional driver with multi-queue support capable to send and receive traffic appears with the last patch in the series. The following design decisions are made during development: 1. Since libefx uses positive errno return codes, positive errno return codes are used inside the driver and coversion to negative is done on return from eth_dev_ops callbacks. We think that it is the less error-prone way. 2. Own event queue (a way to deliver events from HW to host CPU) is used for house-keeping (e.g. link status notifications), each Tx and each Rx queue. No locks on datapath are requires in this case. 3. Alarm is used to periodically poll house-keeping event queue. The event queue is used to deliver link status change notifications, Rx/Tx queue flush events, SRAM events. It is not used on datapath. The event queue polling is protected using spin-lock since concurrent access from different contexts is possible (e.g. device stop when polling alarm is running). [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/ [2] https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/ --- v2: * Fix spelling * Fix ICC and clang build warnings * Remove efx subdirectory * Fix bug in Makefile which results in duplication of warnings options * Use WERROR_FLAGS and remove warnings disabling for the PMD itself * Comment enabled EFSYS_OPT_ * Use space after #define instead of TAB * Update version map to upcoming release * Use bool for boolean_t in efsys.h Andrew Rybchenko (48): net/sfc: libefx-based PMD stub sufficient to build and init net/sfc: import libefx base net/sfc: import libefx register definitions net/sfc: import libefx filters support net/sfc: import libefx MCDI definition net/sfc: import libefx MCDI implementation net/sfc: import libefx MCDI logging support net/sfc: import libefx MCDI proxy authorization support net/sfc: import libefx 5xxx/6xxx family support net/sfc: import libefx SFN7xxx family support net/sfc: import libefx SFN8xxx family support net/sfc: import libefx diagnostics support net/sfc: import libefx built-in selftest support net/sfc: import libefx software per-queue statistics support net/sfc: import libefx PHY flags control support net/sfc: import libefx PHY statistics support net/sfc: import libefx PHY LEDs control support net/sfc: import libefx MAC statistics support net/sfc: import libefx event prefetch support net/sfc: import libefx Rx scatter support net/sfc: import libefx RSS support net/sfc: import libefx loopback control support net/sfc: import libefx monitors statistics support net/sfc: import libefx support to access monitors via MCDI net/sfc: import libefx support for Rx packed stream mode net/sfc: import libefx NVRAM support net/sfc: import libefx VPD support net/sfc: import libefx bootrom configuration support net/sfc: import libefx licensing support net/sfc: implement driver operation to init device on attach net/sfc: add device configure and close stubs net/sfc: add device configuration checks net/sfc: implement device start and stop operations net/sfc: make available resources estimation and allocation net/sfc: interrupts support sufficient for event queue init net/sfc: implement event queue support net/sfc: implement EVQ dummy exception handling net/sfc: maintain management event queue net/sfc: periodic management EVQ polling using alarm net/sfc: minimum port control sufficient to receive traffic net/sfc: implement Rx subsystem stubs net/sfc: check configured rxmode net/sfc: implement Rx queue setup release operations net/sfc: calculate Rx buffer size which may be used net/sfc: validate Rx queue buffers setup net/sfc: implement Rx queue start and stop operations net/sfc: implement device callback to Rx burst of packets net/sfc: discard scattered packet on Rx correctly Artem Andreev (2): net/sfc: include libefx in build net/sfc: implement device operation to retrieve link info Ivan Malov (5): net/sfc: provide basic stubs for Tx subsystem net/sfc: add function to check configured Tx mode net/sfc: add callbacks to set up and release Tx queues net/sfc: implement transmit path start / stop net/sfc: add callback to send bursts of packets MAINTAINERS | 6 + config/common_base | 6 + config/defconfig_arm-armv7a-linuxapp-gcc | 1 + config/defconfig_arm64-armv8a-linuxapp-gcc | 1 + config/defconfig_i686-native-linuxapp-gcc | 5 + config/defconfig_i686-native-linuxapp-icc | 5 + config/defconfig_ppc_64-power8-linuxapp-gcc | 1 + config/defconfig_tile-tilegx-linuxapp-gcc | 1 + config/defconfig_x86_64-native-linuxapp-icc | 5 + config/defconfig_x86_x32-native-linuxapp-gcc | 5 + doc/guides/nics/features/sfc_efx.ini | 13 + doc/guides/nics/index.rst | 1 + doc/guides/nics/sfc_efx.rst | 157 + doc/guides/rel_notes/release_17_02.rst | 5 + drivers/net/Makefile | 1 + drivers/net/sfc/Makefile | 142 + drivers/net/sfc/base/README | 36 + drivers/net/sfc/base/ef10_ev.c | 1401 +++ drivers/net/sfc/base/ef10_filter.c | 1479 +++ drivers/net/sfc/base/ef10_impl.h | 1182 ++ drivers/net/sfc/base/ef10_intr.c | 197 + drivers/net/sfc/base/ef10_mac.c | 897 ++ drivers/net/sfc/base/ef10_mcdi.c | 342 + drivers/net/sfc/base/ef10_nic.c | 1833 +++ drivers/net/sfc/base/ef10_nvram.c | 2385 ++++ drivers/net/sfc/base/ef10_phy.c | 631 + drivers/net/sfc/base/ef10_rx.c | 965 ++ drivers/net/sfc/base/ef10_tlv_layout.h | 941 ++ drivers/net/sfc/base/ef10_tx.c | 709 ++ drivers/net/sfc/base/ef10_vpd.c | 463 + drivers/net/sfc/base/efx.h | 2505 ++++ drivers/net/sfc/base/efx_bootcfg.c | 563 + drivers/net/sfc/base/efx_check.h | 346 + drivers/net/sfc/base/efx_crc32.c | 122 + drivers/net/sfc/base/efx_ev.c | 1470 +++ drivers/net/sfc/base/efx_filter.c | 1402 +++ drivers/net/sfc/base/efx_hash.c | 328 + drivers/net/sfc/base/efx_impl.h | 1206 ++ drivers/net/sfc/base/efx_intr.c | 572 + drivers/net/sfc/base/efx_lic.c | 1751 +++ drivers/net/sfc/base/efx_mac.c | 926 ++ drivers/net/sfc/base/efx_mcdi.c | 2269 ++++ drivers/net/sfc/base/efx_mcdi.h | 406 + drivers/net/sfc/base/efx_mon.c | 255 + drivers/net/sfc/base/efx_nic.c | 1062 ++ drivers/net/sfc/base/efx_nvram.c | 1044 ++ drivers/net/sfc/base/efx_phy.c | 561 + drivers/net/sfc/base/efx_phy_ids.h | 51 + drivers/net/sfc/base/efx_port.c | 252 + drivers/net/sfc/base/efx_regs.h | 3870 ++++++ drivers/net/sfc/base/efx_regs_ef10.h | 571 + drivers/net/sfc/base/efx_regs_mcdi.h | 15690 +++++++++++++++++++++++++ drivers/net/sfc/base/efx_regs_pci.h | 2356 ++++ drivers/net/sfc/base/efx_rx.c | 1315 +++ drivers/net/sfc/base/efx_sram.c | 331 + drivers/net/sfc/base/efx_tx.c | 1089 ++ drivers/net/sfc/base/efx_types.h | 1647 +++ drivers/net/sfc/base/efx_vpd.c | 1016 ++ drivers/net/sfc/base/hunt_impl.h | 74 + drivers/net/sfc/base/hunt_nic.c | 398 + drivers/net/sfc/base/mcdi_mon.c | 565 + drivers/net/sfc/base/mcdi_mon.h | 74 + drivers/net/sfc/base/medford_impl.h | 67 + drivers/net/sfc/base/medford_nic.c | 398 + drivers/net/sfc/base/siena_flash.h | 215 + drivers/net/sfc/base/siena_impl.h | 431 + drivers/net/sfc/base/siena_mac.c | 476 + drivers/net/sfc/base/siena_mcdi.c | 263 + drivers/net/sfc/base/siena_nic.c | 581 + drivers/net/sfc/base/siena_nvram.c | 734 ++ drivers/net/sfc/base/siena_phy.c | 797 ++ drivers/net/sfc/base/siena_sram.c | 178 + drivers/net/sfc/base/siena_vpd.c | 618 + drivers/net/sfc/efsys.h | 773 ++ drivers/net/sfc/rte_pmd_sfc_efx_version.map | 4 + drivers/net/sfc/sfc.c | 571 + drivers/net/sfc/sfc.h | 236 + drivers/net/sfc/sfc_debug.h | 57 + drivers/net/sfc/sfc_ethdev.c | 467 + drivers/net/sfc/sfc_ev.c | 685 ++ drivers/net/sfc/sfc_ev.h | 145 + drivers/net/sfc/sfc_intr.c | 128 + drivers/net/sfc/sfc_kvargs.c | 109 + drivers/net/sfc/sfc_kvargs.h | 58 + drivers/net/sfc/sfc_log.h | 74 + drivers/net/sfc/sfc_mcdi.c | 198 + drivers/net/sfc/sfc_port.c | 189 + drivers/net/sfc/sfc_rx.c | 802 ++ drivers/net/sfc/sfc_rx.h | 145 + drivers/net/sfc/sfc_tweak.h | 51 + drivers/net/sfc/sfc_tx.c | 643 + drivers/net/sfc/sfc_tx.h | 124 + mk/rte.app.mk | 1 + 93 files changed, 70121 insertions(+) create mode 100644 doc/guides/nics/features/sfc_efx.ini create mode 100644 doc/guides/nics/sfc_efx.rst create mode 100644 drivers/net/sfc/Makefile create mode 100644 drivers/net/sfc/base/README create mode 100644 drivers/net/sfc/base/ef10_ev.c create mode 100644 drivers/net/sfc/base/ef10_filter.c create mode 100644 drivers/net/sfc/base/ef10_impl.h create mode 100644 drivers/net/sfc/base/ef10_intr.c create mode 100644 drivers/net/sfc/base/ef10_mac.c create mode 100644 drivers/net/sfc/base/ef10_mcdi.c create mode 100644 drivers/net/sfc/base/ef10_nic.c create mode 100644 drivers/net/sfc/base/ef10_nvram.c create mode 100644 drivers/net/sfc/base/ef10_phy.c create mode 100644 drivers/net/sfc/base/ef10_rx.c create mode 100644 drivers/net/sfc/base/ef10_tlv_layout.h create mode 100644 drivers/net/sfc/base/ef10_tx.c create mode 100644 drivers/net/sfc/base/ef10_vpd.c create mode 100644 drivers/net/sfc/base/efx.h create mode 100644 drivers/net/sfc/base/efx_bootcfg.c create mode 100644 drivers/net/sfc/base/efx_check.h create mode 100644 drivers/net/sfc/base/efx_crc32.c create mode 100644 drivers/net/sfc/base/efx_ev.c create mode 100644 drivers/net/sfc/base/efx_filter.c create mode 100644 drivers/net/sfc/base/efx_hash.c create mode 100644 drivers/net/sfc/base/efx_impl.h create mode 100644 drivers/net/sfc/base/efx_intr.c create mode 100644 drivers/net/sfc/base/efx_lic.c create mode 100644 drivers/net/sfc/base/efx_mac.c create mode 100644 drivers/net/sfc/base/efx_mcdi.c create mode 100644 drivers/net/sfc/base/efx_mcdi.h create mode 100644 drivers/net/sfc/base/efx_mon.c create mode 100644 drivers/net/sfc/base/efx_nic.c create mode 100644 drivers/net/sfc/base/efx_nvram.c create mode 100644 drivers/net/sfc/base/efx_phy.c create mode 100644 drivers/net/sfc/base/efx_phy_ids.h create mode 100644 drivers/net/sfc/base/efx_port.c create mode 100644 drivers/net/sfc/base/efx_regs.h create mode 100644 drivers/net/sfc/base/efx_regs_ef10.h create mode 100644 drivers/net/sfc/base/efx_regs_mcdi.h create mode 100644 drivers/net/sfc/base/efx_regs_pci.h create mode 100644 drivers/net/sfc/base/efx_rx.c create mode 100644 drivers/net/sfc/base/efx_sram.c create mode 100644 drivers/net/sfc/base/efx_tx.c create mode 100644 drivers/net/sfc/base/efx_types.h create mode 100644 drivers/net/sfc/base/efx_vpd.c create mode 100644 drivers/net/sfc/base/hunt_impl.h create mode 100644 drivers/net/sfc/base/hunt_nic.c create mode 100644 drivers/net/sfc/base/mcdi_mon.c create mode 100644 drivers/net/sfc/base/mcdi_mon.h create mode 100644 drivers/net/sfc/base/medford_impl.h create mode 100644 drivers/net/sfc/base/medford_nic.c create mode 100644 drivers/net/sfc/base/siena_flash.h create mode 100644 drivers/net/sfc/base/siena_impl.h create mode 100644 drivers/net/sfc/base/siena_mac.c create mode 100644 drivers/net/sfc/base/siena_mcdi.c create mode 100644 drivers/net/sfc/base/siena_nic.c create mode 100644 drivers/net/sfc/base/siena_nvram.c create mode 100644 drivers/net/sfc/base/siena_phy.c create mode 100644 drivers/net/sfc/base/siena_sram.c create mode 100644 drivers/net/sfc/base/siena_vpd.c create mode 100644 drivers/net/sfc/efsys.h create mode 100644 drivers/net/sfc/rte_pmd_sfc_efx_version.map create mode 100644 drivers/net/sfc/sfc.c create mode 100644 drivers/net/sfc/sfc.h create mode 100644 drivers/net/sfc/sfc_debug.h create mode 100644 drivers/net/sfc/sfc_ethdev.c create mode 100644 drivers/net/sfc/sfc_ev.c create mode 100644 drivers/net/sfc/sfc_ev.h create mode 100644 drivers/net/sfc/sfc_intr.c create mode 100644 drivers/net/sfc/sfc_kvargs.c create mode 100644 drivers/net/sfc/sfc_kvargs.h create mode 100644 drivers/net/sfc/sfc_log.h create mode 100644 drivers/net/sfc/sfc_mcdi.c create mode 100644 drivers/net/sfc/sfc_port.c create mode 100644 drivers/net/sfc/sfc_rx.c create mode 100644 drivers/net/sfc/sfc_rx.h create mode 100644 drivers/net/sfc/sfc_tweak.h create mode 100644 drivers/net/sfc/sfc_tx.c create mode 100644 drivers/net/sfc/sfc_tx.h -- 2.5.5