Native uio-based PMD for Mellanox ConnectX-3 devices
Subsystems (2)
cover Native uio-based PMD for Mellanox ConnectX-3 devices
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL sources. The GPL affected source codes reside in the mlnx_uio/kernel directory.
leeopop (2):
eal/persistent: new library to hold memory region after program exit
mlnx_uio: new poll mode driver
config/common_linuxapp | 10 + drivers/net/Makefile | 1 + drivers/net/mlnx_uio/.gitignore | 1 + drivers/net/mlnx_uio/LICENSE | 30 + drivers/net/mlnx_uio/Makefile | 139 + drivers/net/mlnx_uio/convert.py | 50 + drivers/net/mlnx_uio/include/autoconf.h | 10 + drivers/net/mlnx_uio/include/bitmap.h | 314 + drivers/net/mlnx_uio/include/bitops.h | 558 ++ drivers/net/mlnx_uio/include/dcbnl.h | 751 +++ drivers/net/mlnx_uio/include/etherdevice.h | 189 + drivers/net/mlnx_uio/include/ib_mad.h | 664 ++ drivers/net/mlnx_uio/include/ib_smi.h | 128 + drivers/net/mlnx_uio/include/ib_verbs.h | 806 +++ drivers/net/mlnx_uio/include/inline_functions.h | 307 + drivers/net/mlnx_uio/include/kcompat.h | 36 + drivers/net/mlnx_uio/include/kmod.h | 768 +++ drivers/net/mlnx_uio/include/list.h | 780 +++ drivers/net/mlnx_uio/include/log2.h | 229 + drivers/net/mlnx_uio/include/mlx4_dpdk.h | 17 + drivers/net/mlnx_uio/include/mlx4_uio.h | 24 + drivers/net/mlnx_uio/include/mlx4_uio_helper.h | 800 +++ drivers/net/mlnx_uio/include/module.h | 12 + drivers/net/mlnx_uio/include/netdev_features.h | 166 + drivers/net/mlnx_uio/include/post_kmod.h | 13 + drivers/net/mlnx_uio/include/radix-tree.h | 48 + drivers/net/mlnx_uio/include/rbtree.h | 105 + drivers/net/mlnx_uio/include/rbtree_augmented.h | 230 + drivers/net/mlnx_uio/kernel/LICENSE | 339 + drivers/net/mlnx_uio/kernel/bitmap.c | 831 +++ drivers/net/mlnx_uio/kernel/kcompat.c | 96 + drivers/net/mlnx_uio/kernel/radix-tree.c | 78 + drivers/net/mlnx_uio/kernel/rbtree.c | 561 ++ drivers/net/mlnx_uio/mlnx/include/mlx4/cmd.h | 309 + drivers/net/mlnx_uio/mlnx/include/mlx4/cq.h | 195 + drivers/net/mlnx_uio/mlnx/include/mlx4/device.h | 1744 +++++ drivers/net/mlnx_uio/mlnx/include/mlx4/doorbell.h | 90 + drivers/net/mlnx_uio/mlnx/include/mlx4/driver.h | 175 + drivers/net/mlnx_uio/mlnx/include/mlx4/qp.h | 540 ++ drivers/net/mlnx_uio/mlnx/include/mlx4/srq.h | 50 + drivers/net/mlnx_uio/mlnx/include/mlx5/cmd.h | 56 + drivers/net/mlnx_uio/mlnx/include/mlx5/cq.h | 182 + drivers/net/mlnx_uio/mlnx/include/mlx5/device.h | 1204 ++++ drivers/net/mlnx_uio/mlnx/include/mlx5/doorbell.h | 85 + drivers/net/mlnx_uio/mlnx/include/mlx5/driver.h | 1063 +++ .../net/mlnx_uio/mlnx/include/mlx5/flow_table.h | 59 + drivers/net/mlnx_uio/mlnx/include/mlx5/mlx5_ifc.h | 6892 ++++++++++++++++++++ drivers/net/mlnx_uio/mlnx/include/mlx5/qp.h | 804 +++ drivers/net/mlnx_uio/mlnx/include/mlx5/srq.h | 46 + drivers/net/mlnx_uio/mlnx/include/mlx5/vport.h | 52 + drivers/net/mlnx_uio/mlnx/mlx4/Kconfig | 46 + drivers/net/mlnx_uio/mlnx/mlx4/Makefile | 19 + drivers/net/mlnx_uio/mlnx/mlx4/alloc.c | 872 +++ drivers/net/mlnx_uio/mlnx/mlx4/catas.c | 350 + drivers/net/mlnx_uio/mlnx/mlx4/cmd.c | 3456 ++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/cq.c | 443 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_clock.c | 330 + drivers/net/mlnx_uio/mlnx/mlx4/en_cq.c | 257 + drivers/net/mlnx_uio/mlnx/mlx4/en_dcb_nl.c | 613 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_ethtool.c | 2582 ++++++++ drivers/net/mlnx_uio/mlnx/mlx4/en_main.c | 493 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_netdev.c | 3786 +++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/en_port.c | 493 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_port.h | 593 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_resources.c | 184 + drivers/net/mlnx_uio/mlnx/mlx4/en_rx.c | 1565 +++++ drivers/net/mlnx_uio/mlnx/mlx4/en_rx_uio.c | 187 + drivers/net/mlnx_uio/mlnx/mlx4/en_selftest.c | 194 + drivers/net/mlnx_uio/mlnx/mlx4/en_sysfs.c | 623 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_tx.c | 1143 ++++ drivers/net/mlnx_uio/mlnx/mlx4/en_tx_uio.c | 47 + drivers/net/mlnx_uio/mlnx/mlx4/eq.c | 1777 +++++ drivers/net/mlnx_uio/mlnx/mlx4/fw.c | 3005 +++++++++ drivers/net/mlnx_uio/mlnx/mlx4/fw.h | 270 + drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.c | 292 + drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.h | 150 + drivers/net/mlnx_uio/mlnx/mlx4/icm.c | 522 ++ drivers/net/mlnx_uio/mlnx/mlx4/icm.h | 133 + drivers/net/mlnx_uio/mlnx/mlx4/intf.c | 246 + drivers/net/mlnx_uio/mlnx/mlx4/main.c | 5485 ++++++++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/main.c.orig | 5335 +++++++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/mcg.c | 1665 +++++ drivers/net/mlnx_uio/mlnx/mlx4/mlx4.h | 1514 +++++ drivers/net/mlnx_uio/mlnx/mlx4/mlx4_en.h | 1188 ++++ drivers/net/mlnx_uio/mlnx/mlx4/mlx4_stats.h | 153 + drivers/net/mlnx_uio/mlnx/mlx4/mr.c | 1178 ++++ drivers/net/mlnx_uio/mlnx/mlx4/pd.c | 310 + drivers/net/mlnx_uio/mlnx/mlx4/port.c | 1636 +++++ drivers/net/mlnx_uio/mlnx/mlx4/profile.c | 259 + drivers/net/mlnx_uio/mlnx/mlx4/qp.c | 956 +++ drivers/net/mlnx_uio/mlnx/mlx4/reset.c | 202 + drivers/net/mlnx_uio/mlnx/mlx4/resource_tracker.c | 5052 ++++++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/sense.c | 153 + drivers/net/mlnx_uio/mlnx/mlx4/srq.c | 314 + drivers/net/mlnx_uio/mlnx/mlx5/core/Kconfig | 8 + drivers/net/mlnx_uio/mlnx/mlx5/core/Makefile | 9 + drivers/net/mlnx_uio/mlnx/mlx5/core/alloc.c | 273 + drivers/net/mlnx_uio/mlnx/mlx5/core/cmd.c | 2069 ++++++ drivers/net/mlnx_uio/mlnx/mlx5/core/cq.c | 236 + drivers/net/mlnx_uio/mlnx/mlx5/core/debugfs.c | 718 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/en.h | 695 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_debugfs.c | 115 + drivers/net/mlnx_uio/mlnx/mlx5/core/en_ethtool.c | 816 +++ .../net/mlnx_uio/mlnx/mlx5/core/en_flow_table.c | 1014 +++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_main.c | 2265 +++++++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_rx.c | 310 + drivers/net/mlnx_uio/mlnx/mlx5/core/en_tx.c | 392 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_txrx.c | 118 + drivers/net/mlnx_uio/mlnx/mlx5/core/eq.c | 566 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/flow_table.c | 422 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/fw.c | 199 + drivers/net/mlnx_uio/mlnx/mlx5/core/health.c | 229 + drivers/net/mlnx_uio/mlnx/mlx5/core/mad.c | 78 + drivers/net/mlnx_uio/mlnx/mlx5/core/main.c | 1583 +++++ drivers/net/mlnx_uio/mlnx/mlx5/core/mcg.c | 105 + drivers/net/mlnx_uio/mlnx/mlx5/core/mlx5_core.h | 105 + drivers/net/mlnx_uio/mlnx/mlx5/core/mr.c | 251 + drivers/net/mlnx_uio/mlnx/mlx5/core/pagealloc.c | 533 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/params.c | 198 + drivers/net/mlnx_uio/mlnx/mlx5/core/pd.c | 73 + drivers/net/mlnx_uio/mlnx/mlx5/core/port.c | 869 +++ drivers/net/mlnx_uio/mlnx/mlx5/core/qp.c | 639 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/sriov.c | 525 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/srq.c | 524 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.c | 361 + drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.h | 68 + drivers/net/mlnx_uio/mlnx/mlx5/core/uar.c | 235 + drivers/net/mlnx_uio/mlnx/mlx5/core/vport.c | 216 + drivers/net/mlnx_uio/mlnx/mlx5/core/wq.c | 195 + drivers/net/mlnx_uio/mlnx/mlx5/core/wq.h | 177 + drivers/net/mlnx_uio/mlx4_en_special.h | 21 + drivers/net/mlnx_uio/mlx4_uio.c | 1026 +++ drivers/net/mlnx_uio/prepare.py | 28 + drivers/net/mlnx_uio/rte_pmd_mlnx_uio_version.map | 4 + lib/Makefile | 1 + lib/librte_eal/common/Makefile | 3 + lib/librte_eal/common/include/rte_pci.h | 1 + lib/librte_eal/common/include/rte_persistent_mem.h | 26 + lib/librte_eal/linuxapp/eal/Makefile | 6 + lib/librte_eal/linuxapp/eal/eal.c | 9 + lib/librte_eal/linuxapp/eal/eal_persistent_mem.c | 148 + .../eal/include/exec-env/rte_persistent_mem.h | 15 + lib/librte_eal/linuxapp/eal/rte_eal_version.map | 2 + lib/librte_persistent/Makefile | 55 + lib/librte_persistent/rte_persistent.c | 198 + lib/librte_persistent/rte_persistent.h | 20 + lib/librte_persistent/rte_persistent_version.map | 11 + mk/rte.app.mk | 6 + 148 files changed, 91477 insertions(+) create mode 100644 drivers/net/mlnx_uio/.gitignore create mode 100644 drivers/net/mlnx_uio/LICENSE create mode 100644 drivers/net/mlnx_uio/Makefile create mode 100755 drivers/net/mlnx_uio/convert.py create mode 100644 drivers/net/mlnx_uio/include/autoconf.h create mode 100644 drivers/net/mlnx_uio/include/bitmap.h create mode 100644 drivers/net/mlnx_uio/include/bitops.h create mode 100644 drivers/net/mlnx_uio/include/dcbnl.h create mode 100644 drivers/net/mlnx_uio/include/etherdevice.h create mode 100644 drivers/net/mlnx_uio/include/ib_mad.h create mode 100644 drivers/net/mlnx_uio/include/ib_smi.h create mode 100644 drivers/net/mlnx_uio/include/ib_verbs.h create mode 100644 drivers/net/mlnx_uio/include/inline_functions.h create mode 100644 drivers/net/mlnx_uio/include/kcompat.h create mode 100644 drivers/net/mlnx_uio/include/kmod.h create mode 100644 drivers/net/mlnx_uio/include/list.h create mode 100644 drivers/net/mlnx_uio/include/log2.h create mode 100644 drivers/net/mlnx_uio/include/mlx4_dpdk.h create mode 100644 drivers/net/mlnx_uio/include/mlx4_uio.h create mode 100644 drivers/net/mlnx_uio/include/mlx4_uio_helper.h create mode 100644 drivers/net/mlnx_uio/include/module.h create mode 100644 drivers/net/mlnx_uio/include/netdev_features.h create mode 100644 drivers/net/mlnx_uio/include/post_kmod.h create mode 100644 drivers/net/mlnx_uio/include/radix-tree.h create mode 100644 drivers/net/mlnx_uio/include/rbtree.h create mode 100644 drivers/net/mlnx_uio/include/rbtree_augmented.h create mode 100644 drivers/net/mlnx_uio/kernel/LICENSE create mode 100644 drivers/net/mlnx_uio/kernel/bitmap.c create mode 100644 drivers/net/mlnx_uio/kernel/kcompat.c create mode 100644 drivers/net/mlnx_uio/kernel/radix-tree.c create mode 100644 drivers/net/mlnx_uio/kernel/rbtree.c create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/cmd.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/cq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/device.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/doorbell.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/driver.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/qp.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/srq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/cmd.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/cq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/device.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/doorbell.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/driver.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/flow_table.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/mlx5_ifc.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/qp.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/srq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/vport.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/Kconfig create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/Makefile create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/alloc.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/catas.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/cmd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/cq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_clock.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_cq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_dcb_nl.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_ethtool.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_netdev.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_port.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_port.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_resources.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_rx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_rx_uio.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_selftest.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_sysfs.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_tx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_tx_uio.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/eq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/icm.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/icm.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/intf.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/main.c.orig create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mcg.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mlx4.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mlx4_en.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mlx4_stats.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mr.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/pd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/port.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/profile.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/qp.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/reset.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/resource_tracker.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/sense.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/srq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/Kconfig create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/Makefile create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/alloc.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/cmd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/cq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/debugfs.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_debugfs.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_ethtool.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_flow_table.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_rx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_tx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_txrx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/eq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/flow_table.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/fw.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/health.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mad.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mcg.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mlx5_core.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mr.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/pagealloc.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/params.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/pd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/port.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/qp.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/sriov.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/srq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/uar.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/vport.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/wq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/wq.h create mode 100644 drivers/net/mlnx_uio/mlx4_en_special.h create mode 100644 drivers/net/mlnx_uio/mlx4_uio.c create mode 100755 drivers/net/mlnx_uio/prepare.py create mode 100644 drivers/net/mlnx_uio/rte_pmd_mlnx_uio_version.map create mode 100644 lib/librte_eal/common/include/rte_persistent_mem.h create mode 100644 lib/librte_eal/linuxapp/eal/eal_persistent_mem.c create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_persistent_mem.h create mode 100644 lib/librte_persistent/Makefile create mode 100644 lib/librte_persistent/rte_persistent.c create mode 100644 lib/librte_persistent/rte_persistent.h create mode 100644 lib/librte_persistent/rte_persistent_version.map
Signature · 1 line
2.1.4
PATCH 1/2 eal/persistent: new library to hold memory region after program exit
Some NICs use host memory region as their scratch area.
When DPDK user applications terminate, all the memory regions are lost, re-initialized (memzone), which causes HW faults.
This libraray maintains shared memory regions that is persistent across multiple execution and termination of user level applications. It also manages physically contiguous memory regions.
--- drivers/net/mlnx_uio/LICENSE | 30 ++++ lib/Makefile | 1 + lib/librte_eal/common/Makefile | 3 + lib/librte_eal/common/include/rte_pci.h | 1 + lib/librte_eal/common/include/rte_persistent_mem.h | 26 +++ lib/librte_eal/linuxapp/eal/Makefile | 6 + lib/librte_eal/linuxapp/eal/eal.c | 9 + lib/librte_eal/linuxapp/eal/eal_persistent_mem.c | 148 +++++++++++++++ .../eal/include/exec-env/rte_persistent_mem.h | 15 ++ lib/librte_eal/linuxapp/eal/rte_eal_version.map | 2 + lib/librte_persistent/Makefile | 55 ++++++ lib/librte_persistent/rte_persistent.c | 198 +++++++++++++++++++++ lib/librte_persistent/rte_persistent.h | 20 +++ lib/librte_persistent/rte_persistent_version.map | 11 ++ 14 files changed, 525 insertions(+) create mode 100644 drivers/net/mlnx_uio/LICENSE create mode 100644 lib/librte_eal/common/include/rte_persistent_mem.h create mode 100644 lib/librte_eal/linuxapp/eal/eal_persistent_mem.c create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_persistent_mem.h create mode 100644 lib/librte_persistent/Makefile create mode 100644 lib/librte_persistent/rte_persistent.c create mode 100644 lib/librte_persistent/rte_persistent.h create mode 100644 lib/librte_persistent/rte_persistent_version.map
drivers/net/mlnx_uio/LICENSE new file +30 -0
@@ -0,0 +1,30 @@ +* Source code in kernel/ directory follows GPLv2 license. + + +Copyright (c) 2015, Keunhong Lee +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of bsd nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
lib/Makefile +1 -0
@@ -57,6 +57,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PORT) += librte_port DIRS-$(CONFIG_RTE_LIBRTE_TABLE) += librte_table DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += librte_pipeline DIRS-$(CONFIG_RTE_LIBRTE_REORDER) += librte_reorder +DIRS-$(CONFIG_RTE_LIBRTE_PERSISTENT) += librte_persistent ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
lib/librte_eal/common/Makefile +3 -0
@@ -40,6 +40,9 @@ INC += rte_string_fns.h rte_version.h INC += rte_eal_memconfig.h rte_malloc_heap.h INC += rte_hexdump.h rte_devargs.h rte_dev.h INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h +ifeq ($(CONFIG_RTE_EAL_PERSISTENT_MEM),y) +INC += rte_persistent_mem.h +endif ifeq ($(CONFIG_RTE_INSECURE_FUNCTION_WARNING),y) INC += rte_warnings.h
lib/librte_eal/common/include/rte_pci.h +1 -0
@@ -207,6 +207,7 @@ struct rte_pci_driver {pci_devuninit_t *devuninit;/**< Device uninit function. */ const struct rte_pci_id *id_table;/**< ID table, NULL terminated. */ uint32_t drv_flags;/**< Flags contolling handling of device. */ +void * priv;/**< Private data. */ };/** Device needs PCI BAR mapping (done with either IGB_UIO or VFIO) */
lib/librte_eal/common/include/rte_persistent_mem.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* rte_persistent_memory.h +* +* Created on: Jun 22, 2015 +* Author: leeopop +*/ + +#ifndef LIBRTE_EAL_COMMON_INCLUDE_RTE_PERSISTENT_MEM_H_ +#define LIBRTE_EAL_COMMON_INCLUDE_RTE_PERSISTENT_MEM_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <exec-env/rte_persistent_mem.h> + +int rte_persistent_memory_init (void ); +int rte_persistent_memory_num_numa (void ); + +extern void * persistent_allocated_memory[RTE_MAX_NUMA_NODES ][RTE_EAL_PERSISTENT_MEM_COUNT ]; + +#ifdef __cplusplus +} +#endif + +#endif /* LIBRTE_EAL_COMMON_INCLUDE_RTE_PERSISTENT_MEM_H_ */
lib/librte_eal/linuxapp/eal/Makefile +6 -0
@@ -74,6 +74,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_alarm.c ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y) SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_ivshmem.c endif +ifeq ($(CONFIG_RTE_EAL_PERSISTENT_MEM),y) +SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_persistent_mem.c +endif # from common dir SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_memzone.c
@@ -112,6 +115,9 @@ CFLAGS_eal_thread.o += -Wno-return-type endif INC := rte_interrupts.h rte_kni_common.h rte_dom0_common.h +ifeq ($(CONFIG_RTE_EAL_PERSISTENT_MEM),y) +INC += rte_persistent_mem.h +endif SYMLINK-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP)-include/exec-env := \ $(addprefix include/exec-env/,$(INC))
lib/librte_eal/linuxapp/eal/eal.c +9 -0
@@ -77,6 +77,10 @@#include <malloc_heap.h> #include <rte_eth_ring.h> +#ifdef RTE_EAL_PERSISTENT_MEM +#include <rte_persistent_mem.h> +#endif +#include "eal_private.h" #include "eal_thread.h" #include "eal_internal_cfg.h"
@@ -759,6 +763,11 @@ rte_eal_init(int argc, char **argv)if (fctret <0 )exit (1 ); +#ifdef RTE_EAL_PERSISTENT_MEM +if (rte_persistent_memory_init () <0 ) +rte_panic ("Cannot init persistent memory\n" ); +#endif + if (internal_config.no_hugetlbfs == 0 && internal_config.process_type != RTE_PROC_SECONDARY && internal_config.xen_dom0_support == 0 &&
lib/librte_eal/linuxapp/eal/eal_persistent_mem.c new file +148 -0
148 lines not on this page · raw message
lib/librte_eal/linuxapp/eal/include/exec-env/rte_persistent_mem.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* rte_persistent_mem.h +* +* Created on: Jun 22, 2015 +* Author: leeopop +*/ + +#ifndef LIBRTE_EAL_LINUXAPP_EAL_INCLUDE_EXEC_ENV_RTE_PERSISTENT_MEM_H_ +#define LIBRTE_EAL_LINUXAPP_EAL_INCLUDE_EXEC_ENV_RTE_PERSISTENT_MEM_H_ + +#ifndef LIBRTE_EAL_COMMON_INCLUDE_RTE_PERSISTENT_MEM_H_ +#error "don't include this file directly, please include generic <rte_persistent_mem.h>" +#endif + +#endif /* LIBRTE_EAL_LINUXAPP_EAL_INCLUDE_EXEC_ENV_RTE_PERSISTENT_MEM_H_ */
lib/librte_eal/linuxapp/eal/rte_eal_version.map +2 -0
@@ -95,6 +95,8 @@ DPDK_2.0 { rte_xen_dom0_memory_attach; rte_xen_dom0_memory_init; test_mp_secondary; + rte_persistent_memory_init; + rte_persistent_memory_num_numa; local: *; };
lib/librte_persistent/Makefile new file +55 -0
55 lines not on this page · raw message
lib/librte_persistent/rte_persistent.c new file +198 -0
198 lines not on this page · raw message
lib/librte_persistent/rte_persistent.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* rte_persistent.h +* +* Created on: Jun 23, 2015 +* Author: leeopop +*/ + +#ifndef LIBRTE_PERSISTENT_RTE_PERSISTENT_H_ +#define LIBRTE_PERSISTENT_RTE_PERSISTENT_H_ + +#include <rte_common.h> +#include <rte_memory.h> + +int rte_persistent_init (void ); +void *rte_persistent_alloc (size_t size,int socket); +phys_addr_t rte_persistent_hw_addr (const void * addr); +void rte_persistent_free (void * addr); +size_t rte_persistent_mem_length (const void * addr); + +#endif /* LIBRTE_PERSISTENT_RTE_PERSISTENT_H_ */
lib/librte_persistent/rte_persistent_version.map new file +11 -0
@@ -0,0 +1,11 @@ +DPDK_2.0 { + global: + + rte_persistent_init; + rte_persistent_alloc; + rte_persistent_hw_addr; + rte_persistent_free; + rte_persistent_mem_length; + + local: *; +};
Signature · 1 line
2.1.4
Re: [PATCH 1/2] eal/persistent: new library to hold memory region after program exit
Quoted 9 lines · leeopop
Some NICs use host memory region as their scratch area.
When DPDK user applications terminate, all the memory regions are lost, re-initialized (memzone), which causes HW faults.
This libraray maintains shared memory regions that is persistent across multiple execution and termination of user level applications. It also manages physically contiguous memory regions.Signed-off-by leeopop <[email protected]>
Does dpdk accept anonymous signoffs?
DCO usually requires a real name.
Re: [PATCH 1/2] eal/persistent: new library to hold memory region after program exit
2015-07-06 17:34, Avi Kivity:
Quoted 8 lines · leeopop
Quoted 7 lines
Some NICs use host memory region as their scratch area.
When DPDK user applications terminate, all the memory regions are lost, re-initialized (memzone), which causes HW faults.
This libraray maintains shared memory regions that is persistent across multiple execution and termination of user level applications. It also manages physically contiguous memory regions.
Quoted 6 lines
Quoted 2 lines
Signed-off-by leeopop <[email protected]>Does dpdk accept anonymous signoffs?
DCO usually requires a real name.
Exact. We follow Linux guidelines for DCO:
http://dpdk.org/dev#send
Re: [PATCH 1/2] eal/persistent: new library to hold memory region after program exit
In reply to leeopopAm I right, this library is using Unix shared memory to get persistent storage. That is going to be slower and more worrying, the kernel makes no guarantees that virtual to physical mapping will not change.
There is also an ABI issue in this patch. You are introducing a new API here, so the symbol should go in a new 2.1 section
lib/librte_eal/linuxapp/eal/eal_persistent_mem.c line 55
Quoted 4 lines
lib/librte_eal/linuxapp/eal/eal_persistent_mem.c new file +4
-0+if ((len /RTE_PGSIZE_4K ) >1 ) + { + shmget_flag |=SHM_HUGETLB ; + }
Please follow kernel coding style. This is one of many examples that needs to be fixed before accepting.
ERROR: "foo* bar" should be "foo *bar"
#166: FILE: lib/librte_eal/common/include/rte_pci.h:210:
+ void* priv; /**< Private data. */
ERROR: "foo* bar" should be "foo *bar"
#195: FILE: lib/librte_eal/common/include/rte_persistent_mem.h:20:
+extern void* persistent_allocated_memory[RTE_MAX_NUMA_NODES][RTE_EAL_PERSISTENT_MEM_COUNT];
ERROR: "foo* bar" should be "foo *bar"
#302: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:44:
+static void* reserve_shared_zone(int subindex, uint32_t len, int socket_id)
ERROR: do not use C99 // comments
#307: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:49:
+ int shmget_flag = IPC_CREAT | SHM_R | SHM_W | IPC_EXCL; // | SHM_LOCKED;
WARNING: Missing a blank line after declarations
#310: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:52:
+ int err;
+ if((len / RTE_PGSIZE_4K) > 1)
ERROR: that open brace { should be on the previous line #310: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:52:
+ if((len / RTE_PGSIZE_4K) > 1)
+ {
ERROR: space required before the open parenthesis '(' #310: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:52:
+ if((len / RTE_PGSIZE_4K) > 1)
ERROR: "foo* bar" should be "foo *bar"
#316: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:58:
+ void* addr = 0;
WARNING: Missing a blank line after declarations
#318: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:60:
+ int clear = 1;
+ if(shmid < 0)
ERROR: that open brace { should be on the previous line #318: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:60:
+ if(shmid < 0)
+ {
ERROR: space required before the open parenthesis '(' #318: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:60:
+ if(shmid < 0)
ERROR: do not use C99 // comments
#320: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:62:
+ //Reuse existing
ERROR: that open brace { should be on the previous line #328: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:70:
+ if(socket_id != SOCKET_ID_ANY)
+ {
ERROR: space required before the open parenthesis '(' #328: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:70:
+ if(socket_id != SOCKET_ID_ANY)
ERROR: "foo * bar" should be "foo *bar"
#330: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:72:
+ struct bitmask * mask = numa_bitmask_alloc(RTE_MAX_NUMA_NODES);
WARNING: Missing a blank line after declarations
#331: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:73:
+ struct bitmask * mask = numa_bitmask_alloc(RTE_MAX_NUMA_NODES);
+ mask = numa_bitmask_clearall(mask);
ERROR: that open brace { should be on the previous line #336: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:78:
+ if(ret < 0)
+ {
ERROR: space required before the open parenthesis '(' #336: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:78:
+ if(ret < 0)
ERROR: that open brace { should be on the previous line #344: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:86:
+ if(clear)
+ {
ERROR: space required before the open parenthesis '(' #344: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:86:
+ if(clear)
WARNING: Missing a blank line after declarations
#350: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:92:
+ size_t size;
+ volatile uint8_t reader = 0; //this prevents from being optimized out
ERROR: do not use C99 // comments
#350: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:92:
+ volatile uint8_t reader = 0; //this prevents from being optimized out
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt #350: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:92:
+ volatile uint8_t reader = 0; //this prevents from being optimized out
ERROR: "(foo*)" should be "(foo *)"
#351: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:93:
+ volatile uint8_t* readp = (uint8_t*)addr;
ERROR: "foo* bar" should be "foo *bar"
#351: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:93:
+ volatile uint8_t* readp = (uint8_t*)addr;
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt #351: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:93:
+ volatile uint8_t* readp = (uint8_t*)addr;
WARNING: Missing a blank line after declarations
#352: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:94:
+ volatile uint8_t* readp = (uint8_t*)addr;
+ for(size = 0; size < len; size++)
ERROR: that open brace { should be on the previous line #352: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:94:
+ for(size = 0; size < len; size++)
+ {
ERROR: space required before the open parenthesis '(' #352: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:94:
+ for(size = 0; size < len; size++)
ERROR: "foo* bar" should be "foo *bar"
#364: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:106:
+void* persistent_allocated_memory[RTE_MAX_NUMA_NODES][SHM_COUNT];
ERROR: do not initialise statics to 0 or NULL
#366: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:108:
+static int numa_count = 0;
ERROR: do not use C99 // comments
#375: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:117:
+ assert(SHM_SIZE == RTE_PGSIZE_2M); //XXX considering only 2MB pages.
WARNING: Missing a blank line after declarations
#377: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:119:
+ int num_numa = numa_num_configured_nodes();
+ if(num_numa == 0)
ERROR: space required before the open parenthesis '(' #377: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:119:
+ if(num_numa == 0)
WARNING: Missing a blank line after declarations
#382: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:124:
+ int k;
+ for(node = 0; node < RTE_MAX_NUMA_NODES; node++)
ERROR: space required before the open parenthesis '(' #382: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:124:
+ for(node = 0; node < RTE_MAX_NUMA_NODES; node++)
ERROR: spaces required around that '=' (ctx:VxV)
#383: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:125:
+ for(k=0; k<SHM_COUNT; k++)
^
ERROR: spaces required around that '<' (ctx:VxV)
#383: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:125:
+ for(k=0; k<SHM_COUNT; k++)
^
ERROR: space required before the open parenthesis '(' #383: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:125:
+ for(k=0; k<SHM_COUNT; k++)
ERROR: that open brace { should be on the previous line #386: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:128:
+ for(node = 0; node < num_numa; node++)
+ {
ERROR: space required before the open parenthesis '(' #386: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:128:
+ for(node = 0; node < num_numa; node++)
WARNING: Missing a blank line after declarations
#389: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:131:
+ int cur_socket = num_numa > 1 ? node : SOCKET_ID_ANY;
+ for(k=0; k<SHM_COUNT/num_numa; k++)
ERROR: that open brace { should be on the previous line #389: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:131:
+ for(k=0; k<SHM_COUNT/num_numa; k++)
+ {
ERROR: spaces required around that '=' (ctx:VxV)
#389: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:131:
+ for(k=0; k<SHM_COUNT/num_numa; k++)
^
ERROR: spaces required around that '<' (ctx:VxV)
#389: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:131:
+ for(k=0; k<SHM_COUNT/num_numa; k++)
^
ERROR: space required before the open parenthesis '(' #389: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:131:
+ for(k=0; k<SHM_COUNT/num_numa; k++)
WARNING: Missing a blank line after declarations
#392: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:134:
+ int zone_index = ((SHM_COUNT/num_numa)*node + k);
+ persistent_allocated_memory[node][k] = reserve_shared_zone(zone_index,
ERROR: that open brace { should be on the previous line #394: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:136:
+ if(persistent_allocated_memory[node][k] == 0)
+ {
ERROR: space required before the open parenthesis '(' #394: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:136:
+ if(persistent_allocated_memory[node][k] == 0)
WARNING: quoted string split across lines
#397: FILE: lib/librte_eal/linuxapp/eal/eal_persistent_mem.c:139:
+ RTE_LOG(ERR, EAL, "Cannot allocate shared zone index %d."
+ "node: %d, local index: %d\n", zone_index, node, k);
ERROR: do not initialise statics to 0 or NULL #533: FILE: lib/librte_persistent/rte_persistent.c:26:
+static struct rte_hash* allocated_segments = 0;
ERROR: "foo* bar" should be "foo *bar"
#533: FILE: lib/librte_persistent/rte_persistent.c:26:
+static struct rte_hash* allocated_segments = 0;
ERROR: open brace '{' following struct go on the same line #536: FILE: lib/librte_persistent/rte_persistent.c:29:
+struct alloc_info
+{
ERROR: do not use C99 // comments
#537: FILE: lib/librte_persistent/rte_persistent.c:30:
+ void* addr; //0 if not allocated
ERROR: "foo* bar" should be "foo *bar"
#537: FILE: lib/librte_persistent/rte_persistent.c:30:
+ void* addr; //0 if not allocated
ERROR: do not initialise statics to 0 or NULL #550: FILE: lib/librte_persistent/rte_persistent.c:43:
+static int __initialized = 0;
ERROR: that open brace { should be on the previous line #554: FILE: lib/librte_persistent/rte_persistent.c:47:
+ if(!__initialized)
+ {
ERROR: space required before the open parenthesis '(' #554: FILE: lib/librte_persistent/rte_persistent.c:47:
+ if(!__initialized)
ERROR: that open brace { should be on the previous line #557: FILE: lib/librte_persistent/rte_persistent.c:50:
+ struct rte_hash_parameters hash_param =
+ {
ERROR: "(foo*)" should be "(foo *)"
#561: FILE: lib/librte_persistent/rte_persistent.c:54:
+ .key_len = sizeof(void*),
ERROR: do not use C99 // comments
#562: FILE: lib/librte_persistent/rte_persistent.c:55:
+ .hash_func = 0, //DEFAULT_HASH_FUNC,
WARNING: Missing a blank line after declarations #571: FILE: lib/librte_persistent/rte_persistent.c:64:
+ int k;
+ for(k=0; k<SEGMENT_COUNT; k++)
ERROR: spaces required around that '=' (ctx:VxV) #571: FILE: lib/librte_persistent/rte_persistent.c:64:
+ for(k=0; k<SEGMENT_COUNT; k++)
^
ERROR: spaces required around that '<' (ctx:VxV) #571: FILE: lib/librte_persistent/rte_persistent.c:64:
+ for(k=0; k<SEGMENT_COUNT; k++)
^
ERROR: space required before the open parenthesis '(' #571: FILE: lib/librte_persistent/rte_persistent.c:64:
+ for(k=0; k<SEGMENT_COUNT; k++)
ERROR: "foo* bar" should be "foo *bar"
#588: FILE: lib/librte_persistent/rte_persistent.c:81:
+void* rte_persistent_alloc(size_t size, int socket)
WARNING: Missing a blank line after declarations #591: FILE: lib/librte_persistent/rte_persistent.c:84:
+ int num_numa = rte_persistent_memory_num_numa();
+ if(socket == SOCKET_ID_ANY)
ERROR: that open brace { should be on the previous line #591: FILE: lib/librte_persistent/rte_persistent.c:84:
+ if(socket == SOCKET_ID_ANY)
+ {
ERROR: space required before the open parenthesis '(' #591: FILE: lib/librte_persistent/rte_persistent.c:84:
+ if(socket == SOCKET_ID_ANY)
WARNING: Missing a blank line after declarations #600: FILE: lib/librte_persistent/rte_persistent.c:93:
+ int num_page = (size / ALLOC_UNIT);
+ if(size % ALLOC_UNIT)
ERROR: space required before the open parenthesis '(' #600: FILE: lib/librte_persistent/rte_persistent.c:93:
+ if(size % ALLOC_UNIT)
WARNING: Missing a blank line after declarations #605: FILE: lib/librte_persistent/rte_persistent.c:98:
+ int k;
+ for(k=0; k<num_page; k++)
ERROR: that open brace { should be on the previous line #605: FILE: lib/librte_persistent/rte_persistent.c:98:
+ for(k=0; k<num_page; k++)
+ {
ERROR: spaces required around that '=' (ctx:VxV) #605: FILE: lib/librte_persistent/rte_persistent.c:98:
+ for(k=0; k<num_page; k++)
^
ERROR: spaces required around that '<' (ctx:VxV) #605: FILE: lib/librte_persistent/rte_persistent.c:98:
+ for(k=0; k<num_page; k++)
^
ERROR: space required before the open parenthesis '(' #605: FILE: lib/librte_persistent/rte_persistent.c:98:
+ for(k=0; k<num_page; k++)
ERROR: "foo* bar" should be "foo *bar"
#611: FILE: lib/librte_persistent/rte_persistent.c:104:
+ void* found_buffer = 0;
WARNING: Missing a blank line after declarations #612: FILE: lib/librte_persistent/rte_persistent.c:105:
+ void* found_buffer = 0;
+ for(k=l_start; k<(l_start + l_range); k++)
ERROR: that open brace { should be on the previous line #612: FILE: lib/librte_persistent/rte_persistent.c:105:
+ for(k=l_start; k<(l_start + l_range); k++)
+ {
ERROR: spaces required around that '=' (ctx:VxV) #612: FILE: lib/librte_persistent/rte_persistent.c:105:
+ for(k=l_start; k<(l_start + l_range); k++)
^
ERROR: spaces required around that '<' (ctx:VxV) #612: FILE: lib/librte_persistent/rte_persistent.c:105:
+ for(k=l_start; k<(l_start + l_range); k++)
^
ERROR: space required before the open parenthesis '(' #612: FILE: lib/librte_persistent/rte_persistent.c:105:
+ for(k=l_start; k<(l_start + l_range); k++)
ERROR: "foo* bar" should be "foo *bar"
#614: FILE: lib/librte_persistent/rte_persistent.c:107:
+ char* start = alloc_array[k];
ERROR: "foo* bar" should be "foo *bar"
#615: FILE: lib/librte_persistent/rte_persistent.c:108:
+ char* found = strstr(start, find_str);
ERROR: that open brace { should be on the previous line #617: FILE: lib/librte_persistent/rte_persistent.c:110:
+ if(found)
+ {
ERROR: space required before the open parenthesis '(' #617: FILE: lib/librte_persistent/rte_persistent.c:110:
+ if(found)
WARNING: Missing a blank line after declarations #620: FILE: lib/librte_persistent/rte_persistent.c:113:
+ int offset = found - start;
+ found_buffer = persistent_allocated_memory[socket][k];
WARNING: Missing a blank line after declarations #624: FILE: lib/librte_persistent/rte_persistent.c:117:
+ int j;
+ for(j=0; j<num_page; j++)
ERROR: that open brace { should be on the previous line #624: FILE: lib/librte_persistent/rte_persistent.c:117:
+ for(j=0; j<num_page; j++)
+ {
ERROR: spaces required around that '=' (ctx:VxV) #624: FILE: lib/librte_persistent/rte_persistent.c:117:
+ for(j=0; j<num_page; j++)
^
ERROR: spaces required around that '<' (ctx:VxV) #624: FILE: lib/librte_persistent/rte_persistent.c:117:
+ for(j=0; j<num_page; j++)
^
ERROR: space required before the open parenthesis '(' #624: FILE: lib/librte_persistent/rte_persistent.c:117:
+ for(j=0; j<num_page; j++)
WARNING: Missing a blank line after declarations #629: FILE: lib/librte_persistent/rte_persistent.c:122:
+ int index = rte_hash_add_key(allocated_segments, &found_buffer);
+ assert(index >= 0);
ERROR: "foo* bar" should be "foo *bar"
#639: FILE: lib/librte_persistent/rte_persistent.c:132:
+ void* user = found_buffer;
WARNING: Missing a blank line after declarations #642: FILE: lib/librte_persistent/rte_persistent.c:135:
+ size_t diff = RTE_MAX((uint64_t)user, hw) - RTE_MIN((uint64_t)user, hw);
+ for(j = 0; j < num_page; j++)
ERROR: that open brace { should be on the previous line #642: FILE: lib/librte_persistent/rte_persistent.c:135:
+ for(j = 0; j < num_page; j++)
+ {
ERROR: space required before the open parenthesis '(' #642: FILE: lib/librte_persistent/rte_persistent.c:135:
+ for(j = 0; j < num_page; j++)
ERROR: "(foo*)" should be "(foo *)"
#645: FILE: lib/librte_persistent/rte_persistent.c:138:
+ void* cur_user = ((char*)user + shift);
ERROR: "foo* bar" should be "foo *bar"
#645: FILE: lib/librte_persistent/rte_persistent.c:138:
+ void* cur_user = ((char*)user + shift);
WARNING: line over 120 characters
#647: FILE: lib/librte_persistent/rte_persistent.c:140:
+ size_t cur_diff = RTE_MAX((uint64_t)cur_user, cur_hw) - RTE_MIN((uint64_t)cur_user, cur_hw);
ERROR: that open brace { should be on the previous line #649: FILE: lib/librte_persistent/rte_persistent.c:142:
+ if(cur_diff != diff)
+ {
ERROR: space required before the open parenthesis '(' #649: FILE: lib/librte_persistent/rte_persistent.c:142:
+ if(cur_diff != diff)
WARNING: line over 120 characters
#651: FILE: lib/librte_persistent/rte_persistent.c:144:
+ RTE_LOG(ERR, EAL, "Hugepage is not contiguous, curdiff: %lX, expected: %lX\n", cur_diff, diff);
ERROR: space required before the open parenthesis '(' #658: FILE: lib/librte_persistent/rte_persistent.c:151:
+ if(!found_buffer)
ERROR: "foo* bar" should be "foo *bar"
#663: FILE: lib/librte_persistent/rte_persistent.c:156:
+phys_addr_t rte_persistent_hw_addr(const void* addr)
ERROR: space required before the open parenthesis '(' #665: FILE: lib/librte_persistent/rte_persistent.c:158:
+ if(addr == 0)
ERROR: "(foo*)" should be "(foo *)"
#667: FILE: lib/librte_persistent/rte_persistent.c:160:
+ int index = rte_hash_lookup(allocated_segments, (const void*)&addr);
WARNING: Missing a blank line after declarations #668: FILE: lib/librte_persistent/rte_persistent.c:161:
+ int index = rte_hash_lookup(allocated_segments, (const void*)&addr);
+ assert(index >= 0);
ERROR: "foo* bar" should be "foo *bar"
#674: FILE: lib/librte_persistent/rte_persistent.c:167:
+size_t rte_persistent_mem_length(const void* addr)
ERROR: "(foo*)" should be "(foo *)"
#676: FILE: lib/librte_persistent/rte_persistent.c:169:
+ int index = rte_hash_lookup(allocated_segments, (const void*)&addr);
WARNING: Missing a blank line after declarations #677: FILE: lib/librte_persistent/rte_persistent.c:170:
+ int index = rte_hash_lookup(allocated_segments, (const void*)&addr);
+ assert(index >= 0);
ERROR: "foo* bar" should be "foo *bar"
#683: FILE: lib/librte_persistent/rte_persistent.c:176:
+void rte_persistent_free(void* addr)
ERROR: "(foo*)" should be "(foo *)"
#685: FILE: lib/librte_persistent/rte_persistent.c:178:
+ int index = rte_hash_lookup(allocated_segments, (const void*)&addr);
WARNING: Missing a blank line after declarations #686: FILE: lib/librte_persistent/rte_persistent.c:179:
+ int index = rte_hash_lookup(allocated_segments, (const void*)&addr);
+ assert(index >= 0);
ERROR: "(foo*)" should be "(foo *)"
#700: FILE: lib/librte_persistent/rte_persistent.c:193:
+ rte_hash_del_key(allocated_segments, (const void*)&addr);
WARNING: Missing a blank line after declarations #703: FILE: lib/librte_persistent/rte_persistent.c:196:
+ int k;
+ for(k=0; k<len; k++)
ERROR: spaces required around that '=' (ctx:VxV) #703: FILE: lib/librte_persistent/rte_persistent.c:196:
+ for(k=0; k<len; k++)
^
ERROR: spaces required around that '<' (ctx:VxV) #703: FILE: lib/librte_persistent/rte_persistent.c:196:
+ for(k=0; k<len; k++)
^
ERROR: space required before the open parenthesis '(' #703: FILE: lib/librte_persistent/rte_persistent.c:196:
+ for(k=0; k<len; k++)
ERROR: "foo* bar" should be "foo *bar"
#726: FILE: lib/librte_persistent/rte_persistent.h:15:
+void* rte_persistent_alloc(size_t size, int socket);
ERROR: "foo* bar" should be "foo *bar"
#727: FILE: lib/librte_persistent/rte_persistent.h:16:
+phys_addr_t rte_persistent_hw_addr(const void* addr);
ERROR: "foo* bar" should be "foo *bar"
#728: FILE: lib/librte_persistent/rte_persistent.h:17:
+void rte_persistent_free(void* addr);
ERROR: "foo* bar" should be "foo *bar"
#729: FILE: lib/librte_persistent/rte_persistent.h:18:
+size_t rte_persistent_mem_length(const void* addr);
total: 96 errors, 28 warnings, 573 lines checked
/tmp/persist.patch has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
PATCH 2/2 mlnx_uio: new poll mode driver
In reply to leeopopThis PMD offers direct access to Mellanox ConnectX-3 NICs instead of using IB Verbs like mlx4 driver.
Currrently it supports a limited set of features; it supports only physical functions (PF) and basic RX/TX functionalities such as RSS and scatter-gather I/O of mbufs.
We are working on the missing features such as virtual functions, VLAN stripping, support for mlx5 NICs, and etc.
We enable this PMD by default, as it only relies on the new eal/persistent library without external dependencies.
--- config/common_linuxapp | 10 + drivers/net/Makefile | 1 + drivers/net/mlnx_uio/.gitignore | 1 + drivers/net/mlnx_uio/Makefile | 139 + drivers/net/mlnx_uio/convert.py | 50 + drivers/net/mlnx_uio/include/autoconf.h | 10 + drivers/net/mlnx_uio/include/bitmap.h | 314 + drivers/net/mlnx_uio/include/bitops.h | 558 ++ drivers/net/mlnx_uio/include/dcbnl.h | 751 +++ drivers/net/mlnx_uio/include/etherdevice.h | 189 + drivers/net/mlnx_uio/include/ib_mad.h | 664 ++ drivers/net/mlnx_uio/include/ib_smi.h | 128 + drivers/net/mlnx_uio/include/ib_verbs.h | 806 +++ drivers/net/mlnx_uio/include/inline_functions.h | 307 + drivers/net/mlnx_uio/include/kcompat.h | 36 + drivers/net/mlnx_uio/include/kmod.h | 768 +++ drivers/net/mlnx_uio/include/list.h | 780 +++ drivers/net/mlnx_uio/include/log2.h | 229 + drivers/net/mlnx_uio/include/mlx4_dpdk.h | 17 + drivers/net/mlnx_uio/include/mlx4_uio.h | 24 + drivers/net/mlnx_uio/include/mlx4_uio_helper.h | 800 +++ drivers/net/mlnx_uio/include/module.h | 12 + drivers/net/mlnx_uio/include/netdev_features.h | 166 + drivers/net/mlnx_uio/include/post_kmod.h | 13 + drivers/net/mlnx_uio/include/radix-tree.h | 48 + drivers/net/mlnx_uio/include/rbtree.h | 105 + drivers/net/mlnx_uio/include/rbtree_augmented.h | 230 + drivers/net/mlnx_uio/kernel/LICENSE | 339 + drivers/net/mlnx_uio/kernel/bitmap.c | 831 +++ drivers/net/mlnx_uio/kernel/kcompat.c | 96 + drivers/net/mlnx_uio/kernel/radix-tree.c | 78 + drivers/net/mlnx_uio/kernel/rbtree.c | 561 ++ drivers/net/mlnx_uio/mlnx/include/mlx4/cmd.h | 309 + drivers/net/mlnx_uio/mlnx/include/mlx4/cq.h | 195 + drivers/net/mlnx_uio/mlnx/include/mlx4/device.h | 1744 +++++ drivers/net/mlnx_uio/mlnx/include/mlx4/doorbell.h | 90 + drivers/net/mlnx_uio/mlnx/include/mlx4/driver.h | 175 + drivers/net/mlnx_uio/mlnx/include/mlx4/qp.h | 540 ++ drivers/net/mlnx_uio/mlnx/include/mlx4/srq.h | 50 + drivers/net/mlnx_uio/mlnx/include/mlx5/cmd.h | 56 + drivers/net/mlnx_uio/mlnx/include/mlx5/cq.h | 182 + drivers/net/mlnx_uio/mlnx/include/mlx5/device.h | 1204 ++++ drivers/net/mlnx_uio/mlnx/include/mlx5/doorbell.h | 85 + drivers/net/mlnx_uio/mlnx/include/mlx5/driver.h | 1063 +++ .../net/mlnx_uio/mlnx/include/mlx5/flow_table.h | 59 + drivers/net/mlnx_uio/mlnx/include/mlx5/mlx5_ifc.h | 6892 ++++++++++++++++++++ drivers/net/mlnx_uio/mlnx/include/mlx5/qp.h | 804 +++ drivers/net/mlnx_uio/mlnx/include/mlx5/srq.h | 46 + drivers/net/mlnx_uio/mlnx/include/mlx5/vport.h | 52 + drivers/net/mlnx_uio/mlnx/mlx4/Kconfig | 46 + drivers/net/mlnx_uio/mlnx/mlx4/Makefile | 19 + drivers/net/mlnx_uio/mlnx/mlx4/alloc.c | 872 +++ drivers/net/mlnx_uio/mlnx/mlx4/catas.c | 350 + drivers/net/mlnx_uio/mlnx/mlx4/cmd.c | 3456 ++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/cq.c | 443 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_clock.c | 330 + drivers/net/mlnx_uio/mlnx/mlx4/en_cq.c | 257 + drivers/net/mlnx_uio/mlnx/mlx4/en_dcb_nl.c | 613 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_ethtool.c | 2582 ++++++++ drivers/net/mlnx_uio/mlnx/mlx4/en_main.c | 493 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_netdev.c | 3786 +++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/en_port.c | 493 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_port.h | 593 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_resources.c | 184 + drivers/net/mlnx_uio/mlnx/mlx4/en_rx.c | 1565 +++++ drivers/net/mlnx_uio/mlnx/mlx4/en_rx_uio.c | 187 + drivers/net/mlnx_uio/mlnx/mlx4/en_selftest.c | 194 + drivers/net/mlnx_uio/mlnx/mlx4/en_sysfs.c | 623 ++ drivers/net/mlnx_uio/mlnx/mlx4/en_tx.c | 1143 ++++ drivers/net/mlnx_uio/mlnx/mlx4/en_tx_uio.c | 47 + drivers/net/mlnx_uio/mlnx/mlx4/eq.c | 1777 +++++ drivers/net/mlnx_uio/mlnx/mlx4/fw.c | 3005 +++++++++ drivers/net/mlnx_uio/mlnx/mlx4/fw.h | 270 + drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.c | 292 + drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.h | 150 + drivers/net/mlnx_uio/mlnx/mlx4/icm.c | 522 ++ drivers/net/mlnx_uio/mlnx/mlx4/icm.h | 133 + drivers/net/mlnx_uio/mlnx/mlx4/intf.c | 246 + drivers/net/mlnx_uio/mlnx/mlx4/main.c | 5485 ++++++++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/main.c.orig | 5335 +++++++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/mcg.c | 1665 +++++ drivers/net/mlnx_uio/mlnx/mlx4/mlx4.h | 1514 +++++ drivers/net/mlnx_uio/mlnx/mlx4/mlx4_en.h | 1188 ++++ drivers/net/mlnx_uio/mlnx/mlx4/mlx4_stats.h | 153 + drivers/net/mlnx_uio/mlnx/mlx4/mr.c | 1178 ++++ drivers/net/mlnx_uio/mlnx/mlx4/pd.c | 310 + drivers/net/mlnx_uio/mlnx/mlx4/port.c | 1636 +++++ drivers/net/mlnx_uio/mlnx/mlx4/profile.c | 259 + drivers/net/mlnx_uio/mlnx/mlx4/qp.c | 956 +++ drivers/net/mlnx_uio/mlnx/mlx4/reset.c | 202 + drivers/net/mlnx_uio/mlnx/mlx4/resource_tracker.c | 5052 ++++++++++++++ drivers/net/mlnx_uio/mlnx/mlx4/sense.c | 153 + drivers/net/mlnx_uio/mlnx/mlx4/srq.c | 314 + drivers/net/mlnx_uio/mlnx/mlx5/core/Kconfig | 8 + drivers/net/mlnx_uio/mlnx/mlx5/core/Makefile | 9 + drivers/net/mlnx_uio/mlnx/mlx5/core/alloc.c | 273 + drivers/net/mlnx_uio/mlnx/mlx5/core/cmd.c | 2069 ++++++ drivers/net/mlnx_uio/mlnx/mlx5/core/cq.c | 236 + drivers/net/mlnx_uio/mlnx/mlx5/core/debugfs.c | 718 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/en.h | 695 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_debugfs.c | 115 + drivers/net/mlnx_uio/mlnx/mlx5/core/en_ethtool.c | 816 +++ .../net/mlnx_uio/mlnx/mlx5/core/en_flow_table.c | 1014 +++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_main.c | 2265 +++++++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_rx.c | 310 + drivers/net/mlnx_uio/mlnx/mlx5/core/en_tx.c | 392 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/en_txrx.c | 118 + drivers/net/mlnx_uio/mlnx/mlx5/core/eq.c | 566 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/flow_table.c | 422 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/fw.c | 199 + drivers/net/mlnx_uio/mlnx/mlx5/core/health.c | 229 + drivers/net/mlnx_uio/mlnx/mlx5/core/mad.c | 78 + drivers/net/mlnx_uio/mlnx/mlx5/core/main.c | 1583 +++++ drivers/net/mlnx_uio/mlnx/mlx5/core/mcg.c | 105 + drivers/net/mlnx_uio/mlnx/mlx5/core/mlx5_core.h | 105 + drivers/net/mlnx_uio/mlnx/mlx5/core/mr.c | 251 + drivers/net/mlnx_uio/mlnx/mlx5/core/pagealloc.c | 533 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/params.c | 198 + drivers/net/mlnx_uio/mlnx/mlx5/core/pd.c | 73 + drivers/net/mlnx_uio/mlnx/mlx5/core/port.c | 869 +++ drivers/net/mlnx_uio/mlnx/mlx5/core/qp.c | 639 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/sriov.c | 525 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/srq.c | 524 ++ drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.c | 361 + drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.h | 68 + drivers/net/mlnx_uio/mlnx/mlx5/core/uar.c | 235 + drivers/net/mlnx_uio/mlnx/mlx5/core/vport.c | 216 + drivers/net/mlnx_uio/mlnx/mlx5/core/wq.c | 195 + drivers/net/mlnx_uio/mlnx/mlx5/core/wq.h | 177 + drivers/net/mlnx_uio/mlx4_en_special.h | 21 + drivers/net/mlnx_uio/mlx4_uio.c | 1026 +++ drivers/net/mlnx_uio/prepare.py | 28 + drivers/net/mlnx_uio/rte_pmd_mlnx_uio_version.map | 4 + mk/rte.app.mk | 6 + 134 files changed, 90952 insertions(+) create mode 100644 drivers/net/mlnx_uio/.gitignore create mode 100644 drivers/net/mlnx_uio/Makefile create mode 100755 drivers/net/mlnx_uio/convert.py create mode 100644 drivers/net/mlnx_uio/include/autoconf.h create mode 100644 drivers/net/mlnx_uio/include/bitmap.h create mode 100644 drivers/net/mlnx_uio/include/bitops.h create mode 100644 drivers/net/mlnx_uio/include/dcbnl.h create mode 100644 drivers/net/mlnx_uio/include/etherdevice.h create mode 100644 drivers/net/mlnx_uio/include/ib_mad.h create mode 100644 drivers/net/mlnx_uio/include/ib_smi.h create mode 100644 drivers/net/mlnx_uio/include/ib_verbs.h create mode 100644 drivers/net/mlnx_uio/include/inline_functions.h create mode 100644 drivers/net/mlnx_uio/include/kcompat.h create mode 100644 drivers/net/mlnx_uio/include/kmod.h create mode 100644 drivers/net/mlnx_uio/include/list.h create mode 100644 drivers/net/mlnx_uio/include/log2.h create mode 100644 drivers/net/mlnx_uio/include/mlx4_dpdk.h create mode 100644 drivers/net/mlnx_uio/include/mlx4_uio.h create mode 100644 drivers/net/mlnx_uio/include/mlx4_uio_helper.h create mode 100644 drivers/net/mlnx_uio/include/module.h create mode 100644 drivers/net/mlnx_uio/include/netdev_features.h create mode 100644 drivers/net/mlnx_uio/include/post_kmod.h create mode 100644 drivers/net/mlnx_uio/include/radix-tree.h create mode 100644 drivers/net/mlnx_uio/include/rbtree.h create mode 100644 drivers/net/mlnx_uio/include/rbtree_augmented.h create mode 100644 drivers/net/mlnx_uio/kernel/LICENSE create mode 100644 drivers/net/mlnx_uio/kernel/bitmap.c create mode 100644 drivers/net/mlnx_uio/kernel/kcompat.c create mode 100644 drivers/net/mlnx_uio/kernel/radix-tree.c create mode 100644 drivers/net/mlnx_uio/kernel/rbtree.c create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/cmd.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/cq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/device.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/doorbell.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/driver.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/qp.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx4/srq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/cmd.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/cq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/device.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/doorbell.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/driver.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/flow_table.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/mlx5_ifc.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/qp.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/srq.h create mode 100644 drivers/net/mlnx_uio/mlnx/include/mlx5/vport.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/Kconfig create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/Makefile create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/alloc.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/catas.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/cmd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/cq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_clock.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_cq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_dcb_nl.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_ethtool.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_netdev.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_port.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_port.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_resources.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_rx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_rx_uio.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_selftest.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_sysfs.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_tx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/en_tx_uio.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/eq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/icm.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/icm.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/intf.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/main.c.orig create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mcg.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mlx4.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mlx4_en.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mlx4_stats.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/mr.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/pd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/port.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/profile.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/qp.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/reset.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/resource_tracker.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/sense.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx4/srq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/Kconfig create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/Makefile create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/alloc.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/cmd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/cq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/debugfs.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_debugfs.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_ethtool.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_flow_table.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_rx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_tx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/en_txrx.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/eq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/flow_table.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/fw.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/health.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mad.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/main.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mcg.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mlx5_core.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/mr.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/pagealloc.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/params.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/pd.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/port.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/qp.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/sriov.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/srq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.h create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/uar.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/vport.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/wq.c create mode 100644 drivers/net/mlnx_uio/mlnx/mlx5/core/wq.h create mode 100644 drivers/net/mlnx_uio/mlx4_en_special.h create mode 100644 drivers/net/mlnx_uio/mlx4_uio.c create mode 100755 drivers/net/mlnx_uio/prepare.py create mode 100644 drivers/net/mlnx_uio/rte_pmd_mlnx_uio_version.map
config/common_linuxapp +10 -0
@@ -106,6 +106,12 @@ CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n CONFIG_RTE_EAL_IGB_UIO=y CONFIG_RTE_EAL_VFIO=y +#persistent memory +CONFIG_RTE_EAL_PERSISTENT_MEM=y +CONFIG_RTE_EAL_PERSISTENT_MEM_UNIT=2097152 +CONFIG_RTE_EAL_PERSISTENT_MEM_COUNT=256 +CONFIG_RTE_LIBRTE_PERSISTENT=y + # # Special configurations in PCI Config Space for high performance #
@@ -212,7 +218,11 @@ CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE=0 CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1 +# Compile UIO based Mellanox ConnectX-3 (MLX4) PMD # +CONFIG_RTE_LIBRTE_MLNX_UIO_PMD=y +CONFIG_RTE_LIBRTE_MLNX_UIO_DEBUG=y + # Compile burst-oriented Chelsio Terminator 10GbE/40GbE (CXGBE) PMD # CONFIG_RTE_LIBRTE_CXGBE_PMD=y
drivers/net/Makefile +1 -0
@@ -40,6 +40,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 +DIRS-$(CONFIG_RTE_LIBRTE_MLNX_UIO_PMD) += mlnx_uio DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring
drivers/net/mlnx_uio/.gitignore new file +1 -0
@@ -0,0 +1 @@ +driver_sources.mk
drivers/net/mlnx_uio/Makefile new file +139 -0
139 lines not on this page · raw message
drivers/net/mlnx_uio/convert.py new file +50 -0
50 lines not on this page · raw message
drivers/net/mlnx_uio/include/autoconf.h new file +10 -0
@@ -0,0 +1,10 @@ +#undef CONFIG_MLX4_CORE +#define CONFIG_MLX4_CORE 1 +#undef CONFIG_MLX4_EN +#define CONFIG_MLX4_EN 1 +#undef CONFIG_MLX4_EN_DCB +#define CONFIG_MLX4_EN_DCB 1 +#undef CONFIG_MLX5_CORE +#define CONFIG_MLX5_CORE 1 + +
drivers/net/mlnx_uio/include/bitmap.h new file +314 -0
314 lines not on this page · raw message
drivers/net/mlnx_uio/include/bitops.h new file +558 -0
558 lines not on this page · raw message
drivers/net/mlnx_uio/include/dcbnl.h new file +751 -0
751 lines not on this page · raw message
drivers/net/mlnx_uio/include/etherdevice.h new file +189 -0
189 lines not on this page · raw message
drivers/net/mlnx_uio/include/ib_mad.h new file +664 -0
664 lines not on this page · raw message
drivers/net/mlnx_uio/include/ib_smi.h new file +128 -0
128 lines not on this page · raw message
drivers/net/mlnx_uio/include/ib_verbs.h new file +806 -0
165 lines not on this page · raw message
drivers/net/mlnx_uio/include/inline_functions.h new file +307 -0
307 lines not on this page · raw message
drivers/net/mlnx_uio/include/kcompat.h new file +36 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/include/kmod.h new file +768 -0
768 lines not on this page · raw message
drivers/net/mlnx_uio/include/list.h new file +780 -0
780 lines not on this page · raw message
drivers/net/mlnx_uio/include/log2.h new file +229 -0
229 lines not on this page · raw message
drivers/net/mlnx_uio/include/mlx4_dpdk.h new file +17 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/include/mlx4_uio.h new file +24 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/include/mlx4_uio_helper.h new file +800 -0
800 lines not on this page · raw message
drivers/net/mlnx_uio/include/module.h new file +12 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/include/netdev_features.h new file +166 -0
166 lines not on this page · raw message
drivers/net/mlnx_uio/include/post_kmod.h new file +13 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/include/radix-tree.h new file +48 -0
48 lines not on this page · raw message
drivers/net/mlnx_uio/include/rbtree.h new file +105 -0
105 lines not on this page · raw message
drivers/net/mlnx_uio/include/rbtree_augmented.h new file +230 -0
230 lines not on this page · raw message
drivers/net/mlnx_uio/kernel/LICENSE new file +339 -0
339 lines not on this page · raw message
drivers/net/mlnx_uio/kernel/bitmap.c new file +831 -0
831 lines not on this page · raw message
drivers/net/mlnx_uio/kernel/kcompat.c new file +96 -0
96 lines not on this page · raw message
drivers/net/mlnx_uio/kernel/radix-tree.c new file +78 -0
78 lines not on this page · raw message
drivers/net/mlnx_uio/kernel/rbtree.c new file +561 -0
561 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx4/cmd.h new file +309 -0
309 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx4/cq.h new file +195 -0
195 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx4/device.h new file +1744 -0
1,744 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx4/doorbell.h new file +90 -0
90 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx4/driver.h new file +175 -0
175 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx4/qp.h new file +540 -0
540 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx4/srq.h new file +50 -0
50 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/cmd.h new file +56 -0
56 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/cq.h new file +182 -0
182 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/device.h new file +1204 -0
1,204 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/doorbell.h new file +85 -0
85 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/driver.h new file +1063 -0
1,063 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/flow_table.h new file +59 -0
59 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/mlx5_ifc.h new file +6892 -0
6,892 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/qp.h new file +804 -0
804 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/srq.h new file +46 -0
46 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/include/mlx5/vport.h new file +52 -0
52 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/Kconfig new file +46 -0
46 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/Makefile new file +19 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/mlnx/mlx4/alloc.c new file +872 -0
872 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/catas.c new file +350 -0
350 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/cmd.c new file +3456 -0
3,456 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/cq.c new file +443 -0
443 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_clock.c new file +330 -0
330 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_cq.c new file +257 -0
257 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_dcb_nl.c new file +613 -0
613 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_ethtool.c new file +2582 -0
2,582 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_main.c new file +493 -0
493 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_netdev.c new file +3786 -0
3,786 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_port.c new file +493 -0
493 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_port.h new file +593 -0
593 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_resources.c new file +184 -0
184 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_rx.c new file +1565 -0
1,565 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_rx_uio.c new file +187 -0
187 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_selftest.c new file +194 -0
194 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_sysfs.c new file +623 -0
623 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_tx.c new file +1143 -0
1,143 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/en_tx_uio.c new file +47 -0
47 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/eq.c new file +1777 -0
1,777 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/fw.c new file +3005 -0
3,005 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/fw.h new file +270 -0
270 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.c new file +292 -0
292 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/fw_qos.h new file +150 -0
150 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/icm.c new file +522 -0
522 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/icm.h new file +133 -0
133 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/intf.c new file +246 -0
246 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/main.c new file +5485 -0
5,485 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/main.c.orig new file +5335 -0
5,335 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/mcg.c new file +1665 -0
1,665 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/mlx4.h new file +1514 -0
1,514 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/mlx4_en.h new file +1188 -0
1,188 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/mlx4_stats.h new file +153 -0
153 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/mr.c new file +1178 -0
1,178 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/pd.c new file +310 -0
310 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/port.c new file +1636 -0
1,636 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/profile.c new file +259 -0
259 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/qp.c new file +956 -0
956 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/reset.c new file +202 -0
202 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/resource_tracker.c new file +5052 -0
5,052 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/sense.c new file +153 -0
153 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx4/srq.c new file +314 -0
314 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/Kconfig new file +8 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/mlnx/mlx5/core/Makefile new file +9 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/mlnx/mlx5/core/alloc.c new file +273 -0
273 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/cmd.c new file +2069 -0
2,069 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/cq.c new file +236 -0
236 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/debugfs.c new file +718 -0
718 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en.h new file +695 -0
695 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en_debugfs.c new file +115 -0
115 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en_ethtool.c new file +816 -0
816 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en_flow_table.c new file +1014 -0
1,014 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en_main.c new file +2265 -0
2,265 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en_rx.c new file +310 -0
310 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en_tx.c new file +392 -0
392 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/en_txrx.c new file +118 -0
118 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/eq.c new file +566 -0
566 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/flow_table.c new file +422 -0
422 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/fw.c new file +199 -0
199 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/health.c new file +229 -0
229 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/mad.c new file +78 -0
78 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/main.c new file +1583 -0
1,583 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/mcg.c new file +105 -0
105 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/mlx5_core.h new file +105 -0
105 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/mr.c new file +251 -0
251 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/pagealloc.c new file +533 -0
533 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/params.c new file +198 -0
198 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/pd.c new file +73 -0
73 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/port.c new file +869 -0
869 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/qp.c new file +639 -0
639 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/sriov.c new file +525 -0
525 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/srq.c new file +524 -0
524 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.c new file +361 -0
361 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/transobj.h new file +68 -0
68 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/uar.c new file +235 -0
235 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/vport.c new file +216 -0
216 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/wq.c new file +195 -0
195 lines not on this page · raw message
drivers/net/mlnx_uio/mlnx/mlx5/core/wq.h new file +177 -0
177 lines not on this page · raw message
drivers/net/mlnx_uio/mlx4_en_special.h new file +21 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/mlx4_uio.c new file +1026 -0
1,026 lines not on this page · raw message
drivers/net/mlnx_uio/prepare.py new file +28 -0
Lines of this file are not shown. View the raw message.
drivers/net/mlnx_uio/rte_pmd_mlnx_uio_version.map new file +4 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
2015-07-06 22:28, leeopop:
Quoted 3 lines
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
What is the benefit of this UIO approach compared to the OFED based driver?
Quoted 2 lines
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL sources.
The GPL sources are not really separated.
The DPDK libraries must be BSD-licensed.
Quoted 1 line
The GPL affected source codes reside in the mlnx_uio/kernel directory.
It seems that a large part of the GPL driver was also copied in mlnx_uio/mlnx/.
Given that you are dropping a huge GPL codebase (whose you don't own the copyright) in a BSD library, and that you didn't give your real name in the signed-off line, it is NACK.
Answer 1. UIO based driver is faster then ib based driver.
It can saturate 40G link with MTU sized packets using a single thread while ib wrapper cannot.
Answer 2. Sorry, I missed that. I'll make a new patch email with my real name.
Question 1. Is it OK if I separate GPL-based and BSD-based codes into separated patches?
mlx4 kernel driver itself is dual licenses, so I think they are considered as BSD
in my source code.
The only source code under GPL is bitmap, integer logarithm, and red-black tree
contained in mlnx_uio/kernel directory.
Keunhong.
2015-07-06 23:17 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 25 lines
2015-07-06 22:28, leeopop:
Quoted 3 lines
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
What is the benefit of this UIO approach compared to the OFED based driver?
Quoted 2 lines
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL
sources.
The GPL sources are not really separated.
The DPDK libraries must be BSD-licensed.Quoted 1 line
The GPL affected source codes reside in the mlnx_uio/kernel directory.
It seems that a large part of the GPL driver was also copied in mlnx_uio/mlnx/.
Given that you are dropping a huge GPL codebase (whose you don't own the copyright)
in a BSD library, and that you didn't give your real name in the signed-off line,
it is NACK.
2015-07-07 00:57, Keunhong Lee:
Quoted 3 lines
Answer 1. UIO based driver is faster then ib based driver.
It can saturate 40G link with MTU sized packets using a single thread while ib wrapper cannot.
OK, interesting. Do you have numbers and details about your testbed/scenario?
Quoted 9 lines
Answer 2. Sorry, I missed that. I'll make a new patch email with my real name.
Question 1. Is it OK if I separate GPL-based and BSD-based codes into separated patches?
mlx4 kernel driver itself is dual licenses, so I think they are considered as BSD in my source code.
The only source code under GPL is bitmap, integer logarithm, and red-black tree contained in mlnx_uio/kernel directory.
These parts will be built in the user-space driver library, right? It would change the license, which is not desirable.
Technically, your approach may be interesting.
But from a maintenance point of view, this huge codebase may be a nightmare.
Quoted 24 lines
2015-07-06 23:17 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 22 lines
2015-07-06 22:28, leeopop:
Quoted 3 lines
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
What is the benefit of this UIO approach compared to the OFED based driver?
Quoted 3 lines
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL sources.
The GPL sources are not really separated.
The DPDK libraries must be BSD-licensed.Quoted 1 line
The GPL affected source codes reside in the mlnx_uio/kernel directory.
It seems that a large part of the GPL driver was also copied in mlnx_uio/mlnx/.
Given that you are dropping a huge GPL codebase (whose you don't own the copyright) in a BSD library, and that you didn't give your real name in the signed-off line, it is NACK.
We found that optimizing fragmentation configuration of mlx4 driver performs as fast as native PMD.
I think we have to re-consider using native driver rather than ib driver.
Keunhong.
2015-07-07 1:14 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 60 lines
2015-07-07 00:57, Keunhong Lee:
Quoted 2 lines
Answer 1. UIO based driver is faster then ib based driver. It can saturate 40G link with MTU sized packets using a single thread
while
Quoted 1 line
ib wrapper cannot.
OK, interesting. Do you have numbers and details about your testbed/scenario?
Quoted 6 lines
Answer 2. Sorry, I missed that. I'll make a new patch email with my real name.
Question 1. Is it OK if I separate GPL-based and BSD-based codes into separated patches?
mlx4 kernel driver itself is dual licenses, so I think they areconsidered
Quoted 2 lines
as BSD in my source code.
The only source code under GPL is bitmap, integer logarithm, andred-black
Quoted 1 line
tree contained in mlnx_uio/kernel directory.
These parts will be built in the user-space driver library, right? It would change the license, which is not desirable.
Technically, your approach may be interesting.
But from a maintenance point of view, this huge codebase may be a nightmare.Quoted 8 lines
2015-07-06 23:17 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 6 lines
2015-07-06 22:28, leeopop:
Quoted 3 lines
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
What is the benefit of this UIO approach compared to the OFED based
driver?
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL sources.
The GPL sources are not really separated.
The DPDK libraries must be BSD-licensed.Quoted 1 line
The GPL affected source codes reside in the mlnx_uio/kernel
directory.
Quoted 5 lines
Quoted 5 lines
It seems that a large part of the GPL driver was also copied in mlnx_uio/mlnx/.
Given that you are dropping a huge GPL codebase (whose you don't own
the
Quoted 2 lines
Quoted 2 lines
copyright) in a BSD library, and that you didn't give your real name in the signed-off line, it is NACK.
Hi Keunhong,
I disagree with you regarding the performance of ConnectX-3 PMD driver based on verbs. We get line rate of 40G link with message size smaller than 512B.
In MLNX_OFED 3.0 we have presented a new verbs, called accelerated verbs, these verbs improves by more than 100% the performance of RAW QP for DPDK. The PMD changes based on this new infrastructure have been submitted to this list and are part of DPDK 2.1 release. Our approach is to improve performance of userspace verbs then to maintain a huge amount of code that you have submitted.
Another advantage to use userspace verbs API is that you have so called bi-furcated driver by design. Kernel driver can work side by side with DPDK PMD , if needed, and there is no security issues with this model.
Best Regards,
Olga
________________________________________________________________
Olga Shern
Sr. Manager, Acceleration libraries team (Accelio, DPDK, VMA) Mellanox Technologies, Raanana Israel
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Keunhong Lee
Sent: Monday, July 06, 2015 8:56 PM
To: Thomas Monjalon
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 0/2] Native uio-based PMD for Mellanox ConnectX-3 devices
We found that optimizing fragmentation configuration of mlx4 driver performs as fast as native PMD. I think we have to re-consider using native driver rather than ib driver.
Keunhong.
2015-07-07 1:14 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 63 lines
2015-07-07 00:57, Keunhong Lee:
Quoted 3 lines
Answer 1. UIO based driver is faster then ib based driver. It can saturate 40G link with MTU sized packets using a single thread
while
Quoted 1 line
ib wrapper cannot.
OK, interesting. Do you have numbers and details about your testbed/scenario?
Quoted 6 lines
Answer 2. Sorry, I missed that. I'll make a new patch email with my real name.
Question 1. Is it OK if I separate GPL-based and BSD-based codes into separated patches?
mlx4 kernel driver itself is dual licenses, so I think they areconsidered
Quoted 2 lines
as BSD in my source code.
The only source code under GPL is bitmap, integer logarithm, andred-black
Quoted 1 line
tree contained in mlnx_uio/kernel directory.
These parts will be built in the user-space driver library, right? It would change the license, which is not desirable.
Technically, your approach may be interesting.
But from a maintenance point of view, this huge codebase may be a nightmare.Quoted 9 lines
2015-07-06 23:17 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 7 lines
2015-07-06 22:28, leeopop:
Quoted 3 lines
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
What is the benefit of this UIO approach compared to the OFED based
driver?
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL sources.
The GPL sources are not really separated.
The DPDK libraries must be BSD-licensed.Quoted 1 line
The GPL affected source codes reside in the mlnx_uio/kernel
directory.
Quoted 6 lines
Quoted 6 lines
It seems that a large part of the GPL driver was also copied in mlnx_uio/mlnx/.
Given that you are dropping a huge GPL codebase (whose you don't own
the
Quoted 2 lines
Quoted 2 lines
copyright) in a BSD library, and that you didn't give your real name in the signed-off line, it is NACK.
Hello!
Sorry for off topic. But this question is very important for me.
Olga, could I achieve line rate with Mellanox Cards with 64b packets for 40GE?
Quoted 96 lines · Olga Shern
Hi Keunhong,
I disagree with you regarding the performance of ConnectX-3 PMD driver based on verbs. We get line rate of 40G link with message size smaller than 512B.
InMLNX_OFED3.0 we have presented a new verbs, called accelerated verbs, these verbs improves by more than 100% the performance of RAW QP for DPDK. The PMD changes based on this new infrastructure have been submitted to this list and are part of DPDK 2.1 release. Our approach is to improve performance of userspace verbs then to maintain a huge amount of code that you have submitted.Another advantage to use userspace verbs API is that you have so called bi-furcated driver by design. Kernel driver can work side by side with DPDK PMD , if needed, and there is no security issues with this model.
Best Regards,
Olga________________________________________________________________
Olga Shern
Sr. Manager, Acceleration libraries team (Accelio, DPDK, VMA) Mellanox Technologies, Raanana Israel-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Keunhong Lee
Sent: Monday, July 06, 2015 8:56 PM
To: Thomas Monjalon
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 0/2] Native uio-based PMD for Mellanox ConnectX-3 devicesWe found that optimizing fragmentation configuration of mlx4 driver performs as fast as native PMD. I think we have to re-consider using native driver rather than ib driver.
Keunhong.
2015-07-07 1:14 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 63 lines
2015-07-07 00:57, Keunhong Lee:
Quoted 3 lines
Answer 1. UIO based driver is faster then ib based driver. It can saturate 40G link with MTU sized packets using a single thread
while
Quoted 1 line
ib wrapper cannot.
OK, interesting. Do you have numbers and details about your testbed/scenario?
Quoted 6 lines
Answer 2. Sorry, I missed that. I'll make a new patch email with my real name.
Question 1. Is it OK if I separate GPL-based and BSD-based codes into separated patches?
mlx4 kernel driver itself is dual licenses, so I think they areconsidered
Quoted 2 lines
as BSD in my source code.
The only source code under GPL is bitmap, integer logarithm, andred-black
Quoted 1 line
tree contained in mlnx_uio/kernel directory.
These parts will be built in the user-space driver library, right? It would change the license, which is not desirable.
Technically, your approach may be interesting.
But from a maintenance point of view, this huge codebase may be a nightmare.Quoted 9 lines
2015-07-06 23:17 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 7 lines
2015-07-06 22:28, leeopop:
Quoted 3 lines
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
What is the benefit of this UIO approach compared to the OFED based
driver?
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL sources.
The GPL sources are not really separated.
The DPDK libraries must be BSD-licensed.Quoted 1 line
The GPL affected source codes reside in the mlnx_uio/kernel
directory.
Quoted 6 lines
Quoted 6 lines
It seems that a large part of the GPL driver was also copied in mlnx_uio/mlnx/.
Given that you are dropping a huge GPL codebase (whose you don't own
the
Quoted 2 lines
Quoted 2 lines
copyright) in a BSD library, and that you didn't give your real name in the signed-off line, it is NACK.
Signature · 1 line
Sincerely yours, Pavel Odintsov
Hi Pavel,
A new Mellanox NIC, ConnectX-4 can achieve line arte with 64b packet for 40G link
We will have PMD that supports this NIC in DPDK 2.2 .
By the way, this is also an advantage of using verbs API, with almost 0% effort we can support a new NIC
Best Regards,
Olga
-----Original Message-----
From: Pavel Odintsov [mailto:[email protected]]
Sent: Tuesday, July 07, 2015 10:02 AM
To: Olga Shern
Cc: Keunhong Lee; Thomas Monjalon; [email protected]
Subject: Re: [dpdk-dev] [PATCH 0/2] Native uio-based PMD for Mellanox ConnectX-3 devices
Hello!
Sorry for off topic. But this question is very important for me.
Olga, could I achieve line rate with Mellanox Cards with 64b packets for 40GE?
Quoted 27 lines · Olga Shern
Hi Keunhong,
I disagree with you regarding the performance of ConnectX-3 PMD driver based on verbs. We get line rate of 40G link with message size smaller than 512B.
InMLNX_OFED3.0 we have presented a new verbs, called accelerated verbs, these verbs improves by more than 100% the performance of RAW QP for DPDK. The PMD changes based on this new infrastructure have been submitted to this list and are part of DPDK 2.1 release. Our approach is to improve performance of userspace verbs then to maintain a huge amount of code that you have submitted.Another advantage to use userspace verbs API is that you have so called bi-furcated driver by design. Kernel driver can work side by side with DPDK PMD , if needed, and there is no security issues with this model.
Best Regards,
Olga________________________________________________________________
Olga Shern
Sr. Manager, Acceleration libraries team (Accelio, DPDK, VMA) Mellanox Technologies, Raanana Israel-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Keunhong Lee
Sent: Monday, July 06, 2015 8:56 PM
To: Thomas Monjalon
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 0/2] Native uio-based PMD for Mellanox ConnectX-3 devices
Quoted 70 lines
We found that optimizing fragmentation configuration of mlx4 driver performs as fast as native PMD. I think we have to re-consider using native driver rather than ib driver.
Keunhong.
2015-07-07 1:14 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 63 lines
2015-07-07 00:57, Keunhong Lee:
Quoted 3 lines
Answer 1. UIO based driver is faster then ib based driver. It can saturate 40G link with MTU sized packets using a single thread
while
Quoted 1 line
ib wrapper cannot.
OK, interesting. Do you have numbers and details about your testbed/scenario?
Quoted 6 lines
Answer 2. Sorry, I missed that. I'll make a new patch email with my real name.
Question 1. Is it OK if I separate GPL-based and BSD-based codes into separated patches?
mlx4 kernel driver itself is dual licenses, so I think they areconsidered
Quoted 2 lines
as BSD in my source code.
The only source code under GPL is bitmap, integer logarithm, andred-black
Quoted 1 line
tree contained in mlnx_uio/kernel directory.
These parts will be built in the user-space driver library, right? It would change the license, which is not desirable.
Technically, your approach may be interesting.
But from a maintenance point of view, this huge codebase may be a nightmare.Quoted 9 lines
2015-07-06 23:17 GMT+09:00 Thomas Monjalon <[email protected]>:
Quoted 7 lines
2015-07-06 22:28, leeopop:
Quoted 3 lines
This is a native UIO-based PMD for Mellanox ConnectX-3 devices. It uses a persistent memory library in order to provide a persistent scartch area for the mlx4 HCA driver.
What is the benefit of this UIO approach compared to the OFED based
driver?
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
We release the driver itself under BSD license, but to use it for commercial products, you may have to re-implement the separated GPL sources.
The GPL sources are not really separated.
The DPDK libraries must be BSD-licensed.Quoted 1 line
The GPL affected source codes reside in the mlnx_uio/kernel
directory.
Quoted 6 lines
Quoted 6 lines
It seems that a large part of the GPL driver was also copied in mlnx_uio/mlnx/.
Given that you are dropping a huge GPL codebase (whose you don't own
the
Quoted 2 lines
Quoted 2 lines
copyright) in a BSD library, and that you didn't give your real name in the signed-off line, it is NACK.
--
Sincerely yours, Pavel Odintsov