├── ChangeLog ├── LICENSE ├── README ├── README.affinity ├── README.ef_vi ├── ReleaseNotes ├── ReleaseNotes-sfc ├── mk ├── after.mk ├── apple_gcc.mk ├── before.mk ├── linux_gcc.mk ├── linux_kbuild.mk ├── makefile.copy.depends ├── middle.mk ├── platform │ ├── buxton_sienamc.mk │ ├── falcon_b0_gnu.mk │ ├── falcon_b0_gnu_x86_64.mk │ ├── falcon_b0_linux2.6.mk │ ├── falcon_gnu.mk │ ├── falcon_gnu_x86_64.mk │ ├── falcon_linux2.6.mk │ ├── falcon_x86_wxp.mk │ ├── gnu.mk │ ├── gnu_ppc32.mk │ ├── gnu_ppc64.mk │ ├── gnu_x86_64.mk │ ├── linux2.6.mk │ └── linux_uio_utils.mk └── site │ ├── ciapp.mk │ ├── ciip.mk │ ├── ciiscsi.mk │ ├── citools.mk │ ├── citpcommon.mk │ ├── ciul.mk │ ├── driverlib.mk │ ├── efhw.mk │ ├── efhwdef.mk │ ├── efrm.mk │ ├── efthrm.mk │ ├── libs.mk │ ├── mmake.mk │ ├── mpi.mk │ └── sfgpxe.mk ├── scripts ├── check_binary_presence ├── check_library_presence ├── check_prototype ├── libc_compat.sh ├── mmake ├── mmakebuildtree ├── mmaketool ├── onload ├── onload_apps │ ├── mpiexec │ ├── mpirun │ ├── sfnt-pingpong │ └── sfnt-stream ├── onload_build ├── onload_install ├── onload_iptables ├── onload_loaddrivers ├── onload_misc │ ├── dkms.conf │ ├── onload-extract-notes │ ├── onload-make-official-srpm │ ├── onload_depmod.conf │ ├── onload_init_rc │ ├── onload_modprobe.conf │ ├── onload_sysconfig │ ├── onload_uninstall │ ├── openonload.dkms-spec │ ├── openonload.spec │ ├── setup.py │ ├── sfc_aoe_modprobe.conf │ └── solar_clusterd-spec ├── onload_profiles │ ├── latency.opf │ ├── safe.opf │ └── zeromq.opf ├── onload_tcpdump ├── onload_tool ├── sfcaffinity ├── sfcaffinity.py ├── sfcaffinity_config ├── sfcirqaffinity ├── sfcmask.py └── sh │ ├── customer_event_log_nl.sed │ ├── disttag │ ├── fns │ ├── mmake-fns │ └── mmakebuildtree_gen └── src ├── driver ├── efab │ ├── ipid.c │ └── workqueue.c ├── linux │ ├── gcov.c │ ├── gcov.h │ ├── linux_trampoline_asm.S │ └── mmake.mk ├── linux_affinity │ ├── kernel_compat.h │ ├── kernel_compat.sh │ ├── mmake.mk │ └── sfcaffinity.c ├── linux_aoe │ ├── Makefile │ ├── aoe.h │ ├── aoe_buffer.c │ ├── aoe_compat.c │ ├── aoe_compat.h │ ├── aoe_dev.c │ ├── aoe_entry.c │ ├── aoe_init.c │ ├── aoe_ioctl.c │ ├── aoe_ioctl.h │ ├── aoe_map.c │ ├── aoe_netdev.c │ ├── aoe_queue.c │ ├── aoe_sim.c │ ├── aoe_stats.c │ ├── aoe_sysfs.c │ ├── driverlink.c │ ├── inband.c │ ├── kernel_compat_aoe.sh │ ├── mcdi.c │ ├── mcdi_pcol_aoe.h │ └── mmake.mk ├── linux_char │ ├── char_driver.c │ ├── char_internal.h │ ├── efch.h │ ├── efch_license.c │ ├── efch_manager.c │ ├── efch_memreg.c │ ├── efch_pd.c │ ├── filter_list.c │ ├── filter_list.h │ ├── iobufset.c │ ├── linux_char_internal.h │ ├── mmake.mk │ ├── mmap.c │ ├── mmap_iopage.c │ ├── pio.c │ ├── resource_table.c │ ├── vi_resource.c │ ├── vi_resource_event.c │ ├── vi_resource_mmap.c │ └── vi_set.c ├── linux_net │ ├── Makefile │ ├── aoe.c │ ├── aoe.h │ ├── bitfield.h │ ├── debugfs.c │ ├── debugfs.h │ ├── driverlink.c │ ├── driverlink.h │ ├── driverlink_api.h │ ├── ef10.c │ ├── ef10_regs.h │ ├── ef10_sriov.c │ ├── ef10_sriov.h │ ├── efx.c │ ├── efx.h │ ├── efx_ioctl.h │ ├── efx_linux_types.h │ ├── enum.h │ ├── ethtool.c │ ├── falcon.c │ ├── falcon_boards.c │ ├── falcon_xmac.c │ ├── farch.c │ ├── farch_regs.h │ ├── filter.c │ ├── filter.h │ ├── idle.c │ ├── idle.h │ ├── io.h │ ├── ioctl.c │ ├── kabi_compat.h │ ├── kernel_compat.c │ ├── kernel_compat.h │ ├── kernel_compat.sh │ ├── linux_mdio.c │ ├── linux_mdio.h │ ├── linux_mtd_mtd.h │ ├── lm87.c │ ├── lm90.c │ ├── mcdi.c │ ├── mcdi.h │ ├── mcdi_mac.c │ ├── mcdi_mon.c │ ├── mcdi_pcol.h │ ├── mcdi_pcol_aoe.h │ ├── mcdi_phy.c │ ├── mcdi_port.c │ ├── mcdi_proxy.c │ ├── mcdi_proxy.h │ ├── mdio_10g.c │ ├── mdio_10g.h │ ├── mmake.mk │ ├── mtd.c │ ├── mtd │ │ └── mtd-abi.h │ ├── net_driver.h │ ├── nic.c │ ├── nic.h │ ├── phy.h │ ├── proxy_auth.c │ ├── proxy_auth.h │ ├── ptp.c │ ├── qt202x_phy.c │ ├── regs.h │ ├── rx.c │ ├── selftest.c │ ├── selftest.h │ ├── siena.c │ ├── siena_sriov.c │ ├── siena_sriov.h │ ├── spi.h │ ├── sriov.c │ ├── sriov.h │ ├── tenxpress.c │ ├── trace │ │ └── events │ │ │ └── sfc.h │ ├── tweak.c │ ├── tx.c │ ├── txc43128_phy.c │ ├── vfdi.h │ └── workarounds.h ├── linux_onload │ ├── bonding.c │ ├── compat.c │ ├── driver.c │ ├── driverlink_ip.c │ ├── epoll_device.c │ ├── iscsi_support.c │ ├── linux_cplane.c │ ├── linux_efabcfg.c │ ├── linux_sock_ops.c │ ├── linux_stats.c │ ├── linux_trampoline.c │ ├── linux_trampoline_asm_x86.S │ ├── mmake.mk │ ├── mmap.c │ ├── ofe_sysdep.c │ ├── onload_internal.h │ ├── onload_kernel_compat.h │ ├── onloadfs.c │ ├── ossock_calls.c │ ├── pinbuf.c │ ├── ppc64_linux_trampoline.c │ ├── ppc64_linux_trampoline_asm.S │ ├── ppc64_linux_trampoline_internal.c │ ├── ppc64_linux_trampoline_internal.h │ ├── shmbuf.c │ ├── sigaction_calls.c │ ├── tcp_sendpage.c │ ├── terminate.c │ └── x86_linux_trampoline.c ├── linux_resource │ ├── Makefile │ ├── bt_stats.c │ ├── compat_pat_wc.c │ ├── compat_pat_wc.h │ ├── driverlink_new.c │ ├── filter.c │ ├── iopage.c │ ├── kernel_compat.h │ ├── kernel_proc.c │ ├── linux_resource_internal.h │ ├── mmake.mk │ ├── port_sniff.c │ ├── resource_driver.c │ ├── vf_driver.c │ └── vfdi.h └── mmake.mk ├── include ├── aoe │ └── amm_streams.h ├── ci │ ├── affinity │ │ ├── k_drv_intf.h │ │ └── ul_drv_intf.h │ ├── app.h │ ├── app │ │ ├── checkedsocket.h │ │ ├── ctimer.h │ │ ├── ifindex.h │ │ ├── net.h │ │ ├── onload.h │ │ ├── platform │ │ │ └── unix.h │ │ ├── rawpkt.h │ │ ├── recvmmsg.h │ │ ├── sendmmsg.h │ │ ├── socket.h │ │ ├── stats.h │ │ ├── testapp.h │ │ ├── testpattern.h │ │ └── utils.h │ ├── compat.h │ ├── compat │ │ ├── gcc.h │ │ ├── gcc_ppc.h │ │ ├── gcc_x86.h │ │ ├── pg_x86.h │ │ ├── ppc.h │ │ ├── primitive.h │ │ ├── sysdep.h │ │ ├── utils.h │ │ ├── x86.h │ │ └── x86_64.h │ ├── driver │ │ ├── efab │ │ │ ├── debug.h │ │ │ ├── efch.h │ │ │ ├── efch_id.h │ │ │ ├── efrm_mmap.h │ │ │ ├── hardware.h │ │ │ ├── hardware │ │ │ │ ├── alaska8080111.h │ │ │ │ ├── bitfield.h │ │ │ │ ├── byteswap.h │ │ │ │ ├── common.h │ │ │ │ ├── ef10.h │ │ │ │ ├── ef10_vaddr.h │ │ │ │ ├── falcon.h │ │ │ │ ├── falcon │ │ │ │ │ ├── falcon_desc.h │ │ │ │ │ ├── falcon_event.h │ │ │ │ │ ├── falcon_grmon.h │ │ │ │ │ ├── falcon_intr_vec.h │ │ │ │ │ ├── falcon_mac.h │ │ │ │ │ ├── falcon_rmon.h │ │ │ │ │ └── falcon_xgrmon.h │ │ │ │ ├── falcon_iscsi.h │ │ │ │ ├── falcon_spi.h │ │ │ │ ├── falcon_stats.h │ │ │ │ ├── falcon_ul.h │ │ │ │ ├── host_common.h │ │ │ │ ├── host_common_mac.h │ │ │ │ ├── host_common_pci_defs.h │ │ │ │ ├── host_ef10_common.h │ │ │ │ ├── hwd.h │ │ │ │ ├── hwd_addrlut.h │ │ │ │ ├── hwd_defs.h │ │ │ │ ├── ixf1002.h │ │ │ │ └── pbmx_hwdefs.h │ │ │ ├── kprof.h │ │ │ ├── linux_bar.h │ │ │ ├── linux_char_internal.h │ │ │ ├── linux_iscsi.h │ │ │ ├── mmap_iopage.h │ │ │ ├── open.h │ │ │ ├── operations.h │ │ │ ├── os_intf.h │ │ │ ├── reg_walker.h │ │ │ ├── unix_intf.h │ │ │ └── workqueue.h │ │ ├── internal.h │ │ ├── pci.h │ │ ├── platform │ │ │ ├── linux_cplane_sync.h │ │ │ ├── linux_kernel.h │ │ │ ├── ul_driver_common.h │ │ │ ├── unix_common.h │ │ │ └── unix_ul_driver.h │ │ └── resource │ │ │ └── linux_efhw_nic.h │ ├── efch │ │ ├── mmap.h │ │ ├── mmap_id.h │ │ ├── op_types.h │ │ └── resource_id.h │ ├── efhw │ │ ├── checks.h │ │ ├── common.h │ │ ├── common_ci2linux.h │ │ ├── common_linux.h │ │ ├── common_sysdep.h │ │ ├── debug.h │ │ ├── debug_ci2linux.h │ │ ├── debug_linux.h │ │ ├── ef10.h │ │ ├── efhw_buftable.h │ │ ├── efhw_config.h │ │ ├── efhw_types.h │ │ ├── eventq.h │ │ ├── eventq_macros.h │ │ ├── falcon.h │ │ ├── falcon_ul.h │ │ ├── hardware_ci2linux.h │ │ ├── hardware_linux.h │ │ ├── hardware_sysdep.h │ │ ├── hardware_ul.h │ │ ├── iopage.h │ │ ├── iopage_linux.h │ │ ├── iopage_types.h │ │ ├── iopage_ul.h │ │ ├── nic.h │ │ ├── public.h │ │ ├── sysdep.h │ │ ├── sysdep_ci2linux.h │ │ └── sysdep_linux.h │ ├── efrm │ │ ├── buddy.h │ │ ├── buffer_page_register.h │ │ ├── buffer_table.h │ │ ├── config.h │ │ ├── debug.h │ │ ├── debug_linux.h │ │ ├── driver_private.h │ │ ├── efrm_client.h │ │ ├── efrm_filter.h │ │ ├── efrm_nic.h │ │ ├── efrm_port_sniff.h │ │ ├── iobufset.h │ │ ├── kernel_proc.h │ │ ├── kfifo.h │ │ ├── licensing.h │ │ ├── nic_set.h │ │ ├── nic_table.h │ │ ├── pd.h │ │ ├── pio.h │ │ ├── private.h │ │ ├── resource.h │ │ ├── resource_id.h │ │ ├── sysdep.h │ │ ├── sysdep_ci2linux.h │ │ ├── sysdep_linux.h │ │ ├── vf_resource.h │ │ ├── vf_resource_private.h │ │ ├── vi_allocation.h │ │ ├── vi_resource.h │ │ ├── vi_resource_manager.h │ │ ├── vi_resource_private.h │ │ └── vi_set.h │ ├── ftl │ │ ├── ftl.h │ │ ├── ftl_internal.h │ │ ├── ftl_libhwdef.h │ │ └── ftl_mcdi.h │ ├── internal │ │ ├── citp_opts.h │ │ ├── cplane_handle.h │ │ ├── cplane_ops.h │ │ ├── cplane_ops2.h │ │ ├── cplane_types.h │ │ ├── efabcfg.h │ │ ├── event_select.h │ │ ├── infversion │ │ ├── ip.h │ │ ├── ip_log.h │ │ ├── ip_shared_ops.h │ │ ├── ip_shared_types.h │ │ ├── ip_signal.h │ │ ├── ip_stats.h │ │ ├── ip_stats_ops.h │ │ ├── ip_types.h │ │ ├── ipid.h │ │ ├── opts_citp_def.h │ │ ├── opts_netif_def.h │ │ ├── opts_user_def.h │ │ ├── os_sock.h │ │ ├── pio_buddy.h │ │ ├── rcversion.h │ │ ├── stats_def.h │ │ ├── syscall.h │ │ ├── tips_onload.h │ │ ├── tls.h │ │ ├── trampoline.h │ │ ├── transport_common.h │ │ ├── transport_config_opt.h │ │ ├── user_opts.h │ │ └── version.h │ ├── iscsi │ │ └── sis_interface.h │ ├── net │ │ ├── arp.h │ │ ├── ethernet.h │ │ ├── ioctls.h │ │ ├── ipv4.h │ │ ├── ipv6.h │ │ └── sockopts.h │ ├── tools.h │ └── tools │ │ ├── bitfield.h │ │ ├── buddy.h │ │ ├── buffer.h │ │ ├── bufrange.h │ │ ├── byteorder.h │ │ ├── config.h │ │ ├── cpu_features.h │ │ ├── crc32c.h │ │ ├── customer_event_log.h │ │ ├── customer_event_log_gendefs.h │ │ ├── customer_event_log_msgs.mcc │ │ ├── debug.h │ │ ├── distq.h │ │ ├── dllist.h │ │ ├── fifo.h │ │ ├── fifos.h │ │ ├── idllist.h.tmpl │ │ ├── internal.h │ │ ├── iovec.h │ │ ├── ipcsum.h │ │ ├── ippacket.h │ │ ├── istack.h │ │ ├── log.h │ │ ├── magic.h │ │ ├── memchk.h │ │ ├── memcpy.h │ │ ├── memleak_debug.h │ │ ├── pktdump.h │ │ ├── platform │ │ ├── gcc_ppc.h │ │ ├── gcc_x86.h │ │ ├── linux_kernel.h │ │ ├── pg_x86.h │ │ ├── storport.h │ │ ├── ul_common.h │ │ └── unix.h │ │ ├── sllist.h │ │ ├── spinlock.h │ │ ├── stack.h │ │ ├── stacks.h │ │ ├── sysdep.h │ │ ├── timeval.h │ │ ├── ustream.h │ │ └── utils.h ├── etherfabric │ ├── base.h │ ├── cluster_protocol.h │ ├── doxygen │ │ ├── 000_main.dox │ │ ├── 010_overview.dox │ │ ├── 020_concepts.dox │ │ ├── 030_apps.dox │ │ ├── 040_using.dox │ │ ├── 050_examples.dox │ │ ├── disclaimer.tex │ │ ├── doxyfile_ef_vi │ │ ├── efvi_vnic.png │ │ ├── footer.tex │ │ ├── header.tex │ │ ├── sf_logo.eps │ │ └── solarflare_logo_blublk.png │ ├── ef_vi.h │ ├── init.h │ ├── internal │ │ ├── cluster_protocol.h │ │ └── internal.h │ ├── iobufset.h │ ├── iovec_ptr.h │ ├── memreg.h │ ├── misc.h │ ├── packedstream.h │ ├── pd.h │ ├── pio.h │ ├── timer.h │ └── vi.h ├── mmake.mk └── onload │ ├── atomics.h │ ├── cas32.h │ ├── common.h │ ├── cplane.h │ ├── cplane_prot.h │ ├── cplane_types.h │ ├── debug.h │ ├── debug_intf.h │ ├── debug_ops.h │ ├── declare_libccalls.h.tmpl │ ├── declare_syscalls.h.tmpl │ ├── driveraccess.h │ ├── driverlink_filter.h │ ├── driverlink_filter_private.h │ ├── drv │ └── dump_to_user.h │ ├── dup2_lock.h │ ├── efabcfg.h │ ├── eplock.h │ ├── eplock_resource.h │ ├── epoll.h │ ├── extensions.h │ ├── extensions_zc.h │ ├── fd_private.h │ ├── id_pool.h │ ├── iobufset.h │ ├── ioctl.h │ ├── ip_protocols.h │ ├── ipid.h │ ├── linux_ip_protocols.h │ ├── linux_mmap.h │ ├── linux_onload.h │ ├── linux_onload_internal.h │ ├── linux_sock_ops.h │ ├── linux_trampoline.h │ ├── mmap.h │ ├── nic.h │ ├── offbuf.h │ ├── oo_pipe.h │ ├── oof_hw_filter.h │ ├── oof_interface.h │ ├── oof_onload.h │ ├── oof_socket.h │ ├── osfile.h │ ├── pkt_filler.h │ ├── pkt_p.h │ ├── pktq.h │ ├── primitive_types.h │ ├── shmbuf.h │ ├── signals.h │ ├── sleep.h │ ├── sock_p.h │ ├── state_p.h │ ├── syscall_unix.h │ ├── syscalls.h │ ├── tcp_driver.h │ ├── tcp_helper.h │ ├── tcp_helper_endpoint.h │ ├── tcp_helper_fns.h │ ├── tcp_poll.h │ ├── test_intf.h │ ├── tmpl.h │ ├── ul.h │ ├── ul │ ├── per_thread.h │ ├── rwlock.h │ ├── stackname.h │ ├── tcp_helper.h │ └── wqlock.h │ ├── unix_intf.h │ ├── verlock.h │ └── version.h ├── lib ├── ciapp │ ├── bytepattern.c │ ├── mmake.mk │ ├── net.c │ └── testapp.c ├── citools │ ├── Makefile │ ├── asm_csum_copy.S │ ├── asm_memcpy.S │ ├── buddy.c │ ├── buffer.c │ ├── bufrange.c │ ├── cas64u.S │ ├── cithread.c │ ├── citools_internal.h │ ├── copy_iovec.c │ ├── copy_to_iovec.c │ ├── cpu_features.c │ ├── crc16.c │ ├── crc32.c │ ├── crc32c.c │ ├── csum_copy2.c │ ├── csum_copy_iovec.c │ ├── csum_copy_to_iovec.c │ ├── dllist.c │ ├── drv_get_cpu_khz.c │ ├── drv_log_fn.c │ ├── drv_thread.c │ ├── dump_select.c │ ├── eth_addr.c │ ├── fail.c │ ├── fifo_grow_lock.c │ ├── get_cpu_khz.c │ ├── glibc_version.c │ ├── hex_dump.c │ ├── hex_dump_to_raw.c │ ├── icmp_checksum.c │ ├── internal.h │ ├── ip_addr.c │ ├── ip_csum_partial.c │ ├── ip_csum_precompute.c │ ├── ipcsum.c │ ├── ippacket.c │ ├── log.c │ ├── log_buffer.c │ ├── log_file.c │ ├── log_fn.c │ ├── log_nth.c │ ├── log_unique.c │ ├── memchk.c │ ├── memcpy.c │ ├── memleak_debug.c │ ├── mmake.mk │ ├── parse_eth_addr.c │ ├── pktdump.c │ ├── sys_fail.c │ ├── tcp_checksum.c │ ├── tcp_csum_precompute.c │ ├── toeplitz.c │ ├── udp_checksum.c │ └── udp_csum_precompute.c ├── ciul │ ├── bitfield.h │ ├── driver_access.h │ ├── ef10_event.c │ ├── ef10_evtimer.c │ ├── ef10_hw_defs.h │ ├── ef10_vi.c │ ├── ef_app_cluster.c │ ├── ef_vi_ef10.h │ ├── ef_vi_falcon.h │ ├── ef_vi_falcon_desc.h │ ├── ef_vi_falcon_event.h │ ├── ef_vi_hw_defs.h │ ├── ef_vi_internal.h │ ├── event_q.c │ ├── event_q_put.c │ ├── evtimer.c │ ├── falcon_event.c │ ├── falcon_evtimer.c │ ├── falcon_hw_defs.h │ ├── falcon_vi.c │ ├── filter.c │ ├── iobuffers.c │ ├── logging.c │ ├── logging.h │ ├── mcdi_pcol.h │ ├── memreg.c │ ├── mmake.mk │ ├── open.c │ ├── pd.c │ ├── pio.c │ ├── pt_endpoint.c │ ├── pt_rx.c │ ├── pt_tx.c │ ├── resource_init.c │ ├── sysdep.h │ ├── sysdep_linux.h │ ├── sysdep_unix.h │ ├── vi_init.c │ ├── vi_layout.c │ ├── vi_prime.c │ ├── vi_set.c │ └── vi_stats.c ├── efabcfg │ ├── ftl │ │ ├── libftl.c │ │ └── mmake.mk │ ├── lib_efabcfg.c │ ├── mmake.mk │ └── pattern.c ├── efhw │ ├── alaska.c │ ├── eeprom.c │ ├── ef10.c │ ├── ef10_mcdi.h │ ├── eventq.c │ ├── falcon.c │ ├── falcon_iscsi.c │ ├── falcon_spi.c │ ├── falcon_unused.c │ ├── mmake.mk │ ├── nic.c │ └── nic_unused.c ├── efrm │ ├── assert_valid.c │ ├── bt_manager.c │ ├── bt_manager.h │ ├── buddy.c │ ├── buffer_table.c │ ├── driver_object.c │ ├── efrm_internal.h │ ├── efrm_iobufset.h │ ├── efrm_pd.c │ ├── efrm_pd.h │ ├── efrm_pio.c │ ├── efrm_pio.h │ ├── efrm_vf.h │ ├── efrm_vi.h │ ├── efrm_vi_set.c │ ├── efrm_vi_set.h │ ├── iobufset_resource.c │ ├── kfifo.c │ ├── licensing.c │ ├── mmake.mk │ ├── resource_manager.c │ ├── resources.c │ ├── vf_resource.c │ ├── vi_allocator.c │ ├── vi_resource_alloc.c │ ├── vi_resource_event.c │ ├── vi_resource_flush.c │ ├── vi_resource_info.c │ └── vi_resource_manager.c ├── efthrm │ ├── cplane.c │ ├── cplane_prot.c │ ├── driverlink_filter.c │ ├── dump_to_user.c │ ├── efabcfg.c │ ├── eplock_resource_manager.c │ ├── id_pool.c │ ├── iobufset.c │ ├── ip_prot_rx.c │ ├── ip_protocols.c │ ├── mmake.mk │ ├── onload_nic.c │ ├── oo_hw_filter.h │ ├── oof_filters.c │ ├── oof_impl.h │ ├── oof_onload.c │ ├── tcp_filters.c │ ├── tcp_filters_internal.h │ ├── tcp_helper_cluster.c │ ├── tcp_helper_endpoint.c │ ├── tcp_helper_endpoint_move.c │ ├── tcp_helper_ioctl.c │ ├── tcp_helper_linux.c │ ├── tcp_helper_mmap.c │ ├── tcp_helper_resource.c │ └── tcp_helper_sleep.c ├── mmake.mk ├── onload_ext │ ├── mmake.mk │ ├── onload_ext.c │ └── onload_ext_static.c ├── sfcaffinity │ ├── mmake.mk │ └── sfcaffinity.c ├── tools │ ├── mmake.mk │ └── preload │ │ ├── af_onload.c │ │ ├── efabnetstat_pl.c │ │ └── mmake.mk └── transport │ ├── common │ ├── lock.c │ ├── log.c │ ├── mmake.mk │ └── netif_init.c │ ├── ip │ ├── COMPLIANCE │ ├── PMTU │ ├── common_ioctl.c │ ├── common_sockopts.c │ ├── cplane_ops.c │ ├── csum_copy_iovec_setlen.c │ ├── efabcfg.c │ ├── eplock_slow.c │ ├── icmp_send.c │ ├── init.c │ ├── iovec_ptr.h │ ├── ip_cmsg.c │ ├── ip_internal.h │ ├── ip_tx.c │ ├── ip_tx.h │ ├── ipid.c │ ├── iptimer.c │ ├── mmake.mk │ ├── netif.c │ ├── netif_debug.c │ ├── netif_event.c │ ├── netif_init.c │ ├── netif_pkt.c │ ├── netif_stats.c │ ├── netif_table.c │ ├── netif_tx.c │ ├── netif_tx.h │ ├── os_sock.c │ ├── per_thread.c │ ├── pio_buddy.c │ ├── pipe.c │ ├── pkt_filler.c │ ├── pmtu.c │ ├── rwlock.c │ ├── save_fd.c │ ├── signal.c │ ├── sockerr.c │ ├── socket.c │ ├── syscall.c │ ├── tcp_close.c │ ├── tcp_connect.c │ ├── tcp_debug.c │ ├── tcp_driver_ops.c │ ├── tcp_helper.c │ ├── tcp_init.c │ ├── tcp_init_shared.c │ ├── tcp_ioctl.c │ ├── tcp_misc.c │ ├── tcp_recv.c │ ├── tcp_rx.c │ ├── tcp_rx.h │ ├── tcp_send.c │ ├── tcp_sleep.c │ ├── tcp_sockopts.c │ ├── tcp_state_dup.c │ ├── tcp_stats.c │ ├── tcp_syncookie.c │ ├── tcp_synrecv.c │ ├── tcp_timer.c │ ├── tcp_tx.c │ ├── tcp_tx.h │ ├── tcp_tx_reformat.c │ ├── udp.c │ ├── udp_connect.c │ ├── udp_internal.h │ ├── udp_ioctl.c │ ├── udp_misc.c │ ├── udp_recv.c │ ├── udp_rx.c │ ├── udp_send.c │ ├── udp_sockopts.c │ └── waitable.c │ ├── mmake.mk │ └── unix │ ├── closed_fd.c │ ├── common_fcntl.c │ ├── debug.c │ ├── environ.c │ ├── epinfo.c │ ├── epoll_common.c │ ├── epoll_fd.c │ ├── epoll_fd_b.c │ ├── exec.c │ ├── exports.map │ ├── fdtable.c │ ├── internal.h │ ├── log_fn.c │ ├── mapfile.ilp32 │ ├── mapfile.lp64 │ ├── mmake.mk │ ├── netif_init.c │ ├── nonsock.c │ ├── nonsock.h │ ├── onload_ext_intercept.c │ ├── passthrough_fd.c │ ├── pipe_fd.c │ ├── poll_select.c │ ├── protocol_manager.c │ ├── sockcall_intercept.c │ ├── stackname.c │ ├── stackopt.c │ ├── startup.c │ ├── startup_order.h │ ├── sys.c │ ├── tcp_fd.c │ ├── tmpl_intercept.c │ ├── trampoline.c │ ├── trampoline_asm.S │ ├── udp_fd.c │ ├── ul_epoll.h │ ├── ul_pipe.h │ ├── ul_poll.h │ ├── ul_select.h │ ├── utils.c │ ├── vfork_intercept.S │ ├── wqlock.c │ └── zc_intercept.c ├── mmake.mk ├── tests ├── ef_vi │ ├── efdelegated_client.c │ ├── efdelegated_server.c │ ├── efforward.c │ ├── efforward_packed.c │ ├── efpingpong.c │ ├── efpio.c │ ├── efrss.c │ ├── efsink.c │ ├── efsink_packed.c │ ├── eftap.c │ ├── efvi_sfw.c │ ├── efvi_sfw.h │ ├── mmake.mk │ ├── utils.c │ └── utils.h ├── mmake.mk └── onload │ ├── extensions │ ├── .onload_intercept │ ├── Makefile │ ├── libpthread_intercept.c │ ├── libpthread_test.c │ ├── onload_fd_stat.c │ ├── onload_is_present.c │ ├── onload_move_fd.c │ ├── onload_set_stackname.c │ ├── onload_stack_opt.c │ ├── onload_stackname.c │ └── onload_thread_set_spin.c │ ├── hwtimestamping │ ├── Makefile │ ├── rx_timestamping.c │ └── tx_timestamping.c │ ├── mmake.mk │ ├── onload_remote_monitor │ └── orm_example_client │ └── wire_order │ ├── mmake.mk │ ├── wire_order.h │ ├── wire_order_client.c │ └── wire_order_server.c └── tools ├── ip ├── fuser.c ├── libstack.c ├── libstack.h ├── mmake.mk ├── stackdump.c └── tcpdump_bin.c ├── jansson-2.7 ├── CHANGES ├── CMakeLists.txt ├── LICENSE ├── Makefile.am ├── README.rst ├── android │ └── jansson_config.h ├── cmake │ ├── CheckFunctionKeywords.cmake │ ├── FindSphinx.cmake │ ├── JanssonConfig.cmake.in │ ├── JanssonConfigVersion.cmake.in │ ├── jansson_config.h.cmake │ └── jansson_private_config.h.cmake ├── compile ├── config.guess ├── config.sub ├── configure.ac ├── depcomp ├── doc │ ├── Makefile.am │ ├── README │ ├── apiref.rst │ ├── changes.rst │ ├── conf.py │ ├── conformance.rst │ ├── ext │ │ └── refcounting.py │ ├── gettingstarted.rst │ ├── github_commits.c │ ├── index.rst │ ├── portability.rst │ ├── tutorial.rst │ └── upgrading.rst ├── install-sh ├── jansson.pc.in ├── jansson_private_config.h.in ├── missing ├── mmake.mk ├── src │ ├── Makefile.am │ ├── dump.c │ ├── error.c │ ├── hashtable.c │ ├── hashtable.h │ ├── hashtable_seed.c │ ├── jansson.def │ ├── jansson.h │ ├── jansson_config.h │ ├── jansson_config.h.in │ ├── jansson_private.h │ ├── load.c │ ├── lookup3.h │ ├── memory.c │ ├── pack_unpack.c │ ├── strbuffer.c │ ├── strbuffer.h │ ├── strconv.c │ ├── utf.c │ ├── utf.h │ └── value.c ├── test-driver └── test │ ├── Makefile.am │ ├── bin │ ├── Makefile.am │ └── json_process.c │ ├── run-suites │ ├── scripts │ ├── run-tests.sh │ └── valgrind.sh │ └── suites │ ├── Makefile.am │ ├── api │ ├── Makefile.am │ ├── check-exports │ ├── run │ ├── test_array.c │ ├── test_copy.c │ ├── test_dump.c │ ├── test_dump_callback.c │ ├── test_equal.c │ ├── test_load.c │ ├── test_load_callback.c │ ├── test_loadb.c │ ├── test_memory_funcs.c │ ├── test_number.c │ ├── test_object.c │ ├── test_pack.c │ ├── test_simple.c │ ├── test_unpack.c │ └── util.h │ ├── invalid-unicode │ ├── encoded-surrogate-half │ │ ├── error │ │ └── input │ ├── invalid-utf-8-after-backslash │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-array │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-bigger-int │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-escape │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-exponent │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-identifier │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-int │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-real-after-e │ │ ├── error │ │ └── input │ ├── invalid-utf-8-in-string │ │ ├── error │ │ └── input │ ├── lone-invalid-utf-8 │ │ ├── error │ │ └── input │ ├── lone-utf-8-continuation-byte │ │ ├── error │ │ └── input │ ├── not-in-unicode-range │ │ ├── error │ │ └── input │ ├── overlong-3-byte-encoding │ │ ├── error │ │ └── input │ ├── overlong-4-byte-encoding │ │ ├── error │ │ └── input │ ├── overlong-ascii-encoding │ │ ├── error │ │ └── input │ ├── restricted-utf-8 │ │ ├── error │ │ └── input │ ├── run │ └── truncated-utf-8 │ │ ├── error │ │ └── input │ ├── invalid │ ├── apostrophe │ │ ├── error │ │ └── input │ ├── ascii-unicode-identifier │ │ ├── error │ │ └── input │ ├── brace-comma │ │ ├── error │ │ └── input │ ├── bracket-comma │ │ ├── error │ │ └── input │ ├── bracket-one-comma │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── empty │ │ ├── error │ │ └── input │ ├── extra-comma-in-array │ │ ├── error │ │ └── input │ ├── extra-comma-in-multiline-array │ │ ├── error │ │ └── input │ ├── garbage-after-newline │ │ ├── error │ │ └── input │ ├── garbage-at-the-end │ │ ├── error │ │ └── input │ ├── integer-starting-with-zero │ │ ├── error │ │ └── input │ ├── invalid-escape │ │ ├── error │ │ └── input │ ├── invalid-identifier │ │ ├── error │ │ └── input │ ├── invalid-negative-integer │ │ ├── error │ │ └── input │ ├── invalid-negative-real │ │ ├── error │ │ └── input │ ├── invalid-second-surrogate │ │ ├── error │ │ └── input │ ├── lone-open-brace │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── lone-open-bracket │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── lone-second-surrogate │ │ ├── error │ │ └── input │ ├── minus-sign-without-number │ │ ├── error │ │ └── input │ ├── negative-integer-starting-with-zero │ │ ├── error │ │ └── input │ ├── null-byte-in-object-key │ │ ├── error │ │ └── input │ ├── null-byte-in-string │ │ ├── error │ │ ├── input │ │ └── nostrip │ ├── null-byte-outside-string │ │ ├── error │ │ ├── input │ │ └── nostrip │ ├── null │ │ ├── error │ │ └── input │ ├── object-apostrophes │ │ ├── error │ │ └── input │ ├── object-garbage-at-end │ │ ├── error │ │ └── input │ ├── object-in-unterminated-array │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── object-no-colon │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── object-no-value │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── object-unterminated-value │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── real-garbage-after-e │ │ ├── error │ │ └── input │ ├── real-negative-overflow │ │ ├── error │ │ └── input │ ├── real-positive-overflow │ │ ├── error │ │ └── input │ ├── real-truncated-at-e │ │ ├── error │ │ └── input │ ├── real-truncated-at-point │ │ ├── error │ │ └── input │ ├── run │ ├── tab-character-in-string │ │ ├── error │ │ └── input │ ├── too-big-negative-integer │ │ ├── error │ │ └── input │ ├── too-big-positive-integer │ │ ├── error │ │ └── input │ ├── truncated-unicode-surrogate │ │ ├── error │ │ └── input │ ├── unicode-identifier │ │ ├── error │ │ └── input │ ├── unterminated-array-and-object │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── unterminated-array │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── unterminated-empty-key │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── unterminated-key │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ ├── unterminated-object-and-array │ │ ├── error │ │ └── input │ └── unterminated-string │ │ ├── error.normal │ │ ├── error.strip │ │ └── input │ └── valid │ ├── complex-array │ ├── env │ ├── input │ └── output │ ├── empty-array │ ├── input │ └── output │ ├── empty-object-in-array │ ├── input │ └── output │ ├── empty-object │ ├── input │ └── output │ ├── empty-string │ ├── input │ └── output │ ├── escaped-utf-control-char │ ├── input │ └── output │ ├── false │ ├── input │ └── output │ ├── negative-int │ ├── input │ └── output │ ├── negative-one │ ├── input │ └── output │ ├── negative-zero │ ├── input │ └── output │ ├── null │ ├── input │ └── output │ ├── one-byte-utf-8 │ ├── input │ └── output │ ├── real-capital-e-negative-exponent │ ├── input │ └── output │ ├── real-capital-e-positive-exponent │ ├── input │ └── output │ ├── real-capital-e │ ├── input │ └── output │ ├── real-exponent │ ├── input │ └── output │ ├── real-fraction-exponent │ ├── input │ └── output │ ├── real-negative-exponent │ ├── input │ └── output │ ├── real-positive-exponent │ ├── input │ └── output │ ├── real-subnormal-number │ ├── input │ └── output │ ├── real-underflow │ ├── input │ └── output │ ├── run │ ├── short-string │ ├── input │ └── output │ ├── simple-ascii-string │ ├── input │ └── output │ ├── simple-int-0 │ ├── input │ └── output │ ├── simple-int-1 │ ├── input │ └── output │ ├── simple-int-123 │ ├── input │ └── output │ ├── simple-object │ ├── input │ └── output │ ├── simple-real │ ├── input │ └── output │ ├── string-escapes │ ├── input │ └── output │ ├── three-byte-utf-8 │ ├── input │ └── output │ ├── true │ ├── input │ └── output │ ├── two-byte-utf-8 │ ├── input │ └── output │ ├── utf-8-string │ ├── input │ └── output │ └── utf-surrogate-four-byte-encoding │ ├── input │ └── output ├── jni ├── OnloadExt.java ├── OnloadTemplateSend.java ├── OnloadZeroCopy.java ├── README └── libOnloadExt.c ├── mmake.mk ├── onload_remote_monitor ├── ftl_decls.h ├── ftl_defs.h ├── mmake.mk ├── onload_remote_monitor └── orm_json.c ├── sfcaffinity ├── mmake.mk └── sfcaffinity_tool.c └── solar_clusterd ├── __init__.py ├── cluster_protocol.c ├── daemonize.py ├── example.conf ├── filter_string.c ├── internal.h ├── logger.py ├── mmake.mk ├── parse_config.py ├── setup.py └── solar_clusterd /mk/linux_kbuild.mk: -------------------------------------------------------------------------------- 1 | MMAKE_IN_KBUILD := 1 2 | 3 | # A makefile called Kbuild should override the mmake-generated Makefile, 4 | # but Linux <2.6.10 does not look for that. 5 | ifneq ($(wildcard $(obj)/Kbuild),) 6 | include $(obj)/Kbuild 7 | else 8 | 9 | include $(TOPPATH)/mk/platform/$(PLATFORM).mk 10 | 11 | EXTRA_CPPFLAGS += -I$(TOPPATH)/src/include -I$(BUILDPATH)/include \ 12 | -I$(BUILDPATH) -I$(TOPPATH)/$(CURRENT) -D__ci_driver__ 13 | ifdef NDEBUG 14 | EXTRA_CPPFLAGS += -DNDEBUG 15 | endif 16 | ifndef MMAKE_LIBERAL 17 | EXTRA_CFLAGS += -Werror 18 | endif # MMAKE_LIBERAL 19 | 20 | ifndef NDEBUG 21 | EXTRA_CFLAGS += -g 22 | endif 23 | 24 | ifdef OFE_TREE 25 | EXTRA_CPPFLAGS += -I$(OFE_TREE)/include 26 | # -DONLOAD_OFE is necessary for Onload code 27 | # (and may be renamed if needed) 28 | # -DOFE_ONLOAD is necessary for OFE includes, do not rename it unless 29 | # you are fixing OFE tree also. 30 | EXTRA_CPPFLAGS += -DONLOAD_OFE -DOFE_ONLOAD 31 | endif 32 | 33 | EXTRA_CFLAGS += $(MMAKE_CFLAGS) $(EXTRA_CPPFLAGS) 34 | EXTRA_AFLAGS += $(EXTRA_CPPFLAGS) 35 | 36 | endif # Kbuild exists 37 | -------------------------------------------------------------------------------- /mk/makefile.copy.depends: -------------------------------------------------------------------------------- 1 | 2 | TARGETS := 3 | 4 | all: _all 5 | 6 | -include copy.depends 7 | 8 | _all: $(TARGETS) 9 | 10 | 11 | clean: 12 | rm -rf $(TARGETS) 13 | 14 | 15 | -------------------------------------------------------------------------------- /mk/platform/buxton_sienamc.mk: -------------------------------------------------------------------------------- 1 | SIENA_MC_PLATFORM_DEFINE := SIENA_MC_PLATFORM_BUXTON=1 2 | NETWORK_PORTS := 2 3 | MC_PLATFORM_DEFS := florence.c 4 | MC_DRIVER_DEFS := max6646.c qt2025c.c null_phy.c 5 | # The QT2025 is booted over MDIO 6 | WITH_MDIO_BOOT := 1 7 | include $(TOP)/mk/platform/sienamc_asic.mk 8 | -------------------------------------------------------------------------------- /mk/platform/falcon_b0_gnu.mk: -------------------------------------------------------------------------------- 1 | include $(TOP)/mk/platform/falcon_gnu.mk 2 | -------------------------------------------------------------------------------- /mk/platform/falcon_b0_gnu_x86_64.mk: -------------------------------------------------------------------------------- 1 | include $(TOP)/mk/platform/falcon_gnu_x86_64.mk 2 | 3 | -------------------------------------------------------------------------------- /mk/platform/falcon_b0_linux2.6.mk: -------------------------------------------------------------------------------- 1 | include $(TOPPATH)/mk/platform/falcon_linux2.6.mk 2 | -------------------------------------------------------------------------------- /mk/platform/falcon_gnu.mk: -------------------------------------------------------------------------------- 1 | include $(TOP)/mk/platform/gnu.mk 2 | -------------------------------------------------------------------------------- /mk/platform/falcon_gnu_x86_64.mk: -------------------------------------------------------------------------------- 1 | include $(TOP)/mk/platform/gnu_x86_64.mk 2 | -------------------------------------------------------------------------------- /mk/platform/falcon_linux2.6.mk: -------------------------------------------------------------------------------- 1 | include $(TOPPATH)/mk/platform/linux2.6.mk 2 | -------------------------------------------------------------------------------- /mk/platform/falcon_x86_wxp.mk: -------------------------------------------------------------------------------- 1 | # Set-up build tree configuration 2 | WINDOWS := 1 3 | DRIVER := 1 4 | DRIVER_TYPE := wxp 5 | DRIVER_SIZE := 32 6 | 7 | # Ensure MMAKE_TOOLCHAIN, MMAKE_DISTFILES and MMAKE_FIRMWARE are set 8 | export MMAKE_TOOLCHAIN 9 | export MMAKE_DISTFILES 10 | export MMAKE_FIRMWARE 11 | ifndef MMAKE_TOOLCHAIN 12 | MMAKE_TOOLCHAIN := wlh 13 | endif 14 | ifndef MMAKE_DISTFILES 15 | MMAKE_DISTFILES := $(TOP)/../distfiles 16 | endif 17 | ifndef MMAKE_FIRMWARE 18 | MMAKE_FIRMWARE := $(TOP)/../firmware 19 | endif 20 | 21 | 22 | # Include tool-chain specific setup and configuration section 23 | include $(TOP)/mk/wdk_$(MMAKE_TOOLCHAIN)_toolchain.mk 24 | 25 | # Include common DDK/WDK section 26 | include $(TOP)/mk/wdk_common.mk 27 | -------------------------------------------------------------------------------- /mk/platform/gnu.mk: -------------------------------------------------------------------------------- 1 | GNU := 1 2 | ifndef MMAKE_CTUNE 3 | MMAKE_CTUNE = "-msse" 4 | # Not all gcc's support -mtune=native, so we do a dummy invocation with that 5 | # argument and only use the argument if the gcc invocation doesn't fail. 6 | # Note that gcc takes empty STDIN, is told it is C (with -x c) and will create an output executable! 7 | # Then use cond && a || b in order to set MMAKE_CTUNE := "-mtune=native" if the test compile worked 8 | MMAKE_CTUNE += $(shell $(CC) -x c -c -march=core2 - -o /dev/null /dev/null 2>&1 && echo "-march=core2" || echo "") 9 | MMAKE_CTUNE += $(shell $(CC) -x c -c -mtune=native - -o /dev/null /dev/null 2>&1 && echo "-mtune=native" || echo "") 10 | endif 11 | MMAKE_CARCH := -m32 $(MMAKE_CTUNE) 12 | include $(TOP)/mk/linux_gcc.mk 13 | -------------------------------------------------------------------------------- /mk/platform/gnu_ppc32.mk: -------------------------------------------------------------------------------- 1 | GNU := 1 2 | ifndef MMAKE_CTUNE 3 | # Not all gcc's support -mtune=native, so we do a dummy invocation with that 4 | # argument and only use the argument if the gcc invocation doesn't fail. 5 | # Note that gcc takes empty STDIN, is told it is C (with -x c) and will create an output executable! 6 | # Then use cond && a || b in order to set MMAKE_CTUNE := "-mtune=native" if the test compile worked 7 | MMAKE_CTUNE := $(shell $(CC) -x c -c -mtune=native - -o /dev/null /dev/null 2>&1 && echo "-mtune=native" || echo "") 8 | endif 9 | MMAKE_CARCH := -m32 -mcpu=power7 $(MMAKE_CTUNE) 10 | include $(TOP)/mk/linux_gcc.mk 11 | -------------------------------------------------------------------------------- /mk/platform/gnu_ppc64.mk: -------------------------------------------------------------------------------- 1 | GNU := 1 2 | ifndef MMAKE_CTUNE 3 | # Not all gcc's support -mtune=native, so we do a dummy invocation with that 4 | # argument and only use the argument if the gcc invocation doesn't fail. 5 | # Note that gcc takes empty STDIN, is told it is C (with -x c) and will create an output executable! 6 | # Then use cond && a || b in order to set MMAKE_CTUNE := "-mtune=native" if the test compile worked 7 | MMAKE_CTUNE := $(shell $(CC) -x c -c -mtune=native - -o /dev/null /dev/null 2>&1 && echo "-mtune=native" || echo "") 8 | endif 9 | MMAKE_CARCH := -m64 -mcpu=power7 $(MMAKE_CTUNE) 10 | include $(TOP)/mk/linux_gcc.mk 11 | -------------------------------------------------------------------------------- /mk/platform/gnu_x86_64.mk: -------------------------------------------------------------------------------- 1 | GNU := 1 2 | ifndef MMAKE_CTUNE 3 | # Not all gcc's support -mtune=native, so we do a dummy invocation with that 4 | # argument and only use the argument if the gcc invocation doesn't fail. 5 | # Note that gcc takes empty STDIN, is told it is C (with -x c) and will create an output executable! 6 | # Then use cond && a || b in order to set MMAKE_CTUNE := "-mtune=native" if the test compile worked 7 | MMAKE_CTUNE := $(shell $(CC) -x c -c -mtune=native - -o /dev/null /dev/null 2>&1 && echo "-mtune=native" || echo "") 8 | endif 9 | MMAKE_CARCH := -m64 $(MMAKE_CTUNE) 10 | include $(TOP)/mk/linux_gcc.mk 11 | -------------------------------------------------------------------------------- /mk/platform/linux_uio_utils.mk: -------------------------------------------------------------------------------- 1 | LINUX_UIO_UTILS := 1 2 | -------------------------------------------------------------------------------- /mk/site/ciapp.mk: -------------------------------------------------------------------------------- 1 | 2 | lib_ver := 1 3 | lib_name := ciapp 4 | lib_where := lib/ciapp 5 | CIAPP_LIB := $(MMakeGenerateLibTarget) 6 | CIAPP_LIB_DEPEND := $(MMakeGenerateLibDepend) 7 | LINK_CIAPP_LIB := $(MMakeGenerateLibLink) 8 | 9 | -------------------------------------------------------------------------------- /mk/site/ciip.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 0 2 | lib_name := ciip 3 | lib_where := lib/transport/ip 4 | CIIP_LIB := $(MMakeGenerateLibTarget) 5 | CIIP_LIB_DEPEND := $(MMakeGenerateLibDepend) 6 | LINK_CIIP_LIB := $(MMakeGenerateLibLink) 7 | 8 | -------------------------------------------------------------------------------- /mk/site/ciiscsi.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 1 2 | lib_name := ciiscsi 3 | lib_where := lib/iscsi 4 | CIISCSI_LIB := $(MMakeGenerateLibTarget) 5 | CIISCSI_LIB_DEPEND := $(MMakeGenerateLibDepend) 6 | LINK_CIISCSI_LIB := $(MMakeGenerateLibLink) 7 | 8 | -------------------------------------------------------------------------------- /mk/site/citools.mk: -------------------------------------------------------------------------------- 1 | 2 | lib_ver := 1 3 | 4 | ifeq ($(DRIVER),1) 5 | lib_name := citools-drv 6 | else 7 | lib_name := citools 8 | endif 9 | 10 | lib_where := lib/citools 11 | CITOOLS_LIB := $(MMakeGenerateLibTarget) 12 | CITOOLS_LIB_DEPEND := $(MMakeGenerateLibDepend) 13 | LINK_CITOOLS_LIB := $(MMakeGenerateLibLink) 14 | ifeq ($(SOLARIS),1) 15 | # libkstat for libcitool get_cpu_khz 16 | LINK_CITOOLS_LIB += -lkstat 17 | endif 18 | -------------------------------------------------------------------------------- /mk/site/citpcommon.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 0 2 | lib_name := citpcommon 3 | lib_where := lib/transport/common 4 | CITPCOMMON_LIB := $(MMakeGenerateLibTarget) 5 | CITPCOMMON_LIB_DEPEND := $(MMakeGenerateLibDepend) 6 | LINK_CITPCOMMON_LIB := $(MMakeGenerateLibLink) 7 | -------------------------------------------------------------------------------- /mk/site/ciul.mk: -------------------------------------------------------------------------------- 1 | # The libciul static library. 2 | lib_ver := 1 3 | ifeq ($(DRIVER),1) 4 | lib_name := ciul-drv 5 | else 6 | lib_name := ciul 7 | endif 8 | lib_where := lib/ciul 9 | CIUL_LIB := $(MMakeGenerateLibTarget) 10 | CIUL_LIB_DEPEND := $(MMakeGenerateLibDepend) 11 | LINK_CIUL_LIB := $(MMakeGenerateLibLink) 12 | 13 | # The libciul dynamic library. 14 | # 15 | # As things stand, it is very difficult to make libciul compatible between 16 | # releases, because the internals of the data structures are exposed. That 17 | # means that almost any non-trivial change to ef_vi should cause the MAJOR 18 | # version number to be incremented. 19 | lib_maj := 1 20 | lib_min := 1 21 | lib_mic := 1 22 | CIUL_REALNAME := $(MMakeGenerateDllRealname) 23 | CIUL_SONAME := $(MMakeGenerateDllSoname) 24 | CIUL_LINKNAME := $(MMakeGenerateDllLinkname) 25 | LINK_CIUL_DLIB := $(MMakeGenerateDllLink) 26 | 27 | lib_name := efvi 28 | lib_where := lib/efvi 29 | EFVI_LIB := $(MMakeGenerateLibTarget) 30 | EFVI_LIB_DEPEND := $(MMakeGenerateLibDepend) 31 | LINK_EFVI_LIB := $(MMakeGenerateLibLink) 32 | -------------------------------------------------------------------------------- /mk/site/driverlib.mk: -------------------------------------------------------------------------------- 1 | 2 | lib_ver := 1 3 | lib_name := efab 4 | lib_where := driver/ul 5 | EFAB_LIB := $(MMakeGenerateLibTarget) 6 | EFAB_LIB_DEPEND := $(MMakeGenerateLibDepend) 7 | LINK_EFAB_LIB := $(MMakeGenerateLibLink) 8 | 9 | ifeq ($(LINUX),1) 10 | LINK_EFAB_LIB += -lpci -lz 11 | endif 12 | 13 | ifeq ($(FREEBSD),1) 14 | LINK_EFAB_LIB += -lpci -L/usr/local/lib -lz 15 | endif 16 | -------------------------------------------------------------------------------- /mk/site/efhw.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 1 2 | lib_name := efhw 3 | lib_where := lib/efhw 4 | EFHW_LIB := $(MMakeGenerateLibTarget) 5 | EFHW_LIB_DEPEND := $(MMakeGenerateLibDepend) 6 | LINK_EFHW_LIB := $(MMakeGenerateLibLink) 7 | -------------------------------------------------------------------------------- /mk/site/efhwdef.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 1 2 | lib_name := efhwdef 3 | lib_where := lib/efhwdef 4 | EFHWDEF_LIB := $(MMakeGenerateLibTarget) 5 | EFHWDEF_LIB_DEPEND := $(MMakeGenerateLibDepend) 6 | LINK_EFHWDEF_LIB := $(MMakeGenerateLibLink) 7 | -------------------------------------------------------------------------------- /mk/site/efrm.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 1 2 | lib_name := efrm 3 | lib_where := lib/efrm 4 | EFRM_LIB := $(MMakeGenerateLibTarget) 5 | EFRM_LIB_DEPEND := $(MMakeGenerateLibDepend) 6 | LINK_EFRM_LIB := $(MMakeGenerateLibLink) 7 | -------------------------------------------------------------------------------- /mk/site/efthrm.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 1 2 | lib_name := efthrm 3 | lib_where := lib/efthrm 4 | EFTHRM_LIB := $(MMakeGenerateLibTarget) 5 | EFTHRM_LIB_DEPEND := $(MMakeGenerateLibDepend) 6 | LINK_EFTHRM_LIB := $(MMakeGenerateLibLink) 7 | -------------------------------------------------------------------------------- /mk/site/mmake.mk: -------------------------------------------------------------------------------- 1 | include $(BUILD)/config.mk 2 | ifeq ($(DESTFLAG),1) 3 | include $(DESTPATH)/options_config.mk 4 | else 5 | include $(BUILD)/options_config.mk 6 | endif 7 | include $(TOP)/mk/before.mk 8 | include $(TOP)/mk/platform/$(PLATFORM).mk 9 | ifneq ($(MMAKEBUILDTREE),1) 10 | include $(TOP)/mk/site/citools.mk 11 | include $(TOP)/mk/site/ciapp.mk 12 | include $(TOP)/mk/site/ciul.mk 13 | include $(TOP)/mk/site/ciip.mk 14 | include $(TOP)/mk/site/ciiscsi.mk 15 | include $(TOP)/mk/site/citpcommon.mk 16 | include $(TOP)/mk/site/efrm.mk 17 | include $(TOP)/mk/site/efhwdef.mk 18 | include $(TOP)/mk/site/efthrm.mk 19 | include $(TOP)/mk/site/libs.mk 20 | include $(TOP)/mk/site/driverlib.mk 21 | include $(TOP)/mk/site/sfgpxe.mk 22 | include $(TOP)/mk/site/efhw.mk 23 | endif 24 | include $(TOP)/mk/middle.mk 25 | -------------------------------------------------------------------------------- /mk/site/mpi.mk: -------------------------------------------------------------------------------- 1 | 2 | CC := mpicc 3 | CFLAGS := -Wall -g $(INCLUDES) 4 | CXX := mpiCC 5 | CXXFLAGS:= $(CFLAGS) 6 | LIBS := $(addprefix -L,$(dir $(LIBS))) $(addprefix -l,$(notdir $(basename $(LIBS)))) 7 | 8 | %: %.c 9 | $(CC) $(CFLAGS) $(CPPFLAGS) $^ $(LIBS) -o $@ 10 | 11 | -------------------------------------------------------------------------------- /mk/site/sfgpxe.mk: -------------------------------------------------------------------------------- 1 | lib_ver := 1 2 | lib_name := sfgpxe 3 | lib_where := lib/sfgpxe 4 | 5 | SFGPXE_LIB := $(MMakeGenerateLibTarget) 6 | SFGPXE_LIB_DEPEND := $(MMakeGenerateLibDepend) 7 | LINK_SFGPXE_LIB := $(MMakeGenerateLibLink) 8 | 9 | -------------------------------------------------------------------------------- /scripts/check_binary_presence: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | binary="$1" 4 | if command -v $binary >/dev/null 2>$1; then 5 | echo 1 6 | else 7 | echo "WARNING: Failed to find $binary in path" >&2 8 | echo 0 9 | fi 10 | -------------------------------------------------------------------------------- /scripts/check_library_presence: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if header+library are available. 4 | header=$1 5 | lib=$2 6 | dir=$(mktemp -d) 7 | 8 | cat >$dir/checklib.c </dev/null; then 13 | echo 1 14 | else 15 | echo "Failed to find lib$lib with header $header" >&2 16 | echo 0 17 | fi 18 | 19 | rm -rf $dir 20 | -------------------------------------------------------------------------------- /scripts/check_prototype: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Check whether symbol in header matches given prototype 4 | # 5 | #Check is done with _GNU_SOURCE defined. 6 | #Symbol prototype should be definition of function pointer of name foo. 7 | 8 | headers=$1 9 | symbol=$2 10 | prototype=$3 11 | 12 | dir=$(mktemp -d) 13 | 14 | cat >$dir/checkprototype.c </dev/null ; then 24 | echo 1 25 | else 26 | echo 0 27 | fi 28 | 29 | rm -rf $dir 30 | -------------------------------------------------------------------------------- /scripts/mmake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ###################################################################### 3 | # (c) 2002 Cambridge Internetworking Ltd. 4 | # Author: David Riddoch 5 | # 6 | # A 'make' wrapper 7 | ###################################################################### 8 | 9 | . "$(dirname "$0")/sh/fns" 10 | . "$bin/sh/mmake-fns" 11 | 12 | ###################################################################### 13 | # main() 14 | 15 | # Put this mmake (and associated scripts) at front of PATH. 16 | export PATH="$bin:$PATH" 17 | 18 | 19 | # Parse args. 20 | # ?? Fixme: add usage, verbose option... 21 | args= 22 | while [ $# -gt 0 ]; do 23 | case "$1" in 24 | -C) shift 25 | [ -d "$1" ] || 26 | { mkdir -p "$1" || fail "Failed to: mkdir -p '$1'"; } 27 | cd "$1" || fail "Failed to: cd '$1'" 28 | ;; 29 | *) args="$args $1" 30 | ;; 31 | esac 32 | shift 33 | done 34 | 35 | # Use gnumake if it exists, otherwise make. 36 | [ -z "$MMAKE_MAKE" ] && { 37 | MMAKE_MAKE=gmake 38 | which "$MMAKE_MAKE" &>/dev/null || MMAKE_MAKE=make 39 | which "$MMAKE_MAKE" &>/dev/null || 40 | fail "Cannot find a make command. Please define MMAKE_MAKE." 41 | } 42 | 43 | # Setup make variables. 44 | orient-in-build-tree || fail "Not in a mmake build tree" 45 | 46 | [ -f "$TOP/mk/platform/$PLATFORM.mk" ] || fail "No such platform '$PLATFORM' $PWD/$TOP/mk/platform/" 47 | 48 | "$MMAKE_MAKE" -r -f "$TOP/mk/site/mmake.mk" "MAKE=mmake" "TOP=$TOP" \ 49 | "TOPPATH=$TOPPATH" \ 50 | "BUILD=$BUILD" "BUILDPATH=$BUILDPATH" "CURRENT=$CURRENT" \ 51 | "PLATFORM=$PLATFORM" "THISDIR=$THISDIR" "VPATH=$VPATH" $args 52 | 53 | -------------------------------------------------------------------------------- /scripts/onload_apps/sfnt-pingpong: -------------------------------------------------------------------------------- 1 | onload_import latency 2 | -------------------------------------------------------------------------------- /scripts/onload_apps/sfnt-stream: -------------------------------------------------------------------------------- 1 | onload_import latency 2 | onload_set EF_STACK_PER_THREAD 1 3 | -------------------------------------------------------------------------------- /scripts/onload_misc/onload-extract-notes: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###################################################################### 3 | 4 | me=$(basename "$0") 5 | err() { echo >&2 "$*"; } 6 | log() { err "$me: $*"; } 7 | fail() { log "FAILED: $*"; exit 1; } 8 | try() { "$@" || fail "$*"; } 9 | 10 | ###################################################################### 11 | # main() 12 | 13 | tgz="$1" 14 | try [ -f "$tgz" ] 15 | dir=${tgz%.tgz} 16 | try tar xf "$tgz" 17 | try [ -d "$dir" ] 18 | try mv "$dir/ChangeLog" "$dir-ChangeLog.txt" 19 | try mv "$dir/ReleaseNotes" "$dir-ReleaseNotes.txt" 20 | try mv "$dir/README" "$dir-README.txt" 21 | try rm -r "$dir" 22 | -------------------------------------------------------------------------------- /scripts/onload_misc/onload_depmod.conf: -------------------------------------------------------------------------------- 1 | # Ensure that drivers provided by Onload install override any that came 2 | # with the kernel. 3 | override sfc * weak-updates 4 | override sfc * extra 5 | -------------------------------------------------------------------------------- /scripts/onload_misc/onload_init_rc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: 35 50 50 3 | # description: OpenOnload initialisation 4 | ### BEGIN INIT INFO 5 | # Provides: openonload 6 | # Required-Start: $network 7 | # Required-Stop: 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 10 | ### END INIT INFO 11 | 12 | case "$1" in 13 | start) 14 | /sbin/modprobe onload 15 | /sbin/onload_tool mknod sfc_char 16 | /sbin/onload_tool mknod onload 17 | /sbin/onload_tool mknod onload onload_epoll 18 | /sbin/modprobe sfc_affinity 19 | /sbin/onload_tool mknod sfc_affinity 20 | # TODO: Configure sfc_affinity. 21 | #/usr/sbin/sfcaffinity_config auto 22 | ;; 23 | *) 24 | ;; 25 | esac 26 | exit 0 27 | -------------------------------------------------------------------------------- /scripts/onload_misc/onload_modprobe.conf: -------------------------------------------------------------------------------- 1 | # onload_start 2 | # 3 | # This file is part of OpenOnload(tm). 4 | # 5 | # We recommend you do not edit this file. To add custom module options 6 | # create a new file in /etc/modprobe.d/. 7 | # 8 | install onload /sbin/modprobe --ignore-install onload $CMDLINE_OPTS \ 9 | $(/sbin/onload_tool mod_params onload) && \ 10 | /sbin/onload_tool mknod onload && \ 11 | /sbin/onload_tool mknod onload onload_epoll 12 | 13 | remove onload /sbin/modprobe -r --ignore-remove onload && \ 14 | /bin/rm -f /dev/onload /dev/onload_epoll 15 | 16 | install sfc_char /sbin/modprobe --ignore-install sfc_char $CMDLINE_OPTS && \ 17 | /sbin/onload_tool mknod sfc_char 18 | 19 | remove sfc_char /sbin/modprobe -r --ignore-remove sfc_char && \ 20 | /bin/rm -f /dev/sfc_char 21 | 22 | install sfc /sbin/modprobe --ignore-install sfc $CMDLINE_OPTS && \ 23 | /sbin/modprobe onload; \ 24 | if [ -e /lib/modules/$(uname -r)/extra/sfc_aoe.ko ]; then \ 25 | /sbin/modprobe sfc_aoe; \ 26 | fi 27 | 28 | install sfc_affinity /sbin/modprobe --ignore-install sfc_affinity \ 29 | $CMDLINE_OPTS && \ 30 | /sbin/onload_tool mknod sfc_affinity 31 | 32 | remove sfc_affinity /sbin/modprobe -r --ignore-remove sfc_affinity && \ 33 | /bin/rm -f /dev/sfc_affinity 34 | # onload_end 35 | -------------------------------------------------------------------------------- /scripts/onload_misc/onload_sysconfig: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # 3 | # Settings for the OpenOnload drivers. 4 | # 5 | # OpenOnload is a middleware that accelerates network performance. See 6 | # http://www.openonload.org/ for details. 7 | # 8 | ############################################################################ 9 | 10 | # OpenOnload permissions. 11 | # 12 | # The following settings control the permissions applied to /dev/onload. 13 | # This controls which users can make use of OpenOnload acceleration. 14 | 15 | ONLOAD_USER=root 16 | ONLOAD_GROUP=root 17 | ONLOAD_MODE=666 18 | 19 | 20 | # ef_vi permissions. 21 | # 22 | # The following settings control the permissions applied to /dev/sfc_char. 23 | # This controls which users can make use of the ef_vi interface. 24 | 25 | SFC_CHAR_USER=root 26 | SFC_CHAR_GROUP=root 27 | SFC_CHAR_MODE=666 28 | 29 | 30 | # sfc_affinity permissions. 31 | # 32 | # The following settings control the permissions applied to 33 | # /dev/sfc_affinity. This controls which users can make use of the 34 | # sfc_affinity features. 35 | 36 | SFC_AFFINITY_USER=root 37 | SFC_AFFINITY_GROUP=root 38 | SFC_AFFINITY_MODE=666 39 | 40 | 41 | # Onload whitelist and blacklist 42 | # 43 | # The following control which interfaces are whitelisted and 44 | # blacklisted for Onload acceleration. They each take a string of 45 | # space-separated interface names. If an interface appears in the 46 | # blacklist then it will not be accelerated by Onload. If the 47 | # whitelist is non-empty then only interfaces in the whitelist will be 48 | # accelerated. 49 | 50 | ONLOAD_WHITELIST= 51 | ONLOAD_BLACKLIST= 52 | -------------------------------------------------------------------------------- /scripts/onload_misc/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | setup(name='OpenOnload utilities', 3 | version='1.0', 4 | author='David Riddoch', 5 | author_email='driddoch@solarflare.com', 6 | url='http://www.openonload.org/', 7 | py_modules=['sfcmask', 'sfcaffinity'], 8 | ) 9 | -------------------------------------------------------------------------------- /scripts/onload_misc/sfc_aoe_modprobe.conf: -------------------------------------------------------------------------------- 1 | # onload_aoe_start 2 | # 3 | # This file is part of OpenOnload(tm). 4 | # 5 | # We recommend you do not edit this file. To add custom module options 6 | # create a new file in /etc/modprobe.d/. 7 | # 8 | 9 | install sfc_aoe /sbin/modprobe --ignore-install sfc_aoe $CMDLINE_OPTS && \ 10 | /sbin/onload_tool mknod sfc_aoe 11 | 12 | remove sfc_aoe /sbin/modprobe -r --ignore-remove sfc_aoe && \ 13 | /bin/rm -f /dev/sfc_aoe 14 | 15 | # onload_aoe_end 16 | -------------------------------------------------------------------------------- /scripts/onload_profiles/latency.opf: -------------------------------------------------------------------------------- 1 | # OpenOnload low latency profile. 2 | 3 | # Enable polling / spinning. When the application makes a blocking call 4 | # such as recv() or poll(), this causes Onload to busy wait for up to 100ms 5 | # before blocking. 6 | # 7 | onload_set EF_POLL_USEC 100000 8 | 9 | # Disable FASTSTART when connection is new or has been idle for a while. 10 | # The additional acks it causes add latency on the receive path. 11 | onload_set EF_TCP_FASTSTART_INIT 0 12 | onload_set EF_TCP_FASTSTART_IDLE 0 13 | 14 | # Use a large initial congestion window so that the slow-start algorithm 15 | # doesn't cause delays. We don't enable this by default because it breaks 16 | # the TCP specs, and could cause congestion in your network. Uncomment if 17 | # you think you need this. 18 | # 19 | ##onload_set EF_TCP_INITIAL_CWND 100000 20 | 21 | # When TCP_NODELAY is used, always kick packets out immediately. This is 22 | # not enabled by default because most apps benefit from the default 23 | # behaviour. 24 | # 25 | ##onload_set EF_NONAGLE_INFLIGHT_MAX 65535 26 | -------------------------------------------------------------------------------- /scripts/onload_profiles/zeromq.opf: -------------------------------------------------------------------------------- 1 | # OpenOnload profile for applications using zeromq. 2 | 3 | # Zeromq uses unix sockets for inter-thread communication, and blocks using 4 | # poll() and epoll(). The following options ensure that the messages 5 | # passed through unix sockets are not delayed. 6 | onload_set EF_POLL_FAST_USEC 0 7 | onload_set EF_POLL_NONBLOCK_FAST_USEC 0 8 | 9 | # We also recommend that you use the latency profile. 10 | -------------------------------------------------------------------------------- /scripts/sfcaffinity: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ###################################################################### 3 | # Copyright 2010 Solarflare Communications Inc. 4 | # Description: Runs an application with sfcaffinity support. 5 | # Author: David Riddoch 6 | # Started: 2010/01/11 7 | ###################################################################### 8 | 9 | me=$(basename "$0") 10 | 11 | err() { echo >&2 "$*"; } 12 | log() { err "$me: $*"; } 13 | vlog() { $verbose && log "$*"; } 14 | fail() { log "$*"; exit 1; } 15 | rawecho() { echo -E "x$*" | sed 's/^x//'; } 16 | 17 | 18 | preload=libsfcaffinity.so 19 | rawecho "$LD_PRELOAD" | grep -q "$(basename "$preload")" || { 20 | if [ -z "$LD_PRELOAD" ]; then 21 | LD_PRELOAD="$preload"; export LD_PRELOAD 22 | else 23 | LD_PRELOAD="$preload:$LD_PRELOAD"; export LD_PRELOAD 24 | fi 25 | } 26 | exec "$@" 27 | exit 28 | -------------------------------------------------------------------------------- /scripts/sh/customer_event_log_nl.sed: -------------------------------------------------------------------------------- 1 | {s/[ ]*!NL/\ 2 | /g 3 | } 4 | -------------------------------------------------------------------------------- /scripts/sh/fns: -------------------------------------------------------------------------------- 1 | # We use dirname and basename a lot which can be slow on Cygwin, 2 | # and they're simple enough to reimplement with built-ins. 3 | dirname () { 4 | [ "${1%/*}" = "$1" ] && echo . || echo "${1%/*}" 5 | } 6 | basename () { 7 | local name="${1##*/}" 8 | echo "${name%$2}" 9 | } 10 | 11 | p=$(basename "$0") 12 | me=$(basename "$0") 13 | bin=$(cd "$(dirname "$0")" && /bin/pwd) 14 | export PATH="$bin:$PATH" 15 | 16 | err () { echo 1>&2 "$*"; } 17 | log () { err "$p: $*"; } 18 | fail () { log "$*"; exit 1; } 19 | try () { "$@" || fail "'$*' failed"; } 20 | try_quiet () { "$@" 2>&1 > /dev/null || fail "'$*' failed"; } 21 | 22 | -------------------------------------------------------------------------------- /src/driver/linux/mmake.mk: -------------------------------------------------------------------------------- 1 | ############################ 2 | # 3 | # EtherFabric linux kernel drivers 4 | # 5 | # Placeholeder for (un)load.sh scripts and copyed modules 6 | # 7 | ############################ 8 | 9 | clean: 10 | @$(MakeClean) 11 | rm -rf *.ko 12 | -------------------------------------------------------------------------------- /src/driver/linux_affinity/mmake.mk: -------------------------------------------------------------------------------- 1 | SFCAFF_SRCS := sfcaffinity.c 2 | 3 | SFCAFF_TARGET := sfc_affinity.o 4 | SFCAFF_TARGET_SRCS := $(SFCAFF_SRCS) 5 | 6 | TARGETS := $(SFCAFF_TARGET) 7 | 8 | IMPORT := ../linux_net/driverlink_api.h 9 | 10 | 11 | ###################################################### 12 | # linux kbuild support 13 | # 14 | 15 | all: $(BUILDPATH)/driver/linux_affinity/Module.symvers $(BUILDPATH)/driver/linux_affinity/autocompat.h 16 | $(MMAKE_KBUILD_PRE_COMMAND) 17 | $(MAKE) $(MMAKE_KBUILD_ARGS) M=$(CURDIR) 18 | $(MMAKE_KBUILD_POST_COMMAND) 19 | cp -f sfc_affinity.ko $(DESTPATH)/driver/linux 20 | ifndef CI_FROM_DRIVER 21 | $(warning "Due to build order sfc.ko may be out-of-date. Please build in driver/linux_net") 22 | endif 23 | 24 | $(BUILDPATH)/driver/linux_affinity/autocompat.h: kernel_compat.sh 25 | ./kernel_compat.sh -k $(KPATH) $(if $(filter 1,$(V)),-v,-q) >$@ 26 | 27 | $(BUILDPATH)/driver/linux_affinity/Module.symvers: \ 28 | $(BUILDPATH)/driver/linux_net/Module.symvers 29 | cp $< $@ 30 | 31 | clean: 32 | @$(MakeClean) 33 | rm -rf *.ko Module.symvers .tmp_versions .*.cmd 34 | 35 | 36 | ifdef MMAKE_IN_KBUILD 37 | dummy := $(shell echo>&2 "MMAKE_IN_KBUILD") 38 | 39 | obj-m := $(SFCAFF_TARGET) 40 | 41 | sfc_affinity-objs := $(SFCAFF_TARGET_SRCS:%.c=%.o) 42 | 43 | endif # MMAKE_IN_KBUILD 44 | -------------------------------------------------------------------------------- /src/driver/linux_aoe/inband.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************** 17 | * Driver for Solarflare Solarstorm network controllers and boards 18 | * Copyright 2005-2006 Fen Systems Ltd. 19 | * Copyright 2006-2012 Solarflare Communications Inc. 20 | * 21 | * This program is free software; you can redistribute it and/or modify it 22 | * under the terms of the GNU General Public License version 2 as published 23 | * by the Free Software Foundation, incorporated herein by reference. 24 | */ 25 | 26 | #include "aoe.h" 27 | 28 | void setup_inband_handlers(struct aoe_map_entry *entry) 29 | { 30 | entry->completeMessageSend = NULL; 31 | entry->startMessageSend = NULL; 32 | entry->continueMessageSend = NULL; 33 | } 34 | -------------------------------------------------------------------------------- /src/driver/linux_aoe/kernel_compat_aoe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | KOMPAT_SCRIPT="$(dirname "$0")/../linux_net/kernel_compat.sh" 4 | 5 | function aoe_generate_kompat_symbols() { 6 | echo " 7 | AOE_HAVE_PARAM_BOOL_INT kver < 2.6.31 8 | AOE_NEED_ROOT_DEVICE_REGISTER nsymbol root_device_register include/linux/device.h 9 | AOE_NEED_KOBJECT_INIT_AND_ADD nsymbol kobject_init_and_add include/linux/kobject.h 10 | AOE_NEED_KOBJECT_SET_NAME_VARGS nsymbol kobject_set_name_vargs include/linux/kobject.h 11 | AOE_HAVE_OLD_STRUCT_MODULE_MKOBJ_PTR memtype struct_module mkobj include/linux/module.h struct module_kobject* 12 | AOE_NEED_TIMESPEC_ADD nsymbol timespec_add include/linux/time.h 13 | AOE_NEED_TIMESPEC_ADD_NS nsymbol timespec_add_ns include/linux/time.h 14 | AOE_NEED_TIMESPEC_SUB nsymbol timespec_sub include/linux/time.h 15 | AOE_NEED_TIMESPEC_COMPARE nsymbol timespec_compare include/linux/time.h 16 | AOE_NEED_NS_TO_TIMESPEC nexport ns_to_timespec include/linux/time.h kernel/time.c 17 | AOE_HAVE_DIV_S64_REM symbol div_s64_rem include/linux/math64.h 18 | AOE_NEED_IS_ERR_OR_NULL nsymbol IS_ERR_OR_NULL include/linux/err.h 19 | " | egrep -v -e '^#' -e '^$' | sed 's/[ \t][ \t]*/:/g' 20 | } 21 | 22 | exec "$KOMPAT_SCRIPT" "$@" -s "$(aoe_generate_kompat_symbols)" 23 | -------------------------------------------------------------------------------- /src/driver/linux_net/idle.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2014 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************** 17 | * Driver for Solarflare network controllers and boards 18 | * Copyright 2007 Solarflare Communications Inc. 19 | * 20 | * This program is free software; you can redistribute it and/or modify it 21 | * under the terms of the GNU General Public License version 2 as published 22 | * by the Free Software Foundation, incorporated herein by reference. 23 | */ 24 | 25 | #ifndef EFX_IDLE_H 26 | #define EFX_IDLE_H 27 | 28 | extern int efx_idle_init(void); 29 | extern void efx_idle_fini(void); 30 | extern int efx_idle_enhance(void); 31 | 32 | #endif /* EFX_IDLE_H */ 33 | -------------------------------------------------------------------------------- /src/driver/linux_net/kabi_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #undef EFX_USE_IRQ_SET_AFFINITY_HINT 17 | #undef EFX_HAVE_ROUND_JIFFIES_UP 18 | #undef EFX_NEED_PCI_CLEAR_MASTER 19 | #define EFX_NEED_PCI_CLEAR_MASTER 20 | #undef EFX_NEED_GETNSTIMEOFDAY 21 | #define EFX_NEED_GETNSTIMEOFDAY 22 | #undef EFX_NEED_NS_TO_TIMESPEC 23 | #define EFX_NEED_NS_TO_TIMESPEC 24 | #undef EFX_HAVE_XEN_START_INFO 25 | #undef EFX_NEED_SET_NORMALIZED_TIMESPEC 26 | #define EFX_NEED_SET_NORMALIZED_TIMESPEC 27 | -------------------------------------------------------------------------------- /src/driver/linux_net/linux_mtd_mtd.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************** 17 | * Driver for Solarflare network controllers and boards 18 | * Copyright 2012 Solarflare Communications Inc. 19 | * 20 | * This program is free software; you can redistribute it and/or modify it 21 | * under the terms of the GNU General Public License version 2 as published 22 | * by the Free Software Foundation, incorporated herein by reference. 23 | */ 24 | 25 | /* Prior to Linux 3.2, would define a DEBUG 26 | * function-like macro, which we really don't want. Save and 27 | * restore the defined-ness of DEBUG across this #include. 28 | */ 29 | 30 | #ifdef DEBUG 31 | #define EFX_MTD_DEBUG 32 | #undef DEBUG 33 | #endif 34 | #include 35 | #undef DEBUG 36 | #ifdef EFX_MTD_DEBUG 37 | #define DEBUG 38 | #endif 39 | -------------------------------------------------------------------------------- /src/driver/linux_net/mcdi_proxy.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************** 17 | * Driver for Solarflare network controllers and boards 18 | * Copyright 2014-2015 Solarflare Communications Inc. 19 | * 20 | * This program is free software; you can redistribute it and/or modify it 21 | * under the terms of the GNU General Public License version 2 as published 22 | * by the Free Software Foundation, incorporated herein by reference. 23 | */ 24 | 25 | #ifndef EFX_MCDI_PROXY_H 26 | #define EFX_MCDI_PROXY_H 27 | 28 | #include 29 | #include "net_driver.h" 30 | 31 | int efx_mcdi_proxy_nl_register(void); 32 | int efx_mcdi_proxy_nl_unregister(void); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/driver/linux_onload/onload_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __ONLOAD_INTERNAL_H__ 17 | #define __ONLOAD_INTERNAL_H__ 18 | 19 | #include 20 | 21 | 22 | extern int oo_driverlink_register(void); 23 | extern void oo_driverlink_unregister_nf(void); 24 | extern void oo_driverlink_unregister_dl(void); 25 | 26 | 27 | extern int ci_install_proc_entries(void); 28 | extern void ci_uninstall_proc_entries(void); 29 | 30 | struct proc_dir_entry; 31 | extern struct proc_dir_entry* oo_proc_root; 32 | 33 | extern int ci_bonding_init(void); 34 | extern void ci_bonding_fini(void); 35 | 36 | extern void ci_bonding_set_timer_period(int period, int occurences); 37 | 38 | extern int __init oo_epoll_chrdev_ctor(void); 39 | extern void oo_epoll_chrdev_dtor(void); 40 | 41 | extern int __init onloadfs_init(void); 42 | extern void onloadfs_fini(void); 43 | 44 | #include 45 | void onload_priv_free(ci_private_t *priv); 46 | 47 | #endif /* __ONLOAD_INTERNAL_H__ */ 48 | -------------------------------------------------------------------------------- /src/driver/linux_resource/Makefile: -------------------------------------------------------------------------------- 1 | obj-$(CONFIG_SFC_RESOURCE) := sfc_resource.o 2 | 3 | sfc_resource-objs := iopage.o \ 4 | driverlink_new.o kernel_proc.o kfifo.o \ 5 | nic.o eventq.o falcon.o falcon_mac.o filter.o \ 6 | assert_valid.o buddy.o buffer_table.o \ 7 | iobufset_resource.o resource_manager.o resources.o \ 8 | vi_resource_alloc.o vi_resource_event.o vi_resource_flush.o \ 9 | vi_resource_manager.o vi_allocator.o filter.o compat_pat_wc.c 10 | 11 | -------------------------------------------------------------------------------- /src/driver/mmake.mk: -------------------------------------------------------------------------------- 1 | SUBDIRS := ul 2 | 3 | # For linux_net/util 4 | ifeq ($(LINUX),1) 5 | SUBDIRS += linux_net 6 | endif 7 | 8 | MMAKE_NO_DEPS := 1 9 | 10 | ifeq ($(LINUX),1) 11 | 12 | # DRIVER_SUBDIRS must be ordered according to inter-driver dependencies 13 | DRIVER_SUBDIRS := linux_net linux_affinity linux_resource \ 14 | linux_char linux_onload linux 15 | 16 | ifneq ($(wildcard $(linux_aoe) ),"") 17 | DRIVER_SUBDIRS += linux_aoe 18 | endif 19 | 20 | ifeq ($(BUILD_AFONLOAD),1) 21 | DRIVER_SUBDIRS += openonload 22 | endif 23 | #DRIVER_SUBDIRS += linux_iscsi 24 | 25 | ifeq ($(BUILD_XEN),1) 26 | DRIVER_SUBDIRS += linux_xen 27 | endif 28 | 29 | endif # ifeq ($(LINUX),1) 30 | 31 | ifeq ($(WINDOWS),1) 32 | DRIVER_SUBDIRS := win 33 | endif 34 | 35 | ifeq ($(GLD),1) 36 | SUBDIRS := gld 37 | endif 38 | 39 | ifeq ($(DARWIN),1) 40 | DRIVER_SUBDIRS := macosx 41 | endif 42 | 43 | ifeq ($(DOS), 1) 44 | SUBDIRS = dos 45 | endif 46 | 47 | all: passthruparams := "CI_FROM_DRIVER=1" 48 | all: 49 | +@(target=all ; $(MakeSubdirs)) 50 | 51 | clean: 52 | @$(MakeClean) 53 | 54 | -------------------------------------------------------------------------------- /src/include/ci/driver/efab/hardware/hwd_addrlut.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /* this file is autogenerated; use '.../scripts/genheader --type=hwdef' 17 | * to regenerate */ 18 | #ifndef _HWD_ADDRLUT_H 19 | #define _HWD_ADDRLUT_H 20 | 21 | extern hwd_ifmapstblentry_t hwd_ifmaps[]; 22 | 23 | typedef enum { 24 | HWD_IFMAP_IOBAR, 25 | HWD_IFMAP_MCPU, 26 | HWD_IFMAP_MCPUCSRIND, 27 | HWD_IFMAP_MCPUPORTIND, 28 | HWD_IFMAP_MEMBAR, 29 | HWD_IFMAP_MEMBAR_VF, 30 | HWD_IFMAP_MSIXMEMBAR, 31 | HWD_IFMAP_MSIXMEMBAR_VF, 32 | HWD_IFMAP_PCICONFIG, 33 | HWD_IFMAP_PCICOREMGMT, 34 | HWD_IFMAP_PCIPFMGMT, 35 | HWD_IFMAP_PCIVFCONFIG, 36 | HWD_IFMAP_PCIVFMGMT, 37 | HWD_IFMAP_LASTP1, 38 | } hw_ifmap_e; 39 | 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /src/include/ci/driver/efab/kprof.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /* delete me */ 17 | -------------------------------------------------------------------------------- /src/include/ci/driver/efab/mmap_iopage.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2012 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | 17 | #ifndef __CI_DRIVER_EFAB_MMAP_IOPAGE_H__ 18 | #define __CI_DRIVER_EFAB_MMAP_IOPAGE_H__ 19 | 20 | #include 21 | 22 | /*-------------------------------------------------------------------- 23 | * 24 | * memory management 25 | * 26 | *--------------------------------------------------------------------*/ 27 | 28 | /*! Comment? */ 29 | extern int 30 | ci_mmap_bar(struct efhw_nic* nic, off_t base, size_t len, void* opaque, 31 | int* map_num, unsigned long* offset); 32 | 33 | extern int 34 | ci_mmap_iopage(struct efhw_iopage* p, void* opaque, int* map_num, 35 | unsigned long* offset); 36 | 37 | extern int 38 | ci_mmap_iopages(struct efhw_iopages* p, unsigned offset, unsigned max_bytes, 39 | unsigned long* bytes, void* opaque, 40 | int* map_num, unsigned long* p_offset); 41 | 42 | 43 | 44 | #endif /* __CI_DRIVER_EFAB_MMAP_IOPAGE_H__ */ 45 | -------------------------------------------------------------------------------- /src/include/ci/driver/efab/os_intf.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2012 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | 17 | #ifndef __CI_DRIVER_EFAB_OS_INTF_H__ 18 | #define __CI_DRIVER_EFAB_OS_INTF_H__ 19 | 20 | #ifdef __KERNEL__ 21 | #error "Not usable in the kernel" 22 | #endif 23 | 24 | # include 25 | 26 | #endif /* __CI_DRIVER_EFAB_OS_INTF_H__ */ 27 | -------------------------------------------------------------------------------- /src/include/ci/driver/platform/unix_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_driver_platform */ 28 | 29 | #ifndef __CI_DRIVER_PLATFORM_UNIX_H__ 30 | #define __CI_DRIVER_PLATFORM_UNIX_H__ 31 | 32 | #include 33 | 34 | 35 | #ifndef __KERNEL__ 36 | 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | #endif 49 | 50 | 51 | #endif /* __CI_DRIVER_PLATFORM_UNIX_H__ */ 52 | 53 | /*! \cidoxg_end */ 54 | -------------------------------------------------------------------------------- /src/include/ci/efch/mmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __CI_EFCH_MMAP_H__ 17 | #define __CI_EFCH_MMAP_H__ 18 | 19 | #include /* for CI_HAVE_OS_NOPAGE */ 20 | #include 21 | 22 | struct efrm_vi; 23 | 24 | 25 | extern int 26 | efab_vi_resource_mmap(struct efrm_vi *virs, unsigned long *bytes, void *opaque, 27 | int *map_num, unsigned long *offset, int map_type); 28 | 29 | extern int 30 | efab_vi_resource_mmap_bytes(struct efrm_vi* virs, int map_type); 31 | 32 | #ifdef CI_HAVE_OS_NOPAGE 33 | extern unsigned long 34 | efab_vi_resource_nopage(struct efrm_vi *virs, void *opaque, 35 | unsigned long offset, unsigned long map_size); 36 | #endif 37 | 38 | 39 | #endif /* __CI_EFCH_MMAP_H__ */ 40 | -------------------------------------------------------------------------------- /src/include/ci/efch/mmap_id.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __CI_EFCH_MMAP_ID_H__ 17 | #define __CI_EFCH_MMAP_ID_H__ 18 | 19 | #define EFCH_VI_MMAP_IO 0 20 | #define EFCH_VI_MMAP_MEM 1 21 | #define EFCH_VI_MMAP_PIO 2 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/include/ci/efhw/debug_ci2linux.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | 17 | #ifndef __CI_EFHW_DEBUG_CI2LINUX_H__ 18 | #define __CI_EFHW_DEBUG_CI2LINUX_H__ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #define printk ci_log 25 | #define printk_nl "" 26 | 27 | #define KERN_ERR "ERR>" 28 | #define KERN_WARNING "WARN>" 29 | #define KERN_NOTICE "NOTICE>" 30 | #define KERN_DEBUG "DBG>" 31 | 32 | # define BUG_ON(cond) ci_assert((cond) == 0) 33 | # define BUG() ci_assert(0) 34 | 35 | #endif /* __CI_EFHW_DEBUG_CI2LINUX_H__ */ 36 | -------------------------------------------------------------------------------- /src/include/ci/efhw/hardware_ci2linux.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | 17 | #ifndef __CI_EFHW_HARDWARE_CI2LINUX_H__ 18 | #define __CI_EFHW_HARDWARE_CI2LINUX_H__ 19 | 20 | #include 21 | 22 | #define __iomem 23 | 24 | #if CI_MY_BYTE_ORDER == CI_LITTLE_ENDIAN 25 | #define EFHW_IS_LITTLE_ENDIAN 26 | #else 27 | #define EFHW_IS_BIG_ENDIAN 28 | #endif 29 | 30 | 31 | #ifndef PAGE_SIZE 32 | #define PAGE_SIZE CI_PAGE_SIZE 33 | #endif 34 | #ifndef PAGE_SHIFT 35 | #define PAGE_SHIFT CI_PAGE_SHIFT 36 | #endif 37 | 38 | 39 | #define mmiowb() 40 | #define rmb ci_rmb 41 | #define wmb ci_wmb 42 | 43 | 44 | #endif /* __CI_EFHW_HARDWARE_CI2LINUX_H__ */ 45 | -------------------------------------------------------------------------------- /src/include/ci/efrm/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __CI_EFRM_CONFIG_H__ 17 | #define __CI_EFRM_CONFIG_H__ 18 | 19 | /******************************************************************** 20 | * 21 | * CONFIG_SFC_RESOURCE_VF: it should be in Kconfig, but... 22 | * 23 | ********************************************************************/ 24 | #ifdef CONFIG_PCI_IOV 25 | #if !defined(__powerpc__) 26 | #define CONFIG_SFC_RESOURCE_VF 27 | #ifdef CONFIG_IOMMU_API 28 | #define CONFIG_SFC_RESOURCE_VF_IOMMU 29 | #endif 30 | #endif /* __powerpc__ */ 31 | #endif /* CONFIG_PCI_IOV */ 32 | 33 | 34 | #endif /* __CI_EFRM_CONFIG_H__ */ 35 | -------------------------------------------------------------------------------- /src/include/ci/internal/infversion: -------------------------------------------------------------------------------- 1 | # STAMPINF sets the DriverVer line in the [Version] section 2 | # of the INF files to "$STAMPINF_DATE$,$STAMPINF_VERSION$" 3 | # 4 | # STAMPINF_DATE defaults to the current date 5 | # STAMPINF_VERSION is set below: 6 | STAMPINF_VERSION=3.3.0.6207 7 | -------------------------------------------------------------------------------- /src/include/ci/internal/opts_user_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author cgg 20 | ** \brief Definition of user-specific options/restrictions 21 | ** \date 2005/12/12 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | 28 | /* For a detailed explanation of how this macro system works, look at 29 | * 30 | * 31 | * CI_CFG_OPT(type, type_modifider, name, group, default, 32 | * minimum, maximum, presentation) 33 | */ 34 | 35 | #ifdef CI_CFG_OPTFILE_VERSION 36 | CI_CFG_OPTFILE_VERSION(100) 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /src/include/ci/internal/os_sock.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author stg 20 | ** \brief OS-specific abstraction of kernel-based OS socket functions 21 | ** \date 2005/07/14 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_internal */ 28 | 29 | /* Moved to ip.h (unfortunately)! */ 30 | 31 | /*! \cidoxg_end */ 32 | -------------------------------------------------------------------------------- /src/include/ci/internal/trampoline.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author gel,mjs 20 | ** \brief System call trampoline code kernel/UL interface 21 | ** \date 2005/03/01 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_internal */ 28 | 29 | #ifndef __CI_INTERNAL_TRAMPOLINE_H__ 30 | #define __CI_INTERNAL_TRAMPOLINE_H__ 31 | 32 | /* Trampoline function opcodes */ 33 | #define CI_TRAMP_OPCODE_ERROR 1 34 | #define CI_TRAMP_OPCODE_CLOSE 2 35 | 36 | #endif /* __CI_INTERNAL_TRAMPOLINE_H__ */ 37 | 38 | /*! \cidoxg_end */ 39 | 40 | -------------------------------------------------------------------------------- /src/include/ci/net/ioctls.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author adp 20 | ** \brief Ioctls for ioctl() call compatibilty 21 | ** \date 2004/7/29 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_net */ 28 | 29 | #ifndef __CI_NET_IOCTLS_H__ 30 | #define __CI_NET_IOCTLS_H__ 31 | 32 | 33 | # define SIOCINQ FIONREAD 34 | # define SIOCOUTQ TIOCOUTQ 35 | # ifndef SIOCOUTQNSD 36 | # define SIOCOUTQNSD 0x894b 37 | # endif 38 | # ifndef SIOCGSTAMPNS 39 | # define SIOCGSTAMPNS 0x8907 40 | # endif 41 | 42 | #endif /* __CI_NET_IOCTLS_H__ */ 43 | -------------------------------------------------------------------------------- /src/include/ci/tools/crc32c.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_tools */ 28 | #ifndef __CI_TOOLS_CRC32C_H__ 29 | #define __CI_TOOLS_CRC32C_H__ 30 | 31 | extern ci_uint32 ci_crc32c_partial(const ci_uint8 *buf, ci_uint32 buflen, 32 | ci_uint32 crc); 33 | 34 | extern ci_uint32 ci_crc32c_partial_copy(ci_uint8 *dest, const ci_uint8 *buf, 35 | ci_uint32 buflen, ci_uint32 crc); 36 | 37 | ci_inline ci_uint32 ci_crc32c(const ci_uint8 *buf, ci_uint32 buflen) 38 | { 39 | return ~ci_crc32c_partial(buf, buflen, 0xffffffff); 40 | } 41 | 42 | #endif /* __CI_TOOLS_CRC32C_H__ */ 43 | /*! \cidoxg_end */ 44 | -------------------------------------------------------------------------------- /src/include/ci/tools/internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_tools */ 28 | 29 | #ifndef __CI_TOOLS_INTERNAL_H__ 30 | #define __CI_TOOLS_INTERNAL_H__ 31 | 32 | 33 | #endif /* __CI_TOOLS_INTERNAL_H__ */ 34 | 35 | /*! \cidoxg_end */ 36 | -------------------------------------------------------------------------------- /src/include/ci/tools/platform/pg_x86.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_tools_platform */ 28 | 29 | #ifndef __CI_TOOLS_PG_X86_H__ 30 | #define __CI_TOOLS_PG_X86_H__ 31 | 32 | 33 | /********************************************************************** 34 | * Atomic integer. 35 | */ 36 | 37 | /* Minimal hack to compile stuff. */ 38 | typedef volatile ci_int32 ci_atomic_t; 39 | #define ci_atomic_read(p) (*(p)) 40 | 41 | 42 | 43 | #endif /* __CI_TOOLS_PG_X86_H__ */ 44 | 45 | /*! \cidoxg_end */ 46 | -------------------------------------------------------------------------------- /src/include/ci/tools/stacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_tools */ 28 | 29 | #ifndef __CI_TOOLS_STACKS_H__ 30 | #define __CI_TOOLS_STACKS_H__ 31 | 32 | 33 | /*! Comment? */ 34 | typedef struct { 35 | int* stack_base; 36 | int* stack_top; 37 | int* stack_ptr; 38 | } ci_int_stack_t; 39 | 40 | typedef ci_int_stack_t ci_int_stack; 41 | 42 | 43 | /*! Comment? */ 44 | typedef struct { 45 | void** stack_base; 46 | void** stack_top; 47 | void** stack_ptr; 48 | } ci_ptr_stack_t; 49 | 50 | typedef ci_ptr_stack_t ci_ptr_stack; 51 | 52 | 53 | #endif /* __CI_TOOLS_STACKS_H__ */ 54 | 55 | /*! \cidoxg_end */ 56 | -------------------------------------------------------------------------------- /src/include/ci/tools/timeval.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author djr 20 | ** \brief Fixed width, cross-platform, timeval 21 | ** \date 2008/08/14 22 | ** \cop (c) Solarflare Communications Inc. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_tools */ 28 | #ifndef __CI_TOOLS_TIMEVAL_H__ 29 | #define __CI_TOOLS_TIMEVAL_H__ 30 | 31 | 32 | /* Fixed width type equivalent of struct timeval */ 33 | typedef struct ci_timeval_s { 34 | ci_int32 tv_sec; 35 | ci_int32 tv_usec; 36 | } ci_timeval_t; 37 | 38 | 39 | #endif /* __CI_TOOLS_TIMEVAL_H__ */ 40 | /*! \cidoxg_end */ 41 | -------------------------------------------------------------------------------- /src/include/etherfabric/doxygen/efvi_vnic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/include/etherfabric/doxygen/efvi_vnic.png -------------------------------------------------------------------------------- /src/include/etherfabric/doxygen/footer.tex: -------------------------------------------------------------------------------- 1 | %--- End generated contents --- 2 | 3 | % Index 4 | \backmatter 5 | \newpage 6 | \phantomsection 7 | \cleardoublepage 8 | \addcontentsline{toc}{chapter}{Index} 9 | \printindex 10 | 11 | \end{document} 12 | -------------------------------------------------------------------------------- /src/include/etherfabric/doxygen/solarflare_logo_blublk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/include/etherfabric/doxygen/solarflare_logo_blublk.png -------------------------------------------------------------------------------- /src/include/onload/atomics.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __ONLOAD_ATOMICS_H__ 17 | #define __ONLOAD_ATOMICS_H__ 18 | 19 | 20 | ci_inline ci_int32 oo_atomic_read(const oo_atomic_t* a) { return a->n; } 21 | ci_inline void oo_atomic_set(oo_atomic_t* a, ci_int32 v) { a->n = v; } 22 | 23 | ci_inline void oo_atomic_inc(oo_atomic_t* a) 24 | { ci_atomic32_inc(&a->n); } 25 | 26 | ci_inline int oo_atomic_dec_and_test(oo_atomic_t* a) 27 | { return ci_atomic32_dec_and_test(&a->n); } 28 | 29 | ci_inline void oo_atomic_add(oo_atomic_t* a, int n) 30 | { ci_atomic32_add(&a->n, n); } 31 | 32 | 33 | #endif /* __ONLOAD_ATOMICS_H__ */ 34 | -------------------------------------------------------------------------------- /src/include/onload/declare_libccalls.h.tmpl: -------------------------------------------------------------------------------- 1 | /**************************************************************************\ 2 | *//*! \file 3 | ** 4 | ** \author pd 5 | ** \brief Definitions of system calls for templates 6 | ** \date 7 | ** \cop (c) Level 5 Networks Limited. 8 | ** 9 | *//* 10 | \**************************************************************************/ 11 | 12 | /*! \cidoxg_include_ci_ul */ 13 | 14 | /* -*- Mode: c; -*- */ 15 | 16 | /* No header guards: may be included multiple times. */ 17 | 18 | #include 19 | 20 | /* 21 | ** This template helps generate declarations, definitions or code for the 22 | ** libc calls and related calls that we need to intercept to do 23 | ** user-level networking. 24 | ** 25 | ** The user must define a CI_MK_DECL() macro that generates the 26 | ** declarations or definitions. For example, to declare pointers to 27 | ** functions with a ci_ prefix, use the following: 28 | ** 29 | ** #define CI_MK_DECL(ret, name, args) extern ret (*ci_##name) args 30 | */ 31 | 32 | #if !defined(CI_MK_DECL) 33 | # error Do not include this file unless you know what you are doing. 34 | #endif 35 | 36 | CI_MK_DECL(void * , malloc , (size_t)); 37 | CI_MK_DECL(void , free , (void *)); 38 | 39 | #undef CI_MK_DECL 40 | 41 | /*! \cidoxg_end */ 42 | -------------------------------------------------------------------------------- /src/include/onload/drv/dump_to_user.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __ONLOAD_DRV_DUMP_TO_USER_H__ 17 | #define __ONLOAD_DRV_DUMP_TO_USER_H__ 18 | 19 | 20 | typedef void (*oo_dump_log_fn_t)(void* log_fn_arg, const char* fmt, ...); 21 | 22 | typedef void (*oo_dump_fn_t)(void* oo_dump_fn_arg, oo_dump_log_fn_t log, 23 | void* log_arg); 24 | 25 | extern int oo_dump_to_user(oo_dump_fn_t, void* dump_fn_arg, 26 | void* user_buf, int user_buf_len); 27 | 28 | 29 | #endif /* __ONLOAD_DRV_DUMP_TO_USER_H__ */ 30 | -------------------------------------------------------------------------------- /src/include/onload/dup2_lock.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __ONLOAD_DUP2_LOCK_H__ 17 | #define __ONLOAD_DUP2_LOCK_H__ 18 | 19 | #include 20 | 21 | 22 | extern oo_rwlock citp_dup2_lock CI_HV; 23 | 24 | 25 | #endif /* __ONLOAD_DUP2_LOCK_H__ */ 26 | -------------------------------------------------------------------------------- /src/include/onload/linux_sock_ops.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file linux_sock_ops.h 18 | ** 19 | ** \author mjs 20 | ** \brief Socket operations interception for Linux 21 | ** \date 2005/02/14 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_driver_efab */ 28 | 29 | #ifndef __CI_DRIVER_EFAB_LINUX_SOCK_OPS_H__ 30 | #define __CI_DRIVER_EFAB_LINUX_SOCK_OPS_H__ 31 | 32 | #include 33 | 34 | 35 | extern int efab_linux_dump_inode(int fd); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/include/onload/oof_hw_filter.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __ONLOAD_OOF_HW_FILTER_H__ 17 | #define __ONLOAD_OOF_HW_FILTER_H__ 18 | 19 | 20 | struct tcp_helper_resource_s; 21 | struct tcp_helper_cluster_s; 22 | 23 | 24 | struct oo_hw_filter { 25 | struct tcp_helper_resource_s* trs; 26 | struct tcp_helper_cluster_s* thc; 27 | unsigned dlfilter_handle; 28 | int filter_id[CI_CFG_MAX_REGISTER_INTERFACES]; 29 | }; 30 | 31 | 32 | #endif /* __ONLOAD_OOF_HW_FILTER_H__ */ 33 | -------------------------------------------------------------------------------- /src/include/onload/oof_onload.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef __ONLOAD_OOF_ONLOAD_H__ 17 | #define __ONLOAD_OOF_ONLOAD_H__ 18 | 19 | 20 | struct efab_tcp_driver_s; 21 | 22 | 23 | extern int oof_onload_ctor(struct efab_tcp_driver_s*, unsigned local_addr_max); 24 | extern void oof_onload_dtor(struct efab_tcp_driver_s*); 25 | 26 | 27 | #endif /* __ONLOAD_OOF_ONLOAD_H__ */ 28 | -------------------------------------------------------------------------------- /src/include/onload/tmpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author as 20 | ** \brief Templated sends definitions 21 | ** \date 2013/08/20 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_include_ci_internal_tmpl_types */ 28 | 29 | #ifndef __CI_INTERNAL_TMPL_TYPES_H__ 30 | #define __CI_INTERNAL_TMPL_TYPES_H__ 31 | 32 | 33 | struct oo_msg_template { 34 | /* To verify subsequent templated calls are used with the same socket */ 35 | oo_sp oomt_sock_id; 36 | }; 37 | 38 | 39 | extern void ci_tcp_tmpl_free_all(ci_netif* ni, ci_tcp_state* ts); 40 | extern void ci_tcp_tmpl_handle_nic_reset(ci_netif* ni); 41 | 42 | 43 | #endif /* __CI_INTERNAL_TMPL_TYPES_H__ */ 44 | /*! \cidoxg_end */ 45 | -------------------------------------------------------------------------------- /src/include/onload/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author djr 20 | ** \brief Onload version. 21 | ** \date 2009/07/22 22 | ** \cop (c) Solarflare Communications Inc. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | #ifndef __ONLOAD_VERSION_H__ 28 | #define __ONLOAD_VERSION_H__ 29 | 30 | 31 | #ifndef ONLOAD_VERSION 32 | # define ONLOAD_VERSION "201502-u1" 33 | #endif 34 | 35 | #define ONLOAD_PRODUCT "OpenOnload" 36 | 37 | #define ONLOAD_COPYRIGHT "Copyright 2006-2015 Solarflare Communications, 2002-2005 Level 5 Networks" 38 | 39 | 40 | #endif /* __ONLOAD_VERSION_H__ */ 41 | -------------------------------------------------------------------------------- /src/lib/ciapp/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TARGET := $(CIAPP_LIB) 3 | MMAKE_TYPE := LIB 4 | 5 | LIB_SRCS := \ 6 | testapp.c \ 7 | net.c \ 8 | bytepattern.c 9 | 10 | ifneq ($(ONLOAD_ONLY),1) 11 | LIB_SRCS += \ 12 | ctimer.c \ 13 | stats.c \ 14 | iarray_mean_and_limits.c \ 15 | iarray_median.c \ 16 | iarray_mode.c \ 17 | iarray_variance.c \ 18 | qsort_compare_int.c \ 19 | testpattern.c \ 20 | select.c \ 21 | errno.c \ 22 | read_exact.c \ 23 | write_exact.c \ 24 | recv_exact.c \ 25 | getinput.c \ 26 | put_record.c \ 27 | get_record.c \ 28 | testethpkt.c \ 29 | rawpkt.c \ 30 | fork_filter.c \ 31 | dump_select_set.c \ 32 | rate_thread.c \ 33 | sys_info.c \ 34 | dummy_work.c \ 35 | dump_tcp_info.c \ 36 | onload_info.c 37 | 38 | ifeq ($(LINUX),1) 39 | LIB_SRCS += ifindex.c 40 | endif 41 | endif 42 | 43 | 44 | MMAKE_OBJ_PREFIX := ci_app_ 45 | LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%.o) 46 | 47 | 48 | all: $(TARGET) 49 | 50 | lib: $(TARGET) 51 | 52 | clean: 53 | @$(MakeClean) 54 | 55 | 56 | $(TARGET): $(LIB_OBJS) 57 | $(MMakeLinkStaticLib) 58 | 59 | -------------------------------------------------------------------------------- /src/lib/citools/Makefile: -------------------------------------------------------------------------------- 1 | lib-y := buddy.o \ 2 | cpu_features.o \ 3 | fail.o \ 4 | fifo_grow_lock.o \ 5 | log.o \ 6 | drv_log_fn.o \ 7 | drv_thread.o 8 | 9 | -------------------------------------------------------------------------------- /src/lib/citools/asm_csum_copy.S: -------------------------------------------------------------------------------- 1 | /* 2 | ** This was generated from csum_copy.c with [gcc -O4 -march=i686]. 3 | ** 4 | ** ?? Could bear some improvement... 5 | ** 6 | */ 7 | .file "asm_csum_copy.S" 8 | #ifdef __i386__ 9 | .text 10 | .align 16 11 | .globl ci_ip_csum_copy_asm 12 | .type ci_ip_csum_copy_asm,@function 13 | ci_ip_csum_copy_asm: 14 | pushl %ebp 15 | movl %esp, %ebp 16 | pushl %edi 17 | movl 16(%ebp), %edi 18 | pushl %esi 19 | movl 12(%ebp), %edx 20 | pushl %ebx 21 | movl 20(%ebp), %ecx 22 | movl %edi, %eax 23 | andl $-4, %eax 24 | leal (%eax,%edx), %esi 25 | cmpl %esi, %edx 26 | movl 8(%ebp), %ebx 27 | je .L293 28 | .p2align 4 29 | .L288: 30 | movl (%edx), %eax 31 | #APP 32 | addl %eax, %ecx ;adcl $0, %ecx ; 33 | #NO_APP 34 | addl $4, %edx 35 | movl %eax, (%ebx) 36 | addl $4, %ebx 37 | cmpl %esi, %edx 38 | jne .L288 39 | .L293: 40 | testl $3, %edi 41 | je .L291 42 | testl $2, %edi 43 | je .L290 44 | movzwl (%edx), %esi 45 | #APP 46 | addl %esi, %ecx ;adcl $0, %ecx ; 47 | #NO_APP 48 | movw %si, (%ebx) 49 | .L290: 50 | testl $1, %edi 51 | je .L291 52 | cmpl $3, %edi 53 | movl %edx, %eax 54 | movl %ebx, %edx 55 | je .L295 56 | .L292: 57 | movzbl (%eax), %ebx 58 | movb %bl, (%edx) 59 | movzbl %bl, %edx 60 | #APP 61 | addl %edx, %ecx ;adcl $0, %ecx ; 62 | #NO_APP 63 | .L291: 64 | movl %ecx, %eax 65 | popl %ebx 66 | popl %esi 67 | popl %edi 68 | popl %ebp 69 | ret 70 | .p2align 4,,7 71 | .L295: 72 | addl $2, %eax 73 | addl $2, %edx 74 | jmp .L292 75 | .Lfe1: 76 | .size ci_ip_csum_copy_asm,.Lfe1-ci_ip_csum_copy_asm 77 | #endif 78 | -------------------------------------------------------------------------------- /src/lib/citools/asm_memcpy.S: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | 3 | /* copes with any alignment and on modern cores does a pretty good job 4 | of hitting the IO bus */ 5 | .text 6 | .align 4 7 | .globl ci_memcpy_byte_aligned 8 | ci_memcpy_byte_aligned: 9 | push %ebp 10 | mov %esp,%ebp 11 | push %edi 12 | push %esi 13 | mov 0x8(%ebp),%edx 14 | mov 0x10(%ebp),%eax 15 | mov %edx,%edi 16 | mov 0xc(%ebp),%esi 17 | cmp $0x7,%eax 18 | jbe 1f 19 | mov %edx,%ecx 20 | neg %ecx 21 | and $0x3,%ecx 22 | sub %ecx,%eax 23 | cld 24 | repz 25 | movsb %ds:(%esi),%es:(%edi) 26 | mov %eax,%ecx 27 | shr $0x2,%ecx 28 | cld 29 | repz 30 | movsl %ds:(%esi),%es:(%edi) 31 | and $0x3,%eax 32 | lea 0x0(%esi,1),%esi 33 | 1: mov %eax,%ecx 34 | cld 35 | repz 36 | movsb %ds:(%esi),%es:(%edi) 37 | mov %edx,%eax 38 | lea 0xfffffff8(%ebp),%esp 39 | pop %esi 40 | pop %edi 41 | leave 42 | ret 43 | #endif 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/lib/citools/buffer.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | 32 | #if CI_INCLUDE_ASSERT_VALID 33 | void ci_buffer_assert_valid(ci_buffer* b) 34 | { 35 | ci_assert(b); 36 | ci_assert(b->ptr <= b->end); 37 | } 38 | #endif 39 | 40 | /*! \cidoxg_end */ 41 | -------------------------------------------------------------------------------- /src/lib/citools/bufrange.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | 32 | #if CI_INCLUDE_ASSERT_VALID 33 | void ci_bufrange_assert_valid(ci_bufrange* b) 34 | { 35 | ci_assert(b); 36 | ci_assert(b->start <= b->ptr); 37 | ci_assert(b->ptr <= b->end); 38 | } 39 | #endif 40 | 41 | /*! \cidoxg_end */ 42 | -------------------------------------------------------------------------------- /src/lib/citools/cithread.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | 32 | 33 | /*! \cidoxg_end */ 34 | -------------------------------------------------------------------------------- /src/lib/citools/citools_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #ifndef __INTERNAL_H__ 30 | #define __INTERNAL_H__ 31 | 32 | 33 | #include 34 | #include 35 | 36 | 37 | extern const char* ci_log_prefix CI_HF; 38 | 39 | 40 | #endif /* __INTERNAL_H__ */ 41 | 42 | /*! \cidoxg_end */ 43 | -------------------------------------------------------------------------------- /src/lib/citools/dllist.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | 32 | #if CI_INCLUDE_ASSERT_VALID 33 | void ci_dllist_assert_valid(ci_dllist* list) 34 | { 35 | ci_dllink* l; 36 | 37 | ci_assert(list); 38 | ci_assert(list->l.next); 39 | ci_assert(list->l.prev); 40 | 41 | for( l = list->l.next; l != &list->l; l = l->next ) { 42 | ci_assert(l); 43 | ci_assert(l->prev); 44 | } 45 | } 46 | #endif 47 | 48 | /*! \cidoxg_end */ 49 | -------------------------------------------------------------------------------- /src/lib/citools/eth_addr.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | 32 | int ci_format_eth_addr(char* buf, const void* eth_mac_addr, char sep) 33 | { 34 | const unsigned char* p; 35 | p = (const unsigned char*) eth_mac_addr; 36 | 37 | ci_assert(buf); 38 | ci_assert(eth_mac_addr); 39 | 40 | if( sep == 0 ) sep = ':'; 41 | 42 | return ci_sprintf(buf, "%02X%c%02X%c%02X%c%02X%c%02X%c%02X", 43 | (unsigned) p[0], sep, (unsigned) p[1], sep, 44 | (unsigned) p[2], sep, (unsigned) p[3], sep, 45 | (unsigned) p[4], sep, (unsigned) p[5]); 46 | } 47 | 48 | /*! \cidoxg_end */ 49 | -------------------------------------------------------------------------------- /src/lib/citools/internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #ifndef __INTERNAL_H__ 30 | #define __INTERNAL_H__ 31 | 32 | 33 | #include 34 | #include 35 | 36 | 37 | extern const char* ci_log_prefix CI_HF; 38 | 39 | 40 | #endif /* __INTERNAL_H__ */ 41 | 42 | /*! \cidoxg_end */ 43 | -------------------------------------------------------------------------------- /src/lib/citools/ip_addr.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | 32 | int ci_format_ip4_addr(char* buf, unsigned addr_be32) 33 | { 34 | const unsigned char* p; 35 | p = (const unsigned char*) &addr_be32; 36 | 37 | ci_assert(buf); 38 | 39 | return ci_sprintf(buf, "%u.%u.%u.%u", 40 | (unsigned) p[0], (unsigned) p[1], 41 | (unsigned) p[2], (unsigned) p[3]); 42 | } 43 | 44 | /*! \cidoxg_end */ 45 | -------------------------------------------------------------------------------- /src/lib/citools/log_file.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | # include 32 | 33 | int ci_log_file_fd = STDERR_FILENO; 34 | 35 | 36 | 37 | void ci_log_file(const char* msg) 38 | { 39 | struct iovec v[2]; 40 | 41 | v[0].iov_base = (void*) msg; 42 | v[0].iov_len = strlen(msg); 43 | v[1].iov_base = "\n"; 44 | v[1].iov_len = 1; 45 | 46 | writev(ci_log_file_fd, v, 2); 47 | } 48 | 49 | /*! \cidoxg_end */ 50 | -------------------------------------------------------------------------------- /src/lib/citools/log_nth.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | #ifndef CI_LOG_FN_DEFAULT 32 | # define CI_LOG_FN_DEFAULT ci_log_stderr 33 | #endif 34 | 35 | void (*__ci_log_nth_fn)(const char* msg) = CI_LOG_FN_DEFAULT; 36 | int ci_log_nth_n = 100; 37 | 38 | 39 | void __ci_log_nth(const char* msg) 40 | { 41 | static int n = 0; 42 | 43 | /* Avoid the obvious loop. Other loops possible though... */ 44 | if( __ci_log_nth_fn == ci_log_fn ) return; 45 | 46 | if( n % ci_log_nth_n == 0 ) __ci_log_nth_fn(msg); 47 | ++n; 48 | } 49 | 50 | /*! \cidoxg_end */ 51 | -------------------------------------------------------------------------------- /src/lib/citools/sys_fail.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_citools */ 28 | 29 | #include "citools_internal.h" 30 | 31 | 32 | void __ci_sys_fail(const char* fn, int rc, const char* file, int line) 33 | { 34 | ci_log("*** UNEXPECTED ERROR ***"); 35 | ci_log(" what: %s", fn); 36 | ci_log(" called from: %s:%d", file, line); 37 | ci_log(" return code: %d", rc); 38 | #ifndef __KERNEL__ 39 | ci_log(" errno: %d", errno); 40 | ci_log(" strerror: %s", strerror(errno)); 41 | #endif 42 | ci_fail((" ")); 43 | } 44 | 45 | /*! \cidoxg_end */ 46 | -------------------------------------------------------------------------------- /src/lib/ciul/ef10_hw_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This library is free software; you can redistribute it and/or 7 | ** modify it under the terms of version 2.1 of the GNU Lesser General Public 8 | ** License as published by the Free Software Foundation. 9 | ** 10 | ** This library is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ** Lesser General Public License for more details. 14 | */ 15 | 16 | #ifndef EF10_HW_DEFS_H 17 | #define EF10_HW_DEFS_H 18 | 19 | #include 20 | 21 | #endif /* EF10_HW_DEFS_H */ 22 | -------------------------------------------------------------------------------- /src/lib/ciul/event_q_put.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This library is free software; you can redistribute it and/or 7 | ** modify it under the terms of version 2.1 of the GNU Lesser General Public 8 | ** License as published by the Free Software Foundation. 9 | ** 10 | ** This library is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ** Lesser General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author djr 20 | ** \brief ef_eventq_put() 21 | ** \date 2004/05/20 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_ef */ 28 | #include "ef_vi_internal.h" 29 | #include "driver_access.h" 30 | #include 31 | 32 | 33 | int ef_eventq_put(unsigned evq_id, ef_driver_handle fd, unsigned ev) 34 | { 35 | ci_resource_op_t op; 36 | int64_t ev64; 37 | 38 | EF_VI_BUG_ON((ev & EFVI_FALCON_EVENT_SW_DATA_MASK) != ev); 39 | ev64 = ev; 40 | 41 | op.op = CI_RSOP_EVENTQ_PUT; 42 | op.id = efch_make_resource_id(evq_id); 43 | op.u.evq_put.ev = cpu_to_le64(ev64); 44 | return ci_resource_op(fd, &op); 45 | } 46 | -------------------------------------------------------------------------------- /src/lib/ciul/open.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This library is free software; you can redistribute it and/or 7 | ** modify it under the terms of version 2.1 of the GNU Lesser General Public 8 | ** License as published by the Free Software Foundation. 9 | ** 10 | ** This library is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ** Lesser General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author 20 | ** \brief 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_ef */ 28 | #include 29 | #include "ef_vi_internal.h" 30 | #include "logging.h" 31 | #include 32 | #include 33 | 34 | 35 | int ef_driver_open(ef_driver_handle* pfd) 36 | { 37 | int rc; 38 | rc = open("/dev/sfc_char", O_RDWR); 39 | if( rc >= 0 ) { 40 | *pfd = rc; 41 | return 0; 42 | } 43 | return -errno; 44 | } 45 | 46 | 47 | int ef_driver_close(ef_driver_handle dh) 48 | { 49 | return close(dh); 50 | } 51 | 52 | /*! \cidoxg_end */ 53 | -------------------------------------------------------------------------------- /src/lib/ciul/vi_prime.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This library is free software; you can redistribute it and/or 7 | ** modify it under the terms of version 2.1 of the GNU Lesser General Public 8 | ** License as published by the Free Software Foundation. 9 | ** 10 | ** This library is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ** Lesser General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author Akhi Singhania 20 | ** \brief FD priming support 21 | ** \date 2014/05/19 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | #include "ef_vi_internal.h" 28 | #include "driver_access.h" 29 | 30 | 31 | int ef_vi_prime(ef_vi* vi, ef_driver_handle dh, unsigned current_ptr) 32 | { 33 | ci_resource_prime_op_t op; 34 | op.crp_id = efch_make_resource_id(vi->vi_resource_id); 35 | op.crp_current_ptr = current_ptr; 36 | return ci_resource_prime(dh, &op); 37 | } 38 | -------------------------------------------------------------------------------- /src/lib/efabcfg/ftl/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TARGET := $(FTL_LIB) $(L5_FTL_LIB) 3 | 4 | LIB_SRCS := libftl.c 5 | 6 | LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%.o) 7 | L5_LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%5.o) 8 | 9 | 10 | # we include readline only in the Level 5 library and only if the environment 11 | # variable USEREADLINE is set to 1 (this way, by default, builds on machines 12 | # which do not incorporate these libraries will still work) 13 | ifeq ($(LINUX),1) 14 | ifneq ($(strip $(USEREADLINE)),) 15 | MMAKE_LIBS += -lcurses -lhistory -lreadline 16 | L5_CPPFLAGS += -DUSE_READLINE 17 | endif 18 | endif 19 | # unfortunately we can't use MMAKE_LIBS in any of our make rules to create a 20 | # library - so we need to do the above in any *.mk file that requires this 21 | # library 22 | 23 | ifndef MMAKE_NO_RULES 24 | 25 | all: $(TARGET) 26 | 27 | lib: $(TARGET) 28 | 29 | clean: 30 | @$(MakeClean) 31 | 32 | $(FTL_LIB): $(LIB_OBJS) 33 | $(MMakeLinkStaticLib) 34 | 35 | # These rules may generate a version that uses gnu readline. We must not 36 | # distribute this because readline is licensed under GPL. 37 | LIB_OBJS := $(L5_LIB_OBJS) 38 | 39 | $(L5_LIB_OBJS): $(LIB_SRCS) 40 | (cppflags="$(L5_CPPFLAGS)"; $(MMakeCompileC)) 41 | 42 | $(L5_FTL_LIB): $(L5_LIB_OBJS) 43 | $(MMakeLinkStaticLib) 44 | 45 | 46 | endif 47 | -------------------------------------------------------------------------------- /src/lib/efabcfg/mmake.mk: -------------------------------------------------------------------------------- 1 | SUBDIRS := ftl 2 | 3 | TARGET := $(EFABCFG_LIB) 4 | 5 | LIB_SRCS := lib_efabcfg.c pattern.c 6 | 7 | LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%.o) 8 | 9 | ifndef MMAKE_NO_RULES 10 | 11 | all: $(TARGET) 12 | +@$(MakeSubdirs) 13 | 14 | lib: $(TARGET) 15 | 16 | clean: 17 | @$(MakeClean) 18 | 19 | $(TARGET): $(LIB_OBJS) 20 | $(MMakeLinkStaticLib) 21 | 22 | endif 23 | 24 | ###################################################### 25 | # linux kbuild support 26 | # 27 | ifdef MMAKE_USE_KBUILD 28 | all: 29 | $(MAKE) $(MMAKE_KBUILD_ARGS) SUBDIRS=$(BUILDPATH)/lib/efabcfg _module_$(BUILDPATH)/lib/efabcfg 30 | clean: 31 | @$(MakeClean) 32 | rm -f lib.a 33 | endif 34 | 35 | ifdef MMAKE_IN_KBUILD 36 | LIB_OBJS := $(LIB_SRCS:%.c=%.o) 37 | lib-y := $(LIB_OBJS) 38 | endif 39 | 40 | -------------------------------------------------------------------------------- /src/lib/efhw/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TARGET := $(EFHW_LIB) 3 | MMAKE_TYPE := LIB 4 | 5 | LIB_SRCS := nic.c \ 6 | eeprom.c \ 7 | eventq.c \ 8 | falcon.c \ 9 | falcon_mac.c \ 10 | falcon_iscsi.c \ 11 | falcon_spi.c \ 12 | ef10.c 13 | 14 | ifndef MMAKE_NO_RULES 15 | 16 | MMAKE_OBJ_PREFIX := ef_hw_ 17 | LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%.o) 18 | 19 | all: $(TARGET) 20 | 21 | lib: $(TARGET) 22 | 23 | clean: 24 | @$(MakeClean) 25 | 26 | $(TARGET): $(LIB_OBJS) 27 | $(MMakeLinkStaticLib) 28 | endif 29 | 30 | 31 | ###################################################### 32 | # linux kbuild support 33 | # 34 | ifdef MMAKE_USE_KBUILD 35 | all: 36 | $(MAKE) $(MMAKE_KBUILD_ARGS) SUBDIRS=$(BUILDPATH)/lib/efhw _module_$(BUILDPATH)/lib/efhw 37 | clean: 38 | @$(MakeClean) 39 | rm -f lib.a 40 | endif 41 | 42 | ifdef MMAKE_IN_KBUILD 43 | LIB_OBJS := $(LIB_SRCS:%.c=%.o) 44 | lib-y := $(LIB_OBJS) 45 | endif 46 | -------------------------------------------------------------------------------- /src/lib/efrm/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TARGET := $(EFRM_LIB) 3 | MMAKE_TYPE := LIB 4 | 5 | LIB_SRCS := assert_valid.c \ 6 | buffer_table.c \ 7 | efrm_vi_set.c \ 8 | efrm_pd.c \ 9 | efrm_pio.c \ 10 | iobufset_resource.c \ 11 | resource_manager.c \ 12 | resources.c \ 13 | vi_resource_alloc.c \ 14 | vi_resource_event.c \ 15 | vi_resource_flush.c \ 16 | vi_resource_manager.c \ 17 | vi_resource_info.c \ 18 | vi_allocator.c \ 19 | vf_resource.c \ 20 | buddy.c \ 21 | kfifo.c \ 22 | driver_object.c \ 23 | licensing.c 24 | 25 | 26 | ifndef MMAKE_NO_RULES 27 | 28 | MMAKE_OBJ_PREFIX := ef_rm_ 29 | LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%.o) 30 | 31 | all: $(TARGET) 32 | 33 | lib: $(TARGET) 34 | 35 | clean: 36 | @$(MakeClean) 37 | 38 | $(TARGET): $(LIB_OBJS) $(LIB_OBJS1) 39 | $(MMakeLinkStaticLib) 40 | endif 41 | 42 | 43 | ###################################################### 44 | # linux kbuild support 45 | # 46 | ifdef MMAKE_USE_KBUILD 47 | all: 48 | $(MAKE) $(MMAKE_KBUILD_ARGS) SUBDIRS=$(BUILDPATH)/lib/efrm _module_$(BUILDPATH)/lib/efrm 49 | clean: 50 | @$(MakeClean) 51 | rm -f lib.a 52 | endif 53 | 54 | ifdef MMAKE_IN_KBUILD 55 | LIB_OBJS := $(LIB_SRCS:%.c=%.o) 56 | lib-y := $(LIB_OBJS) 57 | endif 58 | -------------------------------------------------------------------------------- /src/lib/efthrm/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TARGET := $(EFTHRM_LIB) 3 | MMAKE_TYPE := LIB 4 | 5 | LIB_SRCS := cplane.c \ 6 | cplane_prot.c \ 7 | eplock_resource_manager.c \ 8 | tcp_helper_endpoint.c \ 9 | tcp_helper_resource.c \ 10 | tcp_helper_cluster.c \ 11 | tcp_helper_ioctl.c \ 12 | tcp_helper_mmap.c \ 13 | tcp_helper_sleep.c \ 14 | tcp_filters.c \ 15 | oof_filters.c \ 16 | oof_onload.c \ 17 | driverlink_filter.c \ 18 | ip_prot_rx.c \ 19 | ip_protocols.c \ 20 | efabcfg.c \ 21 | onload_nic.c \ 22 | id_pool.c \ 23 | dump_to_user.c \ 24 | iobufset.c 25 | 26 | ifeq ($(LINUX),1) 27 | LIB_SRCS += tcp_helper_linux.c 28 | endif 29 | 30 | ifndef MMAKE_NO_RULES 31 | 32 | MMAKE_OBJ_PREFIX := ef_thrm_ 33 | LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%.o) 34 | 35 | all: $(TARGET) 36 | 37 | lib: $(TARGET) 38 | 39 | clean: 40 | @$(MakeClean) 41 | 42 | $(TARGET): $(LIB_OBJS) $(LIB_OBJS1) 43 | $(MMakeLinkStaticLib) 44 | endif 45 | 46 | 47 | ###################################################### 48 | # linux kbuild support 49 | # 50 | ifdef MMAKE_USE_KBUILD 51 | all: 52 | $(MAKE) $(MMAKE_KBUILD_ARGS) SUBDIRS=$(BUILDPATH)/lib/efthrm _module_$(BUILDPATH)/lib/efthrm 53 | clean: 54 | @$(MakeClean) 55 | rm -f lib.a 56 | endif 57 | 58 | ifdef MMAKE_IN_KBUILD 59 | LIB_OBJS := $(LIB_SRCS:%.c=%.o) 60 | lib-y := $(LIB_OBJS) 61 | endif 62 | -------------------------------------------------------------------------------- /src/lib/efthrm/tcp_filters_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author djr 20 | ** \brief Helpers for filter code. 21 | ** \date 20090317 22 | ** \cop (c) Solarflare Communications Inc. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | #ifndef __TCP_FILTERS_INTERNAL_H__ 28 | #define __TCP_FILTERS_INTERNAL_H__ 29 | 30 | 31 | #define FMT_PROTOCOL(p) ((p) == IPPROTO_TCP ? "TCP": \ 32 | (p) == IPPROTO_UDP ? "UDP" : "???") 33 | 34 | #define FMT_PORT(p) ((int) CI_BSWAP_BE16(p)) 35 | 36 | #define IP_FMT CI_IP_PRINTF_FORMAT 37 | #define IP_ARG(ip) CI_IP_PRINTF_ARGS(&(ip)) 38 | 39 | #define IPPORT_FMT IP_FMT":%d" 40 | #define IPPORT_ARG(ip,p) IP_ARG(ip), FMT_PORT(p) 41 | 42 | 43 | #endif /* __TCP_FILTERS_INTERNAL_H__ */ 44 | -------------------------------------------------------------------------------- /src/lib/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS := citools ciapp efhwdef 3 | 4 | ifeq ($(DRIVER_TYPE),iscsi) 5 | DRIVER_SUBDIRS := citools iscsi sfgpxe 6 | endif 7 | 8 | ifeq ($(LINUX),1) 9 | DRIVER_SUBDIRS := citools ciul transport efabcfg 10 | OTHER_SUBDIRS := spektor 11 | SUBDIRS += sfcaffinity sfgpxe onload_ext fsbc 12 | endif 13 | 14 | ifeq ($(SOLARIS),1) 15 | SUBDIRS := sfgpxe 16 | # libcitools; particularly sysdep.h does not have sparcv9 support at present 17 | ifneq ($(ISA),sparcv9) 18 | SUBDIRS += citools ciapp efhwdef 19 | endif 20 | endif 21 | 22 | ifeq ($(GNU),1) 23 | SUBDIRS += ciul efabcfg transport tools 24 | endif 25 | 26 | 27 | all: 28 | +@(export MMAKE_NO_CSTYLE=1; $(MakeSubdirs)) 29 | 30 | clean: 31 | @$(MakeClean) 32 | 33 | -------------------------------------------------------------------------------- /src/lib/onload_ext/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | # dynamic shared lib 3 | DLIB_SRCS := onload_ext.c 4 | DLIB_OBJS := $(DLIB_SRCS:%.c=%.o) 5 | 6 | # static lib 7 | ONLOAD_EXT_STATIC := libonload_ext.a 8 | SLIB_SRCS := onload_ext_static.c 9 | SLIB_OBJS := $(SLIB_SRCS:%.c=%.o) 10 | 11 | TARGETS := $(ONLOAD_EXT_REALNAME) 12 | TARGETS += $(ONLOAD_EXT_SONAME) 13 | TARGETS += $(ONLOAD_EXT_LINKNAME) 14 | TARGETS += $(ONLOAD_EXT_STATIC) 15 | 16 | MMAKE_CFLAGS += -DONLOAD_EXT_VERSION_MAJOR=$(ONLOAD_EXT_VERSION_MAJOR) 17 | MMAKE_CFLAGS += -DONLOAD_EXT_VERSION_MINOR=$(ONLOAD_EXT_VERSION_MINOR) 18 | MMAKE_CFLAGS += -DONLOAD_EXT_VERSION_MICRO=$(ONLOAD_EXT_VERSION_MICRO) 19 | 20 | 21 | MMAKE_TYPE := DLL 22 | 23 | 24 | all: $(TARGETS) 25 | 26 | lib: $(TARGETS) 27 | 28 | clean: 29 | @$(MakeClean) 30 | 31 | 32 | $(ONLOAD_EXT_REALNAME): $(DLIB_OBJS) 33 | @(soname="$(ONLOAD_EXT_SONAME)"; $(MMakeLinkDynamicLib)) 34 | 35 | $(ONLOAD_EXT_SONAME): $(ONLOAD_EXT_REALNAME) 36 | ln -fs $(shell basename $^) $@ 37 | 38 | $(ONLOAD_EXT_LINKNAME): $(ONLOAD_EXT_REALNAME) 39 | ln -fs $(shell basename $^) $@ 40 | 41 | $(ONLOAD_EXT_STATIC): $(SLIB_OBJS) 42 | $(MMakeLinkStaticLib) 43 | -------------------------------------------------------------------------------- /src/lib/sfcaffinity/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TARGETS := libsfcaffinity.so 3 | MMAKE_TYPE := DLL 4 | 5 | 6 | all: $(TARGETS) 7 | 8 | lib: $(TARGETS) 9 | 10 | clean: 11 | @$(MakeClean) 12 | 13 | 14 | lib%.so: %.o 15 | @(libs="-ldl"; $(MMakeLinkPreloadLib)) 16 | -------------------------------------------------------------------------------- /src/lib/tools/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS := preload 3 | 4 | all: 5 | +@$(MakeSubdirs) 6 | 7 | clean: 8 | @$(MakeClean) 9 | 10 | -------------------------------------------------------------------------------- /src/lib/tools/preload/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TARGETS := libefabnetstat_pl.so libaf_onload.so 3 | MMAKE_TYPE := DLL 4 | 5 | ifneq ($(ONLOAD_ONLY),1) 6 | # 7 | # Only build wrapper lib. if valgrind.h found 8 | # 9 | VALGRIND_INCLUDE := /misc/apps/valgrind/valgrind-3.2.3/include 10 | VALGRIND_H := $(VALGRIND_INCLUDE)/valgrind.h 11 | ifeq ($(shell ls $(VALGRIND_H) 2>/dev/null), $(VALGRIND_H)) 12 | TARGETS += libvg_IOPort_access.so 13 | MMAKE_INCLUDE += -I $(VALGRIND_INCLUDE) 14 | else 15 | 16 | # Try system valgrind 17 | VALGRIND_H := /usr/include/valgrind/valgrind.h 18 | VALGRIND_MAJOR := $(shell grep -e '\#define\s*__VALGRIND_MAJOR__' $(VALGRIND_H) |awk '{print $$3}') 19 | VALGRIND_MAJOR := $(shell grep -e '\#define\s*__VALGRIND_MAJOR__' $(VALGRIND_H) |awk '{print $$3}') 20 | VALGRIND_MINOR := $(shell grep -e '\#define\s*__VALGRIND_MINOR__' $(VALGRIND_H) |awk '{print $$3}') 21 | ifeq ($(shell ls $(VALGRIND_H) 2>/dev/null), $(VALGRIND_H)) 22 | ifeq ($(VALGRIND_MAJOR), 3) 23 | ifeq ($(shell test "$(VALGRIND_MINOR)" -ge 2 && echo ok), ok) 24 | TARGETS += libvg_IOPort_access.so 25 | MMAKE_INCLUDE += -I /usr/include/valgrind 26 | endif 27 | endif 28 | endif 29 | 30 | endif 31 | endif 32 | 33 | 34 | all: $(TARGETS) 35 | 36 | lib: $(TARGETS) 37 | 38 | clean: 39 | @$(MakeClean) 40 | 41 | 42 | lib%.so: %.o 43 | @(libs="-ldl"; $(MMakeLinkPreloadLib)) 44 | 45 | # 46 | # We want this lib to initialize - so get rid of '-nostartfiles' 47 | # 48 | libvg_IOPort_access.so: vg_IOPort_access.o 49 | @(soname=libvg_IOPort_access.so; $(MMakeLinkDynamicLib)) 50 | -------------------------------------------------------------------------------- /src/lib/transport/common/lock.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file lock.c 18 | ** 19 | ** \author al 20 | ** \brief Interface to common user-level lock 21 | ** \date 2005/09/22 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_transport_common */ 28 | 29 | #include 30 | 31 | /* *************************** 32 | * Global vars 33 | */ 34 | 35 | /*! Common user-level lock */ 36 | citp_ul_lock_t citp_ul_lock; 37 | 38 | 39 | /*! \cidoxg_end */ 40 | -------------------------------------------------------------------------------- /src/lib/transport/common/log.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file pcap.c 18 | ** 19 | ** \author ak 20 | ** \brief Interface to common transport logging functions 21 | ** \date 2005/09/22 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_transport_common */ 28 | 29 | #include 30 | 31 | /* *************************** 32 | * Global vars 33 | */ 34 | 35 | /*! Current logging level/mask */ 36 | unsigned citp_log_level = CI_UL_LOG_E | CI_UL_LOG_U; 37 | 38 | 39 | /*! \cidoxg_end */ 40 | -------------------------------------------------------------------------------- /src/lib/transport/common/mmake.mk: -------------------------------------------------------------------------------- 1 | TARGET := $(CITPCOMMON_LIB) 2 | MMAKE_TYPE := LIB 3 | 4 | LIB_SRCS := \ 5 | log.c \ 6 | netif_init.c \ 7 | lock.c 8 | 9 | MMAKE_OBJ_PREFIX := ci_tp_common_ 10 | LIB_OBJS := $(LIB_SRCS:%.c=$(MMAKE_OBJ_PREFIX)%.o) 11 | 12 | all: $(TARGET) 13 | 14 | lib: $(TARGET) 15 | 16 | clean: 17 | @$(MakeClean) 18 | 19 | $(TARGET): $(LIB_OBJS) 20 | $(MMakeLinkStaticLib) 21 | -------------------------------------------------------------------------------- /src/lib/transport/ip/sockerr.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author stg 20 | ** \brief Per-socket error handler 21 | ** \date 2004/6/30 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_transport_ip */ 28 | 29 | #include "ip_internal.h" 30 | 31 | 32 | 33 | /*! \cidoxg_end */ 34 | -------------------------------------------------------------------------------- /src/lib/transport/ip/tcp_driver_ops.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author djr 20 | ** \brief TCP helper dependent driver / kernel specifics for libef. 21 | ** \date 2006/06/13 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_ef */ 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #ifndef __KERNEL__ 34 | # error "kernel-only source file" 35 | #endif 36 | 37 | int ci_tcp_helper_more_bufs(ci_netif* ni) 38 | { 39 | return efab_tcp_helper_more_bufs(netif2tcp_helper_resource(ni)); 40 | } 41 | 42 | int ci_tcp_helper_more_socks(ci_netif* ni) 43 | { 44 | return efab_tcp_helper_more_socks(netif2tcp_helper_resource(ni)); 45 | } 46 | 47 | /*! \cidoxg_end */ 48 | -------------------------------------------------------------------------------- /src/lib/transport/mmake.mk: -------------------------------------------------------------------------------- 1 | SUBDIRS := ip common unix 2 | DRIVER_SUBDIRS := ip 3 | 4 | 5 | all: 6 | +@$(MakeSubdirs) 7 | 8 | clean: 9 | @$(MakeClean) 10 | 11 | -------------------------------------------------------------------------------- /src/lib/transport/unix/exec.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /**************************************************************************\ 17 | *//*! \file 18 | ** 19 | ** \author Elena Vengerova 20 | ** \brief Restore information about TCP helper(s) and endpoints after exec() 21 | ** \date 22 | ** \cop (c) Level 5 Networks Limited. 23 | ** 24 | *//* 25 | \**************************************************************************/ 26 | 27 | /*! \cidoxg_lib_transport_unix */ 28 | 29 | 30 | /*! \cidoxg_end */ 31 | 32 | -------------------------------------------------------------------------------- /src/lib/transport/unix/mapfile.ilp32: -------------------------------------------------------------------------------- 1 | L5 { 2 | global: 3 | level5_copyright_msg; 4 | setrlimit; 5 | setrlimit64; 6 | socket; 7 | bind; 8 | listen; 9 | shutdown; 10 | getsockname; 11 | getpeername; 12 | getsockopt; 13 | setsockopt; 14 | readv; 15 | writev; 16 | ioctl; 17 | dup; 18 | dup2; 19 | accept; 20 | connect; 21 | recv; 22 | recvfrom; 23 | recvmsg; 24 | send; 25 | sendto; 26 | sendmsg; 27 | sendfile; 28 | sendfile64; 29 | sendfilev; 30 | read; 31 | write; 32 | close; 33 | fcntl; 34 | vfork; 35 | poll; 36 | select; 37 | open; 38 | open64; 39 | creat; 40 | creat64; 41 | socketpair; 42 | pipe; 43 | bsd_signal; 44 | signal; 45 | sigaction; 46 | chroot; 47 | _fxstat; 48 | aio_read; 49 | aio_write; 50 | aio_error; 51 | aio_return; 52 | aio_cancel; 53 | aio_suspend; 54 | aio_fsync; 55 | lio_listio; 56 | aio_read64; 57 | aio_write64; 58 | aio_error64; 59 | aio_return64; 60 | aio_cancel64; 61 | aio_suspend64; 62 | aio_fsync64; 63 | lio_listio64; 64 | local: 65 | *; 66 | }; 67 | -------------------------------------------------------------------------------- /src/lib/transport/unix/mapfile.lp64: -------------------------------------------------------------------------------- 1 | L5 { 2 | global: 3 | level5_copyright_msg; 4 | setrlimit; 5 | socket; 6 | bind; 7 | listen; 8 | shutdown; 9 | getsockname; 10 | getpeername; 11 | getsockopt; 12 | setsockopt; 13 | readv; 14 | writev; 15 | ioctl; 16 | dup; 17 | dup2; 18 | accept; 19 | connect; 20 | recv; 21 | recvfrom; 22 | recvmsg; 23 | send; 24 | sendto; 25 | sendmsg; 26 | sendfile; 27 | sendfilev; 28 | read; 29 | write; 30 | close; 31 | fcntl; 32 | vfork; 33 | poll; 34 | select; 35 | open; 36 | creat; 37 | socketpair; 38 | pipe; 39 | bsd_signal; 40 | signal; 41 | sigaction; 42 | chroot; 43 | fstat; 44 | aio_read; 45 | aio_write; 46 | aio_error; 47 | aio_return; 48 | aio_cancel; 49 | aio_suspend; 50 | aio_fsync; 51 | lio_listio; 52 | local: 53 | *; 54 | }; 55 | -------------------------------------------------------------------------------- /src/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | DRIVER_SUBDIRS := lib driver 3 | 4 | ifeq ($(WINDOWS),1) 5 | OTHER_SUBDIRS := app 6 | SUBDIRS := include lib tools tests 7 | DRIVER_SUBDIRS += tools 8 | INSTALLER_SUBDIRS := tools 9 | endif 10 | 11 | ifeq ($(GNU),1) 12 | SUBDIRS := include lib app driver tools tests 13 | endif 14 | 15 | ifeq ($(SOLARIS),1) 16 | SUBDIRS := lib app tools tests 17 | endif 18 | 19 | ifeq ($(FREEBSD), 1) 20 | SUBDIRS := include lib app driver tools tests 21 | endif 22 | 23 | ifeq ($(MACOSX), 1) 24 | SUBDIRS := lib tools tests 25 | endif 26 | 27 | ifeq ($(LINUX),1) 28 | DRIVER_SUBDIRS := lib driver 29 | OTHER_DRIVER_SUBDIRS := tests 30 | endif 31 | 32 | ifeq ($(GLD),1) 33 | SUBDIRS := driver 34 | endif 35 | 36 | ifeq ($(DOS),1) 37 | SUBDIRS := driver 38 | endif 39 | 40 | ifeq ($(DOS32_UTILS)$(LINUX_UIO_UTILS),1) 41 | SUBDIRS := tools 42 | endif 43 | 44 | ifeq ($(SPECIAL_TOP_RULES),1) 45 | 46 | all: special_top_all 47 | 48 | clean: special_top_clean 49 | 50 | else 51 | 52 | all: 53 | ifeq ($(LINUX),1) 54 | ifneq ($(GNU),1) 55 | # Build both autocompat.h files: linux_net and linux_affinity. 56 | $(MAKE) -C driver/linux_net 57 | $(MAKE) -C driver/linux_affinity \ 58 | $(BUILDPATH)/driver/linux_affinity/autocompat.h 59 | endif 60 | endif 61 | +@$(MakeSubdirs) 62 | 63 | clean: 64 | @$(MakeClean) 65 | endif 66 | -------------------------------------------------------------------------------- /src/tests/ef_vi/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | TEST_APPS := efpingpong efforward efrss efsink efpio eftap \ 3 | efsink_packed efforward_packed \ 4 | efdelegated_client efdelegated_server 5 | 6 | TARGETS := $(TEST_APPS:%=$(AppPattern)) 7 | 8 | 9 | MMAKE_LIBS := $(LINK_CIUL_LIB) 10 | MMAKE_LIB_DEPS := $(CIUL_LIB_DEPEND) 11 | 12 | 13 | all: $(TARGETS) 14 | 15 | clean: 16 | @$(MakeClean) 17 | 18 | 19 | efsink: efsink.o utils.o 20 | 21 | efsink_packed: efsink_packed.o utils.o 22 | 23 | efforward_packed: efforward_packed.o utils.o 24 | 25 | efpingpong: MMAKE_LIBS += $(LINK_CITOOLS_LIB) 26 | efpingpong: MMAKE_LIB_DEPS += $(CITOOLS_LIB_DEPEND) 27 | 28 | efdelegated_server: MMAKE_LIBS += $(LINK_ONLOAD_EXT_LIB) 29 | efdelegated_server: MMAKE_LIB_DEPS += $(ONLOAD_EXT_LIB_DEPEND) 30 | 31 | efpio: MMAKE_LIBS += $(LINK_CITOOLS_LIB) 32 | efpio: MMAKE_LIB_DEPS += $(CITOOLS_LIB_DEPEND) 33 | 34 | eftap: MMAKE_LIBS += $(LINK_CITOOLS_LIB) 35 | eftap: MMAKE_LIB_DEPS += $(CITOOLS_LIB_DEPEND) 36 | -------------------------------------------------------------------------------- /src/tests/mmake.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(GNU),1) 2 | SUBDIRS := ciul \ 3 | nic \ 4 | ip \ 5 | citools \ 6 | driver \ 7 | ef_vi \ 8 | onload 9 | 10 | 11 | OTHER_SUBDIRS := tweaks \ 12 | syscalls 13 | 14 | ifdef BROKEN 15 | OTHER_SUBDIRS += cplane 16 | endif 17 | 18 | ifeq ($(ONLOAD_ONLY),1) 19 | SUBDIRS := ef_vi \ 20 | onload 21 | endif 22 | endif 23 | 24 | DRIVER_SUBDIRS := driver 25 | 26 | ifeq ($(FREEBSD),1) 27 | SUBDIRS := ip 28 | DRIVER_SUBDIRS := 29 | OTHER_SUBDIRS := 30 | endif 31 | 32 | ifeq ($(MACOSX),1) 33 | SUBDIRS := ip 34 | DRIVER_SUBDIRS := 35 | OTHER_SUBDIRS := 36 | endif 37 | 38 | ifeq ($(SOLARIS),1) 39 | SUBDIRS := solaris nic ip 40 | DRIVER_SUBDIRS := 41 | OTHER_SUBDIRS := 42 | endif 43 | 44 | all: 45 | +@$(MakeSubdirs) 46 | 47 | clean: 48 | @$(MakeClean) 49 | 50 | -------------------------------------------------------------------------------- /src/tests/onload/extensions/.onload_intercept: -------------------------------------------------------------------------------- 1 | set protocol 1 2 | set default 1 3 | name T1 E1_% 4 | name Thread1 Long_% 5 | num 2 Second 6 | -------------------------------------------------------------------------------- /src/tests/onload/extensions/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS := libpthread_intercept.so.1.0.0.1 \ 2 | onload_fd_stat \ 3 | onload_is_present \ 4 | onload_move_fd \ 5 | onload_set_stackname \ 6 | onload_stack_opt \ 7 | onload_thread_set_spin \ 8 | libpthread_test 9 | 10 | 11 | MMAKE_CFLAGS := -g -I../../../include/ -fPIC 12 | MMAKE_LIB := -g -shared 13 | MMAKE_EXTLIBS := -L../../../../build/gnu_x86_64/lib/onload_ext/ \ 14 | -L../../../../build/gnu_x86/lib/onload_ext/ \ 15 | -lonload_ext -lpthread 16 | CC := gcc 17 | 18 | %.o: %.c 19 | @$(CC) $(MMAKE_CFLAGS) -c $^ 20 | 21 | 22 | libpthread_intercept.so.1.0.0.1: libpthread_intercept.o 23 | @$(CC) $(MMAKE_LIB) -Wl,-soname,v.so.1 -ldl -o $@ libpthread_intercept.o 24 | 25 | libpthread_test: 26 | @$(CC) $(MMAKE_EXTLIBS) $(MMAKE_CFLAGS) -g libpthread_test.c -o $@ 27 | 28 | onload_fd_stat: onload_fd_stat.c 29 | @$(CC) $(MMAKE_EXTLIBS) -o$@ $^ 30 | onload_is_present: onload_is_present.c 31 | @$(CC) $(MMAKE_EXTLIBS) -o$@ $^ 32 | onload_move_fd: onload_move_fd.c 33 | @$(CC) $(MMAKE_EXTLIBS) -o$@ $^ 34 | onload_set_stackname: onload_set_stackname.c 35 | @$(CC) $(MMAKE_EXTLIBS) -o$@ $^ 36 | onload_stack_opt: onload_stack_opt.c 37 | @$(CC) $(MMAKE_EXTLIBS) -o$@ $^ 38 | onload_thread_set_spin: onload_thread_set_spin.c 39 | @$(CC) $(MMAKE_EXTLIBS) -o$@ $^ 40 | 41 | 42 | test: $(TARGETS) 43 | @onload ./onload_is_present 44 | @LPI_INTERCEPT_CONFIG_FILE="./.onload_intercept" \ 45 | LD_PRELOAD="./libpthread_intercept.so.1.0.0.1 libonload.so" \ 46 | ./libpthread_test 47 | 48 | all: $(TARGETS) 49 | 50 | targets: 51 | @echo $(TARGETS) test 52 | 53 | clean: 54 | @rm *.o $(TARGETS) 55 | -------------------------------------------------------------------------------- /src/tests/onload/extensions/onload_is_present.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /* 17 | * Build the file using the following command: 18 | * $ gcc -oonload_is_present -lonload_ext onload_is_present.c 19 | * 20 | * Test by running the following two commands: 21 | * $ ./onload_is_present 22 | * Program running without Onload 23 | * $ onload ./onload_is_present 24 | * Program running with Onload 25 | * $ 26 | */ 27 | #include 28 | 29 | #include 30 | 31 | int main(void) 32 | { 33 | if( onload_is_present() ) 34 | printf("Program running with Onload\n"); 35 | else 36 | printf("Program running without Onload\n"); 37 | 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /src/tests/onload/hwtimestamping/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS := rx_timestamping tx_timestamping 2 | 3 | # Turning on high warning level 4 | MMAKE_CFLAGS := -fno-strict-aliasing -W -Wall -Wunused-parameter \ 5 | -Wunused-function -Wunused-label -Wpointer-arith \ 6 | -Wformat -Wreturn-type -Wsign-compare -Wmultichar \ 7 | -Wformat-nonliteral -Winit-self -Wuninitialized \ 8 | -Wformat-security -Werror -g -O 9 | 10 | MMAKE_CFLAGS += -I../../../include 11 | 12 | CC := gcc 13 | 14 | # Use the kernel timestamping headers for definition, unless they don't exist 15 | # in which case we will fall back to our own definitions. 16 | # We need both these two files to exist: 17 | ts_missing = 18 | ifeq (,$(wildcard /usr/include/linux/net_tstamp.h)) 19 | ts_missing = yes 20 | endif 21 | ifeq (,$(wildcard /usr/include/linux/sockios.h)) 22 | ts_missing = yes 23 | endif 24 | ifdef ts_missing 25 | MMAKE_CFLAGS += -DNO_KERNEL_TS_INCLUDE 26 | endif 27 | 28 | %.o: %.c 29 | @$(CC) $(MMAKE_CFLAGS) -c $^ 30 | 31 | all: $(TARGETS) 32 | 33 | rx_timestamping: rx_timestamping.o 34 | @$(CC) $(MMAKE_CFLAGS) $^ -o $@ 35 | 36 | tx_timestamping: tx_timestamping.o 37 | @$(CC) $(MMAKE_CFLAGS) $^ -o $@ 38 | 39 | targets: 40 | @echo $(TARGETS) 41 | 42 | clean: 43 | @rm *.o $(TARGETS) 44 | -------------------------------------------------------------------------------- /src/tests/onload/mmake.mk: -------------------------------------------------------------------------------- 1 | SUBDIRS := wire_order 2 | 3 | all: 4 | +@$(MakeSubdirs) 5 | 6 | clean: 7 | @$(MakeClean) 8 | 9 | -------------------------------------------------------------------------------- /src/tests/onload/wire_order/mmake.mk: -------------------------------------------------------------------------------- 1 | # Only build if USEONLOADEXT is defined 2 | ifneq ($(strip $(USEONLOADEXT)),) 3 | 4 | TARGETS := wire_order_client wire_order_server 5 | 6 | MMAKE_LIBS += $(LINK_ONLOAD_EXT_LIB) 7 | MMAKE_LIB_DEPS += $(ONLOAD_EXT_LIB_DEPEND) 8 | CFLAGS += -DONLOADEXT_AVAILABLE 9 | 10 | all: $(TARGETS) 11 | 12 | targets: 13 | @echo $(TARGETS) 14 | 15 | clean: 16 | @$(MakeClean) 17 | 18 | endif 19 | -------------------------------------------------------------------------------- /src/tests/onload/wire_order/wire_order.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | #ifndef WIRE_ORDER_H 17 | #define WIRE_ORDER_H 18 | 19 | /* Default port the server runs on */ 20 | #define DEFAULT_PORT 2048 21 | 22 | /* Default size of the listen queue */ 23 | #define DEFAULT_LISTEN_BACKLOG 100 24 | 25 | /* Default number of events to request in onload_ordered_epoll_wait() */ 26 | #define DEFAULT_MAX_EPOLL_EVENTS 10 27 | 28 | /* Flags for configuring the server setup. */ 29 | #define WIRE_ORDER_CFG_FLAGS_UDP 1 30 | 31 | #define WIRE_ORDER_CFG_LEN 8 32 | #define WIRE_ORDER_CFG_FLAGS_OFST 0 33 | #define WIRE_ORDER_CFG_N_SOCKS_OFST 4 34 | 35 | #endif /* WIRE_ORDER_H */ 36 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2014 Petri Lehtinen 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = CHANGES LICENSE README.rst CMakeLists.txt cmake android 2 | SUBDIRS = doc src test 3 | 4 | # "make distcheck" builds the dvi target, so use it to check that the 5 | # documentation is built correctly. 6 | dvi: 7 | $(MAKE) SPHINXOPTS_EXTRA=-W html 8 | 9 | pkgconfigdir = $(libdir)/pkgconfig 10 | pkgconfig_DATA = jansson.pc 11 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/cmake/CheckFunctionKeywords.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCSourceCompiles) 2 | 3 | macro(check_function_keywords _wordlist) 4 | set(${_result} "") 5 | foreach(flag ${_wordlist}) 6 | string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}") 7 | string(TOUPPER "${flagname}" flagname) 8 | set(have_flag "HAVE_${flagname}") 9 | check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag}) 10 | if(${have_flag} AND NOT ${_result}) 11 | set(${_result} "${flag}") 12 | # break() 13 | endif(${have_flag} AND NOT ${_result}) 14 | endforeach(flag) 15 | endmacro(check_function_keywords) 16 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/cmake/JanssonConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # - Config file for the jansson package 2 | # It defines the following variables 3 | # JANSSON_INCLUDE_DIRS - include directories for FooBar 4 | # JANSSON_LIBRARIES - libraries to link against 5 | 6 | # Get the path of the current file. 7 | get_filename_component(JANSSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 8 | 9 | # Set the include directories. 10 | set(JANSSON_INCLUDE_DIRS "@JANSSON__INCLUDE_DIRS@") 11 | 12 | # Include the project Targets file, this contains definitions for IMPORTED targets. 13 | include(${JANSSON_CMAKE_DIR}/JanssonTargets.cmake) 14 | 15 | # IMPORTED targets from JanssonTargets.cmake 16 | set(JANSSON_LIBRARIES jansson) 17 | 18 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/cmake/JanssonConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@JANSSON_DISPLAY_VERSION@") 2 | 3 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 4 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 5 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 6 | else() 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 9 | set(PACKAGE_VERSION_EXACT TRUE) 10 | endif() 11 | endif() 12 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/cmake/jansson_private_config.h.cmake: -------------------------------------------------------------------------------- 1 | #cmakedefine HAVE_ENDIAN_H 1 2 | #cmakedefine HAVE_FCNTL_H 1 3 | #cmakedefine HAVE_SCHED_H 1 4 | #cmakedefine HAVE_UNISTD_H 1 5 | #cmakedefine HAVE_SYS_PARAM_H 1 6 | #cmakedefine HAVE_SYS_STAT_H 1 7 | #cmakedefine HAVE_SYS_TIME_H 1 8 | #cmakedefine HAVE_SYS_TYPES_H 1 9 | #cmakedefine HAVE_STDINT_H 1 10 | 11 | #cmakedefine HAVE_CLOSE 1 12 | #cmakedefine HAVE_GETPID 1 13 | #cmakedefine HAVE_GETTIMEOFDAY 1 14 | #cmakedefine HAVE_OPEN 1 15 | #cmakedefine HAVE_READ 1 16 | #cmakedefine HAVE_SCHED_YIELD 1 17 | 18 | #cmakedefine HAVE_SYNC_BUILTINS 1 19 | #cmakedefine HAVE_ATOMIC_BUILTINS 1 20 | 21 | #cmakedefine HAVE_LOCALE_H 1 22 | #cmakedefine HAVE_SETLOCALE 1 23 | 24 | #cmakedefine HAVE_INT32_T 1 25 | #ifndef HAVE_INT32_T 26 | # define int32_t @JSON_INT32@ 27 | #endif 28 | 29 | #cmakedefine HAVE_UINT32_T 1 30 | #ifndef HAVE_UINT32_T 31 | # define uint32_t @JSON_UINT32@ 32 | #endif 33 | 34 | #cmakedefine HAVE_UINT16_T 1 35 | #ifndef HAVE_UINT16_T 36 | # define uint16_t @JSON_UINT16@ 37 | #endif 38 | 39 | #cmakedefine HAVE_UINT8_T 1 40 | #ifndef HAVE_UINT8_T 41 | # define uint8_t @JSON_UINT8@ 42 | #endif 43 | 44 | #cmakedefine HAVE_SSIZE_T 1 45 | 46 | #ifndef HAVE_SSIZE_T 47 | # define ssize_t @JSON_SSIZE@ 48 | #endif 49 | 50 | #cmakedefine HAVE_SNPRINTF 1 51 | 52 | #ifndef HAVE_SNPRINTF 53 | # define snprintf @JSON_SNPRINTF@ 54 | #endif 55 | 56 | #cmakedefine HAVE_VSNPRINTF 57 | 58 | #cmakedefine USE_URANDOM 1 59 | #cmakedefine USE_WINDOWS_CRYPTOAPI 1 60 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = conf.py apiref.rst changes.rst conformance.rst \ 2 | gettingstarted.rst github_commits.c index.rst portability.rst \ 3 | tutorial.rst upgrading.rst ext/refcounting.py 4 | 5 | SPHINXBUILD = sphinx-build 6 | SPHINXOPTS = -d _build/doctrees $(SPHINXOPTS_EXTRA) 7 | 8 | html-local: 9 | $(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html 10 | 11 | install-html-local: html 12 | mkdir -p $(DESTDIR)$(htmldir) 13 | cp -r _build/html $(DESTDIR)$(htmldir) 14 | 15 | uninstall-local: 16 | rm -rf $(DESTDIR)$(htmldir) 17 | 18 | clean-local: 19 | rm -rf _build 20 | rm -f ext/refcounting.pyc 21 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/doc/README: -------------------------------------------------------------------------------- 1 | To build the documentation, invoke 2 | 3 | make html 4 | 5 | Then point your browser to _build/html/index.html. 6 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/doc/changes.rst: -------------------------------------------------------------------------------- 1 | ****************** 2 | Changes in Jansson 3 | ****************** 4 | 5 | .. include:: ../CHANGES 6 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/doc/index.rst: -------------------------------------------------------------------------------- 1 | Jansson Documentation 2 | ===================== 3 | 4 | This is the documentation for Jansson_ |release|, last updated |today|. 5 | 6 | Introduction 7 | ------------ 8 | 9 | Jansson_ is a C library for encoding, decoding and manipulating JSON 10 | data. Its main features and design principles are: 11 | 12 | - Simple and intuitive API and data model 13 | 14 | - Comprehensive documentation 15 | 16 | - No dependencies on other libraries 17 | 18 | - Full Unicode support (UTF-8) 19 | 20 | - Extensive test suite 21 | 22 | Jansson is licensed under the `MIT license`_; see LICENSE in the 23 | source distribution for details. 24 | 25 | Jansson is used in production and its API is stable. It works on 26 | numerous platforms, including numerous Unix like systems and Windows. 27 | It's suitable for use on any system, including desktop, server, and 28 | small embedded systems. 29 | 30 | 31 | .. _`MIT license`: http://www.opensource.org/licenses/mit-license.php 32 | .. _Jansson: http://www.digip.org/jansson/ 33 | 34 | Contents 35 | -------- 36 | 37 | .. toctree:: 38 | :maxdepth: 2 39 | 40 | gettingstarted 41 | upgrading 42 | tutorial 43 | conformance 44 | portability 45 | apiref 46 | changes 47 | 48 | 49 | Indices and Tables 50 | ================== 51 | 52 | * :ref:`genindex` 53 | * :ref:`search` 54 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/jansson.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=${prefix}/include 5 | 6 | Name: Jansson 7 | Description: Library for encoding, decoding and manipulating JSON data 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -ljansson 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | LIBS := libjansson.a 3 | 4 | libjansson.a: 5 | cp -a $(TOP)/src/tools/jansson-2.7 . 6 | cd jansson-2.7 && \ 7 | autoreconf -i 8 | mkdir -p build 9 | cd build && \ 10 | ../jansson-2.7/configure && \ 11 | $(MAKE) 12 | cp build/src/.libs/libjansson.a . 13 | 14 | all: $(LIBS) 15 | 16 | clean: 17 | rm -rf jansson-2.7 build libjansson.a ltmain.sh 18 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/src/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = jansson.def 2 | 3 | include_HEADERS = jansson.h jansson_config.h 4 | 5 | lib_LTLIBRARIES = libjansson.la 6 | libjansson_la_SOURCES = \ 7 | dump.c \ 8 | error.c \ 9 | hashtable.c \ 10 | hashtable.h \ 11 | hashtable_seed.c \ 12 | jansson_private.h \ 13 | load.c \ 14 | lookup3.h \ 15 | memory.c \ 16 | pack_unpack.c \ 17 | strbuffer.c \ 18 | strbuffer.h \ 19 | strconv.c \ 20 | utf.c \ 21 | utf.h \ 22 | value.c 23 | libjansson_la_LDFLAGS = \ 24 | -no-undefined \ 25 | -export-symbols-regex '^json_' \ 26 | -version-info 11:0:7 27 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/src/jansson_config.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2014 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | * The configure script copies this file to jansson_config.h and 13 | * replaces @var@ substitutions by values that fit your system. If you 14 | * cannot run the configure script, you can do the value substitution 15 | * by hand. 16 | */ 17 | 18 | #ifndef JANSSON_CONFIG_H 19 | #define JANSSON_CONFIG_H 20 | 21 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 22 | defined to `inline', otherwise empty. In C++, the inline is always 23 | supported. */ 24 | #ifdef __cplusplus 25 | #define JSON_INLINE inline 26 | #else 27 | #define JSON_INLINE @json_inline@ 28 | #endif 29 | 30 | /* If your compiler supports the `long long` type and the strtoll() 31 | library function, JSON_INTEGER_IS_LONG_LONG is defined to 1, 32 | otherwise to 0. */ 33 | #define JSON_INTEGER_IS_LONG_LONG @json_have_long_long@ 34 | 35 | /* If locale.h and localeconv() are available, define to 1, 36 | otherwise to 0. */ 37 | #define JSON_HAVE_LOCALECONV @json_have_localeconv@ 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/src/utf.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2005-2015 Solarflare Communications Inc. 3 | ** 7505 Irvine Center Drive, Irvine, CA 92618, USA 4 | ** Copyright 2002-2005 Level 5 Networks Inc. 5 | ** 6 | ** This program is free software; you can redistribute it and/or modify it 7 | ** under the terms of version 2 of the GNU General Public License as 8 | ** published by the Free Software Foundation. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU General Public License for more details. 14 | */ 15 | 16 | /* 17 | * Copyright (c) 2009-2014 Petri Lehtinen 18 | * 19 | * Jansson is free software; you can redistribute it and/or modify 20 | * it under the terms of the MIT license. See LICENSE for details. 21 | */ 22 | 23 | #ifndef UTF_H 24 | #define UTF_H 25 | 26 | #ifdef HAVE_CONFIG_H 27 | #include 28 | #endif 29 | 30 | #ifdef HAVE_STDINT_H 31 | #include 32 | #endif 33 | 34 | int utf8_encode(int32_t codepoint, char *buffer, size_t *size); 35 | 36 | size_t utf8_check_first(char byte); 37 | size_t utf8_check_full(const char *buffer, size_t size, int32_t *codepoint); 38 | const char *utf8_iterate(const char *buffer, size_t size, int32_t *codepoint); 39 | 40 | int utf8_check_string(const char *string, size_t length); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = bin suites 2 | EXTRA_DIST = scripts run-suites 3 | 4 | TESTS = run-suites 5 | TESTS_ENVIRONMENT = \ 6 | top_srcdir=$(top_srcdir) \ 7 | top_builddir=$(top_builddir) 8 | 9 | clean-local: 10 | rm -rf logs 11 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/bin/Makefile.am: -------------------------------------------------------------------------------- 1 | check_PROGRAMS = json_process 2 | 3 | AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src 4 | LDFLAGS = -static # for speed and Valgrind 5 | LDADD = $(top_builddir)/src/libjansson.la 6 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/run-suites: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while [ -n "$1" ]; do 4 | suite=$1 5 | if [ -x $top_srcdir/test/suites/$suite/run ]; then 6 | SUITES="$SUITES $suite" 7 | else 8 | echo "No such suite: $suite" 9 | exit 1 10 | fi 11 | shift 12 | done 13 | 14 | if [ -z "$SUITES" ]; then 15 | suitedirs=$top_srcdir/test/suites/* 16 | for suitedir in $suitedirs; do 17 | if [ -d $suitedir ]; then 18 | SUITES="$SUITES `basename $suitedir`" 19 | fi 20 | done 21 | fi 22 | 23 | [ -z "$STOP" ] && STOP=0 24 | 25 | suites_srcdir=$top_srcdir/test/suites 26 | suites_builddir=suites 27 | scriptdir=$top_srcdir/test/scripts 28 | logdir=logs 29 | bindir=bin 30 | export suites_srcdir suites_builddir scriptdir logdir bindir 31 | 32 | passed=0 33 | failed=0 34 | for suite in $SUITES; do 35 | echo "Suite: $suite" 36 | if $suites_srcdir/$suite/run $suite; then 37 | passed=$(($passed+1)) 38 | else 39 | failed=$(($failed+1)) 40 | [ $STOP -eq 1 ] && break 41 | fi 42 | done 43 | 44 | if [ $failed -gt 0 ]; then 45 | echo "$failed of $((passed+failed)) test suites failed" 46 | exit 1 47 | else 48 | echo "$passed test suites passed" 49 | rm -rf $logdir 50 | fi 51 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/scripts/valgrind.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009-2014 Petri Lehtinen 2 | # 3 | # Jansson is free software; you can redistribute it and/or modify 4 | # it under the terms of the MIT license. See LICENSE for details. 5 | 6 | [ -z "$VALGRIND" ] && VALGRIND=0 7 | 8 | VALGRIND_CMDLINE="valgrind --leak-check=full --show-reachable=yes --track-origins=yes -q" 9 | 10 | if [ $VALGRIND -eq 1 ]; then 11 | test_runner="$VALGRIND_CMDLINE" 12 | json_process="$VALGRIND_CMDLINE $json_process" 13 | else 14 | test_runner="" 15 | fi 16 | 17 | valgrind_check() { 18 | if [ $VALGRIND -eq 1 ]; then 19 | # Check for Valgrind error output. The valgrind option 20 | # --error-exitcode is not enough because Valgrind doesn't 21 | # think unfreed allocs are errors. 22 | if grep -E -q '^==[0-9]+== ' $1; then 23 | touch $test_log/valgrind_error 24 | return 1 25 | fi 26 | fi 27 | } 28 | 29 | valgrind_show_error() { 30 | if [ $VALGRIND -eq 1 -a -f $test_log/valgrind_error ]; then 31 | echo "valgrind detected an error" 32 | return 0 33 | fi 34 | return 1 35 | } 36 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = api 2 | EXTRA_DIST = invalid invalid-unicode valid 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/api/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = run check-exports 2 | 3 | check_PROGRAMS = \ 4 | test_array \ 5 | test_copy \ 6 | test_dump \ 7 | test_dump_callback \ 8 | test_equal \ 9 | test_load \ 10 | test_loadb \ 11 | test_load_callback \ 12 | test_memory_funcs \ 13 | test_number \ 14 | test_object \ 15 | test_pack \ 16 | test_simple \ 17 | test_unpack 18 | 19 | test_array_SOURCES = test_array.c util.h 20 | test_copy_SOURCES = test_copy.c util.h 21 | test_dump_SOURCES = test_dump.c util.h 22 | test_dump_callback_SOURCES = test_dump_callback.c util.h 23 | test_load_SOURCES = test_load.c util.h 24 | test_loadb_SOURCES = test_loadb.c util.h 25 | test_memory_funcs_SOURCES = test_memory_funcs.c util.h 26 | test_number_SOURCES = test_number.c util.h 27 | test_object_SOURCES = test_object.c util.h 28 | test_pack_SOURCES = test_pack.c util.h 29 | test_simple_SOURCES = test_simple.c util.h 30 | test_unpack_SOURCES = test_unpack.c util.h 31 | 32 | AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src 33 | LDFLAGS = -static # for speed and Valgrind 34 | LDADD = $(top_builddir)/src/libjansson.la 35 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/api/check-exports: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This test checks that libjansson.so exports the correct symbols. 4 | # 5 | 6 | SOFILE="../src/.libs/libjansson.so" 7 | 8 | # The list of symbols, which the shared object should export, is read 9 | # from the def file, which is used in Windows builds 10 | grep 'json_' $top_srcdir/src/jansson.def \ 11 | | sed -e 's/ //g' \ 12 | | sort \ 13 | >$test_log/exports 14 | 15 | nm -D $SOFILE >/dev/null >$test_log/symbols 2>/dev/null \ 16 | || exit 77 # Skip if "nm -D" doesn't seem to work 17 | 18 | grep ' [DT] ' $test_log/symbols | cut -d' ' -f3 | grep -v '^_' | sort >$test_log/output 19 | 20 | if ! cmp -s $test_log/exports $test_log/output; then 21 | diff -u $test_log/exports $test_log/output >&2 22 | exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/api/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2014 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | is_test() { 9 | case "$test_name" in 10 | *.c|check-exports) 11 | return 0 12 | ;; 13 | *) 14 | return 1 15 | ;; 16 | esac 17 | } 18 | 19 | run_test() { 20 | if [ "$test_name" = "check-exports" ]; then 21 | test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr 22 | else 23 | $test_runner $suite_builddir/${test_name%.c} \ 24 | >$test_log/stdout \ 25 | 2>$test_log/stderr \ 26 | || return 1 27 | valgrind_check $test_log/stderr || return 1 28 | fi 29 | } 30 | 31 | show_error() { 32 | valgrind_show_error && return 33 | cat $test_log/stderr 34 | } 35 | 36 | . $top_srcdir/test/scripts/run-tests.sh 37 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/encoded-surrogate-half/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xed near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/encoded-surrogate-half/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/encoded-surrogate-half/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-after-backslash/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unable to decode byte 0xe5 near '"\' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-after-backslash/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-after-backslash/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-array/error: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | unable to decode byte 0xe5 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-array/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-array/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unable to decode byte 0xe5 near '123' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-escape/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unable to decode byte 0xe5 near '"\u' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-escape/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-escape/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-exponent/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unable to decode byte 0xe5 near '1e1' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-exponent/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-exponent/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-identifier/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe5 near 'a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-identifier/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-identifier/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-int/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe5 near '0' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-int/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-int/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unable to decode byte 0xe5 near '1e' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-string/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe5 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-string/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/invalid-utf-8-in-string/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/lone-invalid-utf-8/error: -------------------------------------------------------------------------------- 1 | 1 0 0 2 | unable to decode byte 0xe5 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/lone-invalid-utf-8/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/lone-invalid-utf-8/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/lone-utf-8-continuation-byte/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0x81 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/lone-utf-8-continuation-byte/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/lone-utf-8-continuation-byte/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/not-in-unicode-range/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xf4 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/not-in-unicode-range/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/not-in-unicode-range/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-3-byte-encoding/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe0 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-3-byte-encoding/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-3-byte-encoding/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-4-byte-encoding/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xf0 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-4-byte-encoding/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-4-byte-encoding/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-ascii-encoding/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xc1 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-ascii-encoding/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/overlong-ascii-encoding/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/restricted-utf-8/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xfd near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/restricted-utf-8/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/restricted-utf-8/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2014 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | is_test() { 9 | test -d $test_path 10 | } 11 | 12 | run_test() { 13 | $json_process --env <$test_path/input >$test_log/stdout 2>$test_log/stderr 14 | valgrind_check $test_log/stderr || return 1 15 | cmp -s $test_path/error $test_log/stderr 16 | } 17 | 18 | show_error() { 19 | valgrind_show_error && return 20 | 21 | echo "EXPECTED ERROR:" 22 | nl -bn $test_path/error 23 | echo "ACTUAL ERROR:" 24 | nl -bn $test_log/stderr 25 | } 26 | 27 | . $top_srcdir/test/scripts/run-tests.sh 28 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/truncated-utf-8/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe0 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid-unicode/truncated-utf-8/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid-unicode/truncated-utf-8/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/apostrophe/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near ''' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/apostrophe/input: -------------------------------------------------------------------------------- 1 | [' 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/ascii-unicode-identifier/error: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | '[' or '{' expected near 'a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/ascii-unicode-identifier/input: -------------------------------------------------------------------------------- 1 | aå 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/brace-comma/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near ',' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/brace-comma/input: -------------------------------------------------------------------------------- 1 | {, 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/bracket-comma/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unexpected token near ',' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/bracket-comma/input: -------------------------------------------------------------------------------- 1 | [, 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/bracket-one-comma/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 4 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/bracket-one-comma/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/bracket-one-comma/input: -------------------------------------------------------------------------------- 1 | [1, 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/empty/error: -------------------------------------------------------------------------------- 1 | 1 0 0 2 | '[' or '{' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/empty/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/jansson-2.7/test/suites/invalid/empty/input -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/extra-comma-in-array/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unexpected token near ']' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/extra-comma-in-array/input: -------------------------------------------------------------------------------- 1 | [1,] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/extra-comma-in-multiline-array/error: -------------------------------------------------------------------------------- 1 | 6 1 17 2 | unexpected token near ']' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/extra-comma-in-multiline-array/input: -------------------------------------------------------------------------------- 1 | [1, 2 | 2, 3 | 3, 4 | 4, 5 | 5, 6 | ] 7 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/garbage-after-newline/error: -------------------------------------------------------------------------------- 1 | 2 3 11 2 | end of file expected near 'foo' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/garbage-after-newline/input: -------------------------------------------------------------------------------- 1 | [1,2,3] 2 | foo 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/garbage-at-the-end/error: -------------------------------------------------------------------------------- 1 | 1 10 10 2 | end of file expected near 'foo' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/garbage-at-the-end/input: -------------------------------------------------------------------------------- 1 | [1,2,3]foo 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/integer-starting-with-zero/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near '0' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/integer-starting-with-zero/input: -------------------------------------------------------------------------------- 1 | [012] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-escape/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | invalid escape near '"\a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-escape/input: -------------------------------------------------------------------------------- 1 | ["\a <-- invalid escape"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-identifier/error: -------------------------------------------------------------------------------- 1 | 1 5 5 2 | invalid token near 'troo' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-identifier/input: -------------------------------------------------------------------------------- 1 | [troo 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-negative-integer/error: -------------------------------------------------------------------------------- 1 | 1 8 8 2 | ']' expected near 'foo' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-negative-integer/input: -------------------------------------------------------------------------------- 1 | [-123foo] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-negative-real/error: -------------------------------------------------------------------------------- 1 | 1 12 12 2 | ']' expected near 'foo' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-negative-real/input: -------------------------------------------------------------------------------- 1 | [-123.123foo] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-second-surrogate/error: -------------------------------------------------------------------------------- 1 | 1 62 62 2 | invalid Unicode '\uD888\u3210' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/invalid-second-surrogate/input: -------------------------------------------------------------------------------- 1 | ["\uD888\u3210 (first surrogate and invalid second surrogate)"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-open-brace/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 2 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-open-brace/error.strip: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-open-brace/input: -------------------------------------------------------------------------------- 1 | { 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-open-bracket/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 2 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-open-bracket/error.strip: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-open-bracket/input: -------------------------------------------------------------------------------- 1 | [ 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-second-surrogate/error: -------------------------------------------------------------------------------- 1 | 1 40 40 2 | invalid Unicode '\uDFAA' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/lone-second-surrogate/input: -------------------------------------------------------------------------------- 1 | ["\uDFAA (second surrogate on it's own)"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/minus-sign-without-number/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near '-' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/minus-sign-without-number/input: -------------------------------------------------------------------------------- 1 | [-foo] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/negative-integer-starting-with-zero/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '-0' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/negative-integer-starting-with-zero/input: -------------------------------------------------------------------------------- 1 | [-012] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-in-object-key/error: -------------------------------------------------------------------------------- 1 | 1 15 15 2 | NUL byte in object key not supported near '"foo\u0000bar"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-in-object-key/input: -------------------------------------------------------------------------------- 1 | {"foo\u0000bar": 42} -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-in-string/error: -------------------------------------------------------------------------------- 1 | 1 12 12 2 | control character 0x0 near '"null byte ' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-in-string/input: -------------------------------------------------------------------------------- 1 | ["null byte not allowed"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-in-string/nostrip: -------------------------------------------------------------------------------- 1 | The embedded NULL byte breaks json_loads(), which is used instead of 2 | json_loadf() in the stripped tests. 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-outside-string/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-outside-string/input: -------------------------------------------------------------------------------- 1 | [ 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null-byte-outside-string/nostrip: -------------------------------------------------------------------------------- 1 | The embedded NULL byte breaks json_loads(), which is used instead of 2 | json_loadf() in the stripped tests. 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | '[' or '{' expected near 'null' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/null/input: -------------------------------------------------------------------------------- 1 | null 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-apostrophes/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near ''' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-apostrophes/input: -------------------------------------------------------------------------------- 1 | {'a' 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-garbage-at-end/error: -------------------------------------------------------------------------------- 1 | 1 12 12 2 | '}' expected near '123' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-garbage-at-end/input: -------------------------------------------------------------------------------- 1 | {"a":"a" 123} 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-in-unterminated-array/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 4 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-in-unterminated-array/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-in-unterminated-array/input: -------------------------------------------------------------------------------- 1 | [{} 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-no-colon/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 5 2 | ':' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-no-colon/error.strip: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | ':' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-no-colon/input: -------------------------------------------------------------------------------- 1 | {"a" 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-no-value/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 6 2 | unexpected token near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-no-value/error.strip: -------------------------------------------------------------------------------- 1 | 1 5 5 2 | unexpected token near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-no-value/input: -------------------------------------------------------------------------------- 1 | {"a": 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-unterminated-value/error.normal: -------------------------------------------------------------------------------- 1 | 1 7 7 2 | unexpected newline near '"a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-unterminated-value/error.strip: -------------------------------------------------------------------------------- 1 | 1 7 7 2 | premature end of input near '"a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/object-unterminated-value/input: -------------------------------------------------------------------------------- 1 | {"a":"a 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-garbage-after-e/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '1e' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-garbage-after-e/input: -------------------------------------------------------------------------------- 1 | [1ea] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-negative-overflow/error: -------------------------------------------------------------------------------- 1 | 1 15 15 2 | real number overflow near '-123123e100000' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-negative-overflow/input: -------------------------------------------------------------------------------- 1 | [-123123e100000] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-positive-overflow/error: -------------------------------------------------------------------------------- 1 | 1 14 14 2 | real number overflow near '123123e100000' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-positive-overflow/input: -------------------------------------------------------------------------------- 1 | [123123e100000] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-truncated-at-e/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '1e' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-truncated-at-e/input: -------------------------------------------------------------------------------- 1 | [1e] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-truncated-at-point/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '1.' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/real-truncated-at-point/input: -------------------------------------------------------------------------------- 1 | [1.] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2014 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | is_test() { 9 | test -d $test_path 10 | } 11 | 12 | do_run() { 13 | variant=$1 14 | s=".$1" 15 | 16 | strip=0 17 | if [ "$variant" = "strip" ]; then 18 | # This test should not be stripped 19 | [ -f $test_path/nostrip ] && return 20 | strip=1 21 | fi 22 | 23 | STRIP=$strip $json_process --env \ 24 | <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s 25 | valgrind_check $test_log/stderr$s || return 1 26 | 27 | ref=error 28 | [ -f $test_path/error$s ] && ref=error$s 29 | 30 | if ! cmp -s $test_path/$ref $test_log/stderr$s; then 31 | echo $variant > $test_log/variant 32 | return 1 33 | fi 34 | } 35 | 36 | run_test() { 37 | do_run normal && do_run strip 38 | } 39 | 40 | show_error() { 41 | valgrind_show_error && return 42 | 43 | read variant < $test_log/variant 44 | s=".$variant" 45 | 46 | echo "VARIANT: $variant" 47 | 48 | echo "EXPECTED ERROR:" 49 | ref=error 50 | [ -f $test_path/error$s ] && ref=error$s 51 | nl -bn $test_path/$ref 52 | 53 | echo "ACTUAL ERROR:" 54 | nl -bn $test_log/stderr$s 55 | } 56 | 57 | . $top_srcdir/test/scripts/run-tests.sh 58 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/tab-character-in-string/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | control character 0x9 near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/tab-character-in-string/input: -------------------------------------------------------------------------------- 1 | [" <-- tab character"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/too-big-negative-integer/error: -------------------------------------------------------------------------------- 1 | 1 32 32 2 | too big negative integer 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/too-big-negative-integer/input: -------------------------------------------------------------------------------- 1 | [-123123123123123123123123123123] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/too-big-positive-integer/error: -------------------------------------------------------------------------------- 1 | 1 31 31 2 | too big integer 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/too-big-positive-integer/input: -------------------------------------------------------------------------------- 1 | [123123123123123123123123123123] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/truncated-unicode-surrogate/error: -------------------------------------------------------------------------------- 1 | 1 46 46 2 | invalid Unicode '\uDADA' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/truncated-unicode-surrogate/input: -------------------------------------------------------------------------------- 1 | ["\uDADA (first surrogate without the second)"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unicode-identifier/error: -------------------------------------------------------------------------------- 1 | 1 1 2 2 | '[' or '{' expected near 'å' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unicode-identifier/input: -------------------------------------------------------------------------------- 1 | å 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-array-and-object/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 3 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-array-and-object/error.strip: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-array-and-object/input: -------------------------------------------------------------------------------- 1 | [{ 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-array/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 5 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-array/error.strip: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-array/input: -------------------------------------------------------------------------------- 1 | ["a" 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-empty-key/error.normal: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unexpected newline near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-empty-key/error.strip: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | premature end of input near '"' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-empty-key/input: -------------------------------------------------------------------------------- 1 | {" 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-key/error.normal: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unexpected newline near '"a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-key/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | premature end of input near '"a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-key/input: -------------------------------------------------------------------------------- 1 | {"a 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-object-and-array/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near '[' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-object-and-array/input: -------------------------------------------------------------------------------- 1 | {[ 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-string/error.normal: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unexpected newline near '"a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-string/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | premature end of input near '"a' 3 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/invalid/unterminated-string/input: -------------------------------------------------------------------------------- 1 | ["a 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/complex-array/env: -------------------------------------------------------------------------------- 1 | JSON_SORT_KEYS=1 -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/complex-array/input: -------------------------------------------------------------------------------- 1 | [1,2,3,4, 2 | "a", "b", "c", 3 | {"foo": "bar", "core": "dump"}, 4 | true, false, true, true, null, false 5 | ] 6 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/complex-array/output: -------------------------------------------------------------------------------- 1 | [1, 2, 3, 4, "a", "b", "c", {"core": "dump", "foo": "bar"}, true, false, true, true, null, false] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-array/input: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-array/output: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-object-in-array/input: -------------------------------------------------------------------------------- 1 | [{}] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-object-in-array/output: -------------------------------------------------------------------------------- 1 | [{}] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-object/input: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-object/output: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-string/input: -------------------------------------------------------------------------------- 1 | [""] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/empty-string/output: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/escaped-utf-control-char/input: -------------------------------------------------------------------------------- 1 | ["\u0012 escaped control character"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/escaped-utf-control-char/output: -------------------------------------------------------------------------------- 1 | ["\u0012 escaped control character"] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/false/input: -------------------------------------------------------------------------------- 1 | [false] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/false/output: -------------------------------------------------------------------------------- 1 | [false] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/negative-int/input: -------------------------------------------------------------------------------- 1 | [-123] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/negative-int/output: -------------------------------------------------------------------------------- 1 | [-123] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/negative-one/input: -------------------------------------------------------------------------------- 1 | [-1] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/negative-one/output: -------------------------------------------------------------------------------- 1 | [-1] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/negative-zero/input: -------------------------------------------------------------------------------- 1 | [-0] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/negative-zero/output: -------------------------------------------------------------------------------- 1 | [0] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/null/input: -------------------------------------------------------------------------------- 1 | [null] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/null/output: -------------------------------------------------------------------------------- 1 | [null] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/one-byte-utf-8/input: -------------------------------------------------------------------------------- 1 | ["\u002c one-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/one-byte-utf-8/output: -------------------------------------------------------------------------------- 1 | [", one-byte UTF-8"] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-capital-e-negative-exponent/input: -------------------------------------------------------------------------------- 1 | [1E-2] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-capital-e-negative-exponent/output: -------------------------------------------------------------------------------- 1 | [0.01] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-capital-e-positive-exponent/input: -------------------------------------------------------------------------------- 1 | [1E+2] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-capital-e-positive-exponent/output: -------------------------------------------------------------------------------- 1 | [100.0] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-capital-e/input: -------------------------------------------------------------------------------- 1 | [1E22] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-capital-e/output: -------------------------------------------------------------------------------- 1 | [1e22] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-exponent/input: -------------------------------------------------------------------------------- 1 | [123e45] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-exponent/output: -------------------------------------------------------------------------------- 1 | [1.2299999999999999e47] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-fraction-exponent/input: -------------------------------------------------------------------------------- 1 | [123.456e78] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-fraction-exponent/output: -------------------------------------------------------------------------------- 1 | [1.23456e80] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-negative-exponent/input: -------------------------------------------------------------------------------- 1 | [1e-2] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-negative-exponent/output: -------------------------------------------------------------------------------- 1 | [0.01] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-positive-exponent/input: -------------------------------------------------------------------------------- 1 | [1e+2] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-positive-exponent/output: -------------------------------------------------------------------------------- 1 | [100.0] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-subnormal-number/input: -------------------------------------------------------------------------------- 1 | [1.8011670033376514e-308] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-subnormal-number/output: -------------------------------------------------------------------------------- 1 | [1.8011670033376514e-308] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-underflow/input: -------------------------------------------------------------------------------- 1 | [123e-10000000] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/real-underflow/output: -------------------------------------------------------------------------------- 1 | [0.0] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2014 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | JSON_SORT_KEYS=1 9 | export JSON_SORT_KEYS 10 | 11 | is_test() { 12 | test -d $test_path 13 | } 14 | 15 | do_run() { 16 | variant=$1 17 | s=".$1" 18 | 19 | strip=0 20 | [ "$variant" = "strip" ] && strip=1 21 | 22 | STRIP=$strip $json_process --env \ 23 | <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s 24 | valgrind_check $test_log/stderr$s || return 1 25 | 26 | ref=output 27 | [ -f $test_path/output$s ] && ref=output$s 28 | 29 | if ! cmp -s $test_path/$ref $test_log/stdout$s; then 30 | echo $variant > $test_log/variant 31 | return 1 32 | fi 33 | } 34 | 35 | run_test() { 36 | do_run normal && do_run strip 37 | } 38 | 39 | show_error() { 40 | valgrind_show_error && return 41 | 42 | read variant < $test_log/variant 43 | s=".$variant" 44 | 45 | echo "VARIANT: $variant" 46 | 47 | echo "EXPECTED OUTPUT:" 48 | ref=output 49 | [ -f $test_path/output$s ] && ref=output$s 50 | nl -bn $test_path/$ref 51 | 52 | echo "ACTUAL OUTPUT:" 53 | nl -bn $test_log/stdout$s 54 | } 55 | 56 | . $top_srcdir/test/scripts/run-tests.sh 57 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/short-string/input: -------------------------------------------------------------------------------- 1 | ["a"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/short-string/output: -------------------------------------------------------------------------------- 1 | ["a"] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-ascii-string/input: -------------------------------------------------------------------------------- 1 | ["abcdefghijklmnopqrstuvwxyz1234567890 "] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-ascii-string/output: -------------------------------------------------------------------------------- 1 | ["abcdefghijklmnopqrstuvwxyz1234567890 "] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-int-0/input: -------------------------------------------------------------------------------- 1 | [0] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-int-0/output: -------------------------------------------------------------------------------- 1 | [0] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-int-1/input: -------------------------------------------------------------------------------- 1 | [1] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-int-1/output: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-int-123/input: -------------------------------------------------------------------------------- 1 | [123] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-int-123/output: -------------------------------------------------------------------------------- 1 | [123] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-object/input: -------------------------------------------------------------------------------- 1 | {"a":[]} 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-object/output: -------------------------------------------------------------------------------- 1 | {"a": []} -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-real/input: -------------------------------------------------------------------------------- 1 | [123.456789] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/simple-real/output: -------------------------------------------------------------------------------- 1 | [123.456789] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/string-escapes/input: -------------------------------------------------------------------------------- 1 | ["\"\\\/\b\f\n\r\t"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/string-escapes/output: -------------------------------------------------------------------------------- 1 | ["\"\\/\b\f\n\r\t"] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/three-byte-utf-8/input: -------------------------------------------------------------------------------- 1 | ["\u0821 three-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/three-byte-utf-8/output: -------------------------------------------------------------------------------- 1 | ["ࠡ three-byte UTF-8"] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/true/input: -------------------------------------------------------------------------------- 1 | [true] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/true/output: -------------------------------------------------------------------------------- 1 | [true] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/two-byte-utf-8/input: -------------------------------------------------------------------------------- 1 | ["\u0123 two-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/two-byte-utf-8/output: -------------------------------------------------------------------------------- 1 | ["ģ two-byte UTF-8"] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/utf-8-string/input: -------------------------------------------------------------------------------- 1 | ["€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/utf-8-string/output: -------------------------------------------------------------------------------- 1 | ["€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞"] -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/utf-surrogate-four-byte-encoding/input: -------------------------------------------------------------------------------- 1 | ["\uD834\uDD1E surrogate, four-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /src/tools/jansson-2.7/test/suites/valid/utf-surrogate-four-byte-encoding/output: -------------------------------------------------------------------------------- 1 | ["𝄞 surrogate, four-byte UTF-8"] -------------------------------------------------------------------------------- /src/tools/mmake.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(LINUX),1) 2 | SUBDIRS := ip efabcfg iscsictl sfcaffinity solar_clusterd 3 | OTHER_SUBDIRS := unix chariot firmware 4 | ifneq ($(ONLOAD_ONLY),1) 5 | SUBDIRS += ftl unifdef misc mc-comms sfutils sfutils-linux 6 | endif 7 | 8 | ifeq ($(BUILDORM),1) 9 | SUBDIRS += jansson-2.7 onload_remote_monitor 10 | else 11 | $(warning WARNING: onload_remote_monitor will not be available as dependencies are not met) 12 | endif 13 | endif 14 | 15 | ifeq ($(WINDOWS),1) 16 | SUBDIRS := win mc-comms 17 | OTHER_SUBDIRS := misc 18 | DRIVER_SUBDIRS := win 19 | INSTALLER_SUBDIRS := win 20 | endif 21 | 22 | ifeq ($(FREEBSD),1) 23 | SUBDIRS := mc-comms 24 | OTHER_SUBDIRS := 25 | DRIVER_SUBDIRS := 26 | endif 27 | 28 | ifeq ($(MACOSX),1) 29 | SUBDIRS := sfutils 30 | OTHER_SUBDIRS := 31 | DRIVER_SUBDIRS := 32 | endif 33 | 34 | ifeq ($(SOLARIS),1) 35 | SUBDIRS := solaris sfutils 36 | DRIVER_SUBDIRS := 37 | OTHER_SUBDIRS := 38 | ifneq ($(ONLOAD_ONLY),1) 39 | # libcitools; particularly sysdep.h does not have sparcv9 support at present 40 | ifneq ($(ISA),sparcv9) 41 | SUBDIRS += mc-comms 42 | endif 43 | endif 44 | endif 45 | 46 | ifeq ($(DOS32_UTILS)$(LINUX_UIO_UTILS),1) 47 | SUBDIRS := sfutils 48 | endif 49 | 50 | all: 51 | +@$(MakeSubdirs) 52 | 53 | clean: 54 | @$(MakeClean) 55 | -------------------------------------------------------------------------------- /src/tools/onload_remote_monitor/mmake.mk: -------------------------------------------------------------------------------- 1 | 2 | APPS := orm_json 3 | 4 | SRCS := orm_json 5 | 6 | OBJS := $(patsubst %,%.o,$(SRCS)) 7 | 8 | JANSSON_LIB := ../jansson-2.7/libjansson.a 9 | JANSSON_LIB_DEP := $(JANSSON_LIB) 10 | 11 | MMAKE_LIB_DEPS := $(CIIP_LIB_DEPEND) $(CIUL_LIB_DEPEND) $(CITOOLS_LIB_DEPEND) \ 12 | $(JANSSON_LIB_DEP) 13 | 14 | MMAKE_LIBS := $(LINK_CIIP_LIB) $(LINK_CIUL_LIB) $(LINK_CITOOLS_LIB) \ 15 | -lpthread $(JANSSON_LIB) 16 | MMAKE_INCLUDE += -I$(TOP)/src/tools/jansson-2.7/src 17 | 18 | LIBS += $(MMAKE_LIBS) 19 | INCS += $(MMAKE_INCLUDE) 20 | DEPS += $(OBJS) $(MMAKE_LIB_DEPS) 21 | 22 | %.o: %.c 23 | $(CC) $(CFLAGS) $(INCS) -c $< -o $@ 24 | 25 | all: $(APPS) 26 | 27 | orm_json: $(DEPS) 28 | $(CC) -g -Wl,-E $^ $(LIBS) -o $@ 29 | 30 | clean: 31 | @$(MakeClean) 32 | rm -f *.o $(APPS) 33 | -------------------------------------------------------------------------------- /src/tools/sfcaffinity/mmake.mk: -------------------------------------------------------------------------------- 1 | APPS := sfcaffinity_tool 2 | 3 | TARGETS := $(APPS:%=$(AppPattern)) 4 | 5 | 6 | MMAKE_LIBS := $(LINK_CIAPP_LIB) $(LINK_CITOOLS_LIB) 7 | MMAKE_LIB_DEPS := $(CIAPP_LIB_DEPEND) $(CITOOLS_LIB_DEPEND) 8 | 9 | 10 | all: $(TARGETS) 11 | 12 | clean: 13 | @$(MakeClean) 14 | -------------------------------------------------------------------------------- /src/tools/solar_clusterd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyeder/openonload/af9408f6df1bb19659f70661cfeb58a981b4a053/src/tools/solar_clusterd/__init__.py -------------------------------------------------------------------------------- /src/tools/solar_clusterd/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup, Extension 2 | import os, sys 3 | 4 | 5 | onload_tree = os.getenv('ONLOAD_TREE') 6 | onload_build = os.getenv('ONLOAD_BUILD') 7 | if not onload_tree or not onload_build: 8 | sys.stderr.write('ONLOAD_TREE and ONLOAD_BUILD must be set to use this ' + 9 | 'script\n') 10 | sys.exit(1) 11 | 12 | 13 | ext = Extension( 14 | 'solar_clusterd.cluster_protocol', 15 | ['cluster_protocol.c', 'filter_string.c'], 16 | include_dirs = [ 17 | os.path.join(onload_tree, 'src', 'include'), 18 | os.path.join(onload_tree, 'src', 'tools', 'solar_clusterd')], 19 | extra_objects = [os.path.join(onload_build, 'lib', 'ciul', 'libciul1.a')], 20 | ) 21 | 22 | 23 | setup(name='solar_clusterd', 24 | version = '1.0', 25 | author = 'Solarflare Communications', 26 | author_email = 'support@solarflare.com', 27 | url = 'http://www.openonload.org/', 28 | package_dir = {'solar_clusterd': '.'}, 29 | packages = ['solar_clusterd'], 30 | ext_modules = [ext], 31 | scripts = ['solar_clusterd'] 32 | ) 33 | --------------------------------------------------------------------------------