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