diff options
77 files changed, 142 insertions, 5 deletions
@@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20161008: + Use of the cc_cdg, cc_chd, cc_hd, or cc_vegas congestion control + modules now requires that the kernel configuration contain the + TCP_HHOOK option. (This option is included in the GENERIC kernel.) + 20161003: The WITHOUT_ELFCOPY_AS_OBJCOPY src.conf(5) knob has been retired. ELF Tool Chain's elfcopy is always installed as /usr/bin/objcopy. diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 2859de5a45d1..d727d5349f00 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -30,6 +30,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security options TCP_OFFLOAD # TCP offload +options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/arm/conf/ATMEL b/sys/arm/conf/ATMEL index 52d2e13ed548..f8877e9e2472 100644 --- a/sys/arm/conf/ATMEL +++ b/sys/arm/conf/ATMEL @@ -35,6 +35,7 @@ options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/arm/conf/AVILA b/sys/arm/conf/AVILA index c2a05fabb0c6..e9f71ccfe623 100644 --- a/sys/arm/conf/AVILA +++ b/sys/arm/conf/AVILA @@ -36,6 +36,7 @@ options DEVICE_POLLING options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem diff --git a/sys/arm/conf/BWCT b/sys/arm/conf/BWCT index fad7b2402a04..b06daebd3a85 100644 --- a/sys/arm/conf/BWCT +++ b/sys/arm/conf/BWCT @@ -33,6 +33,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/CAMBRIA b/sys/arm/conf/CAMBRIA index 91f00e3c079a..8f1881d40a86 100644 --- a/sys/arm/conf/CAMBRIA +++ b/sys/arm/conf/CAMBRIA @@ -37,6 +37,7 @@ options DEVICE_POLLING options SCHED_4BSD # 4BSD scheduler #options PREEMPTION options INET # InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem diff --git a/sys/arm/conf/CNS11XXNAS b/sys/arm/conf/CNS11XXNAS index 2bf2cf540d16..d7cd496c071f 100644 --- a/sys/arm/conf/CNS11XXNAS +++ b/sys/arm/conf/CNS11XXNAS @@ -46,6 +46,7 @@ options GEOM_LABEL # Provides labelization options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/CRB b/sys/arm/conf/CRB index c5d6cdf3a2ed..3970c551e78a 100644 --- a/sys/arm/conf/CRB +++ b/sys/arm/conf/CRB @@ -34,6 +34,7 @@ options HZ=100 options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/DB-78XXX b/sys/arm/conf/DB-78XXX index 66ed195a68f4..aa474bcc43a1 100644 --- a/sys/arm/conf/DB-78XXX +++ b/sys/arm/conf/DB-78XXX @@ -15,6 +15,7 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem diff --git a/sys/arm/conf/DB-88F5XXX b/sys/arm/conf/DB-88F5XXX index d057d6fbf1a4..0199e8663336 100644 --- a/sys/arm/conf/DB-88F5XXX +++ b/sys/arm/conf/DB-88F5XXX @@ -15,6 +15,7 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem diff --git a/sys/arm/conf/DB-88F6XXX b/sys/arm/conf/DB-88F6XXX index e2786065e0a3..fa2810c97122 100644 --- a/sys/arm/conf/DB-88F6XXX +++ b/sys/arm/conf/DB-88F6XXX @@ -15,6 +15,7 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem options NFSCL # Network Filesystem Client diff --git a/sys/arm/conf/DOCKSTAR b/sys/arm/conf/DOCKSTAR index bf2d5516ef89..9af5ec34efdf 100644 --- a/sys/arm/conf/DOCKSTAR +++ b/sys/arm/conf/DOCKSTAR @@ -29,6 +29,7 @@ options SOC_MV_KIRKWOOD options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options NFSCL # Network Filesystem Client diff --git a/sys/arm/conf/DREAMPLUG-1001 b/sys/arm/conf/DREAMPLUG-1001 index 21e4f61e77dc..e7c32f923d0f 100644 --- a/sys/arm/conf/DREAMPLUG-1001 +++ b/sys/arm/conf/DREAMPLUG-1001 @@ -32,6 +32,7 @@ options SOC_MV_KIRKWOOD options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options NFSCL # Network Filesystem Client diff --git a/sys/arm/conf/EA3250 b/sys/arm/conf/EA3250 index 2557fab3eb98..649224e07c06 100644 --- a/sys/arm/conf/EA3250 +++ b/sys/arm/conf/EA3250 @@ -16,6 +16,7 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager diff --git a/sys/arm/conf/EB9200 b/sys/arm/conf/EB9200 index 888ab316c17a..9a6228c08ce6 100644 --- a/sys/arm/conf/EB9200 +++ b/sys/arm/conf/EB9200 @@ -26,6 +26,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/ETHERNUT5 b/sys/arm/conf/ETHERNUT5 index 65cd897f38af..9e84a623bddf 100644 --- a/sys/arm/conf/ETHERNUT5 +++ b/sys/arm/conf/ETHERNUT5 @@ -31,6 +31,7 @@ options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP #options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/arm/conf/EXYNOS5.common b/sys/arm/conf/EXYNOS5.common index b5102ddf2c3d..412b4d11d563 100644 --- a/sys/arm/conf/EXYNOS5.common +++ b/sys/arm/conf/EXYNOS5.common @@ -25,6 +25,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/arm/conf/GUMSTIX b/sys/arm/conf/GUMSTIX index 4cc18e39e192..34e51e608e79 100644 --- a/sys/arm/conf/GUMSTIX +++ b/sys/arm/conf/GUMSTIX @@ -39,6 +39,7 @@ options HZ=100 options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/HL200 b/sys/arm/conf/HL200 index da1423101ffe..1b38af94f6cf 100644 --- a/sys/arm/conf/HL200 +++ b/sys/arm/conf/HL200 @@ -31,6 +31,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/HL201 b/sys/arm/conf/HL201 index e4c181fa40b1..cbf7cb00c981 100644 --- a/sys/arm/conf/HL201 +++ b/sys/arm/conf/HL201 @@ -29,6 +29,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/KB920X b/sys/arm/conf/KB920X index 46b7e694f6b6..03301d4c4785 100644 --- a/sys/arm/conf/KB920X +++ b/sys/arm/conf/KB920X @@ -32,6 +32,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/NSLU b/sys/arm/conf/NSLU index b1c9f2119cca..b6837d9a4c37 100644 --- a/sys/arm/conf/NSLU +++ b/sys/arm/conf/NSLU @@ -43,6 +43,7 @@ options DEVICE_POLLING options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/QILA9G20 b/sys/arm/conf/QILA9G20 index 29618b96aaa6..97bde286effe 100644 --- a/sys/arm/conf/QILA9G20 +++ b/sys/arm/conf/QILA9G20 @@ -32,6 +32,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/SAM9260EK b/sys/arm/conf/SAM9260EK index d3949381591a..fc65625855b5 100644 --- a/sys/arm/conf/SAM9260EK +++ b/sys/arm/conf/SAM9260EK @@ -42,6 +42,7 @@ options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP #options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/arm/conf/SAM9G20EK b/sys/arm/conf/SAM9G20EK index 2f23caef5305..e579f1d95b2a 100644 --- a/sys/arm/conf/SAM9G20EK +++ b/sys/arm/conf/SAM9G20EK @@ -38,6 +38,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/arm/conf/SAM9X25EK b/sys/arm/conf/SAM9X25EK index 1d014a3d0e1e..ab69a2d6d871 100644 --- a/sys/arm/conf/SAM9X25EK +++ b/sys/arm/conf/SAM9X25EK @@ -31,6 +31,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/SHEEVAPLUG b/sys/arm/conf/SHEEVAPLUG index 2c6bda4695df..ff60f82bcf60 100644 --- a/sys/arm/conf/SHEEVAPLUG +++ b/sys/arm/conf/SHEEVAPLUG @@ -17,6 +17,7 @@ options HZ=1000 options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem options NFSCL # Network Filesystem Client diff --git a/sys/arm/conf/SN9G45 b/sys/arm/conf/SN9G45 index 33eece9216b4..21cb7a6c1e1b 100644 --- a/sys/arm/conf/SN9G45 +++ b/sys/arm/conf/SN9G45 @@ -31,6 +31,7 @@ makeoptions MODULES_OVERRIDE="" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking #options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support #options UFS_ACL # Support for access control lists diff --git a/sys/arm/conf/TS7800 b/sys/arm/conf/TS7800 index 1b6563274204..17b237af46dd 100644 --- a/sys/arm/conf/TS7800 +++ b/sys/arm/conf/TS7800 @@ -15,6 +15,7 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options NFSCL # Network Filesystem Client diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index fce8b6e6e975..81a8f6613758 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -7,6 +7,7 @@ options ARM_L2_PIPT # Only L2 PIPT is supported options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options IPSEC # IP (v4/v6) security options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index f2d0e34c280f..1c8b73bea458 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -29,6 +29,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem diff --git a/sys/conf/NOTES b/sys/conf/NOTES index a827fd2ed1a4..afc521518978 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -982,6 +982,8 @@ device lagg # TCPPCAP enables code which keeps the last n packets sent and received # on a TCP socket. # +# TCP_HHOOK enables the hhook(9) framework hooks for the TCP stack. +# # RADIX_MPATH provides support for equal-cost multi-path routing. # options MROUTING # Multicast routing @@ -1001,6 +1003,7 @@ options IPSTEALTH #support for stealth forwarding options PF_DEFAULT_TO_DROP #drop everything by default options TCPDEBUG options TCPPCAP +options TCP_HHOOK options RADIX_MPATH # The MBUF_STRESS_TEST option enables options which create diff --git a/sys/conf/options b/sys/conf/options index a997a53d2ef3..39e26a333d3b 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -443,6 +443,7 @@ SLIP_IFF_OPTS opt_slip.h TCPDEBUG TCPPCAP opt_global.h SIFTR +TCP_HHOOK opt_inet.h TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_RFC7413 opt_inet.h TCP_RFC7413_MAX_KEYS opt_inet.h diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index aefc50753f0d..056e06499645 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -31,6 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem diff --git a/sys/mips/conf/ADM5120 b/sys/mips/conf/ADM5120 index a131eceee6e6..a32adf69e8fb 100644 --- a/sys/mips/conf/ADM5120 +++ b/sys/mips/conf/ADM5120 @@ -33,6 +33,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/ALCHEMY b/sys/mips/conf/ALCHEMY index a4508ad339cb..2d1acd901160 100644 --- a/sys/mips/conf/ALCHEMY +++ b/sys/mips/conf/ALCHEMY @@ -33,6 +33,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/AR71XX_BASE b/sys/mips/conf/AR71XX_BASE index a296eab860b8..99e59a2c2b6f 100644 --- a/sys/mips/conf/AR71XX_BASE +++ b/sys/mips/conf/AR71XX_BASE @@ -35,6 +35,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 # IPv6 +options TCP_HHOOK # hhook(9) framework for TCP # options NFSCL #Network Filesystem Client diff --git a/sys/mips/conf/AR724X_BASE b/sys/mips/conf/AR724X_BASE index 662e8013377f..8f4e24699a9b 100644 --- a/sys/mips/conf/AR724X_BASE +++ b/sys/mips/conf/AR724X_BASE @@ -36,6 +36,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking #options INET6 # IPv6 +options TCP_HHOOK # hhook(9) framework for TCP #options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions diff --git a/sys/mips/conf/BCM b/sys/mips/conf/BCM index 994c6c2c3cfa..04203944c712 100644 --- a/sys/mips/conf/BCM +++ b/sys/mips/conf/BCM @@ -28,6 +28,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client #options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/BERI_TEMPLATE b/sys/mips/conf/BERI_TEMPLATE index fcba5cc96c5b..7901f7722493 100644 --- a/sys/mips/conf/BERI_TEMPLATE +++ b/sys/mips/conf/BERI_TEMPLATE @@ -39,6 +39,7 @@ options FFS #Berkeley Fast Filesystem options INET options INET6 +options TCP_HHOOK # hhook(9) framework for TCP options KGSSAPI options NFSCL options NFSLOCKD diff --git a/sys/mips/conf/ERL b/sys/mips/conf/ERL index 2afd12116ca6..925f14f92bd0 100644 --- a/sys/mips/conf/ERL +++ b/sys/mips/conf/ERL @@ -55,6 +55,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/mips/conf/GXEMUL b/sys/mips/conf/GXEMUL index fa0b9b51899e..dcfa3d3af276 100644 --- a/sys/mips/conf/GXEMUL +++ b/sys/mips/conf/GXEMUL @@ -32,6 +32,7 @@ options SMP # Symmetric MultiProcessor Kernel options SCHED_ULE options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS #Berkeley Fast Filesystem diff --git a/sys/mips/conf/GXEMUL32 b/sys/mips/conf/GXEMUL32 index 27854c5fa2a8..da3e71a67eed 100644 --- a/sys/mips/conf/GXEMUL32 +++ b/sys/mips/conf/GXEMUL32 @@ -30,6 +30,7 @@ options SMP # Symmetric MultiProcessor Kernel options SCHED_ULE options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS #Berkeley Fast Filesystem diff --git a/sys/mips/conf/IDT b/sys/mips/conf/IDT index a6c14bbba13d..a258cdba0cd6 100644 --- a/sys/mips/conf/IDT +++ b/sys/mips/conf/IDT @@ -16,6 +16,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/MT7620 b/sys/mips/conf/MT7620 index d915517961e7..ea61949a0c92 100644 --- a/sys/mips/conf/MT7620 +++ b/sys/mips/conf/MT7620 @@ -54,6 +54,7 @@ options SCHED_ULE #options SCHED_4BSD #4BSD scheduler #options COMPAT_43 options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/OCTEON1 b/sys/mips/conf/OCTEON1 index 7c24f1a02aca..d3ca58ca7faf 100644 --- a/sys/mips/conf/OCTEON1 +++ b/sys/mips/conf/OCTEON1 @@ -54,6 +54,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/mips/conf/PB92 b/sys/mips/conf/PB92 index 6176668fb129..ea994ada1cda 100644 --- a/sys/mips/conf/PB92 +++ b/sys/mips/conf/PB92 @@ -37,6 +37,7 @@ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking # Can't do IPv6 - it just doesn't fit. # options INET6 +options TCP_HHOOK # hhook(9) framework for TCP # options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions diff --git a/sys/mips/conf/QCA953X_BASE b/sys/mips/conf/QCA953X_BASE index 08de505430b2..1a7da3b0a628 100644 --- a/sys/mips/conf/QCA953X_BASE +++ b/sys/mips/conf/QCA953X_BASE @@ -31,6 +31,7 @@ options ALT_BREAK_TO_DEBUGGER options SCHED_4BSD #4BSD scheduler options INET #InterNETworking #options INET6 #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP #options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions diff --git a/sys/mips/conf/QEMU b/sys/mips/conf/QEMU index 68fe12c21b30..b8f33fe92f42 100644 --- a/sys/mips/conf/QEMU +++ b/sys/mips/conf/QEMU @@ -32,6 +32,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/RT305X b/sys/mips/conf/RT305X index ca38c72c4275..fc629b62e9d1 100644 --- a/sys/mips/conf/RT305X +++ b/sys/mips/conf/RT305X @@ -53,6 +53,7 @@ options SCHED_ULE #options SCHED_4BSD #4BSD scheduler #options COMPAT_43 options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/RT5350 b/sys/mips/conf/RT5350 index f897178b607c..b2f02c6170b1 100644 --- a/sys/mips/conf/RT5350 +++ b/sys/mips/conf/RT5350 @@ -51,6 +51,7 @@ options KDB options SCHED_ULE options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP #options NFSCL #Network Filesystem Client #options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/SENTRY5 b/sys/mips/conf/SENTRY5 index ecdb5ffb12b9..60cc7e3ab53c 100644 --- a/sys/mips/conf/SENTRY5 +++ b/sys/mips/conf/SENTRY5 @@ -44,6 +44,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/XLR b/sys/mips/conf/XLR index 0133fada2343..f5ecd086a24a 100644 --- a/sys/mips/conf/XLR +++ b/sys/mips/conf/XLR @@ -62,6 +62,7 @@ options PREEMPTION # Enable kernel thread preemption #options FULL_PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/mips/conf/XLR64 b/sys/mips/conf/XLR64 index c8b1dfbb433c..70c67078c54d 100644 --- a/sys/mips/conf/XLR64 +++ b/sys/mips/conf/XLR64 @@ -36,6 +36,7 @@ options SMP #options FULL_PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/mips/conf/XLRN32 b/sys/mips/conf/XLRN32 index e2f44687d411..f8a4bf299735 100644 --- a/sys/mips/conf/XLRN32 +++ b/sys/mips/conf/XLRN32 @@ -36,6 +36,7 @@ options PREEMPTION # Enable kernel thread preemption #options FULL_PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/mips/conf/std.AR5312 b/sys/mips/conf/std.AR5312 index ff418e5b71a2..a3b055bfb743 100644 --- a/sys/mips/conf/std.AR5312 +++ b/sys/mips/conf/std.AR5312 @@ -34,6 +34,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 # IPv6 +options TCP_HHOOK # hhook(9) framework for TCP # options NFSCL #Network Filesystem Client diff --git a/sys/mips/conf/std.AR5315 b/sys/mips/conf/std.AR5315 index cc8013f1cea2..c9f85f6c0813 100644 --- a/sys/mips/conf/std.AR5315 +++ b/sys/mips/conf/std.AR5315 @@ -33,6 +33,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 # IPv6 +options TCP_HHOOK # hhook(9) framework for TCP # options NFSCL #Network Filesystem Client diff --git a/sys/mips/conf/std.AR91XX b/sys/mips/conf/std.AR91XX index 0fe40c5b9032..cfff918120d6 100644 --- a/sys/mips/conf/std.AR91XX +++ b/sys/mips/conf/std.AR91XX @@ -32,6 +32,7 @@ options VM_KMEM_SIZE_SCALE=1 options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP #options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions diff --git a/sys/mips/conf/std.AR933X b/sys/mips/conf/std.AR933X index 6a539610a70e..f9a4d875b571 100644 --- a/sys/mips/conf/std.AR933X +++ b/sys/mips/conf/std.AR933X @@ -30,6 +30,7 @@ options ALT_BREAK_TO_DEBUGGER options SCHED_4BSD #4BSD scheduler options INET #InterNETworking #options INET6 #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP #options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions diff --git a/sys/mips/conf/std.AR934X b/sys/mips/conf/std.AR934X index 940da461d434..19399450a493 100644 --- a/sys/mips/conf/std.AR934X +++ b/sys/mips/conf/std.AR934X @@ -31,6 +31,7 @@ options ALQ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking #options INET6 #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP #options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions diff --git a/sys/mips/conf/std.MALTA b/sys/mips/conf/std.MALTA index 7019ccf22948..c0e5cdbd07b4 100644 --- a/sys/mips/conf/std.MALTA +++ b/sys/mips/conf/std.MALTA @@ -21,6 +21,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/std.QCA955X b/sys/mips/conf/std.QCA955X index 25a8411a9036..822a03a0b754 100644 --- a/sys/mips/conf/std.QCA955X +++ b/sys/mips/conf/std.QCA955X @@ -35,6 +35,7 @@ options ALQ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking #options INET6 #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP #options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions diff --git a/sys/mips/conf/std.SWARM b/sys/mips/conf/std.SWARM index 3e95206765c1..b59e9e962e04 100644 --- a/sys/mips/conf/std.SWARM +++ b/sys/mips/conf/std.SWARM @@ -20,6 +20,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking +options TCP_HHOOK # hhook(9) framework for TCP options NFSCL #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCL options PSEUDOFS #Pseudo-filesystem framework diff --git a/sys/mips/conf/std.XLP b/sys/mips/conf/std.XLP index 3d249bcd769e..ac19aafab73e 100644 --- a/sys/mips/conf/std.XLP +++ b/sys/mips/conf/std.XLP @@ -15,6 +15,7 @@ options PREEMPTION # Enable kernel thread preemption #options FULL_PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options FFS # Berkeley Fast Filesystem #options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists diff --git a/sys/modules/cc/Makefile b/sys/modules/cc/Makefile index 7f4e94e659e1..ec89d89e8c80 100644 --- a/sys/modules/cc/Makefile +++ b/sys/modules/cc/Makefile @@ -1,11 +1,20 @@ # $FreeBSD$ -SUBDIR= cc_cdg \ - cc_chd \ - cc_cubic \ +SUBDIR= cc_cubic \ cc_dctcp \ + cc_htcp + + +# Do we have the TCP_HHOOK symbol defined? If not, there is no point in +# building these modules by default. +# We will default to building these modules unless $OPT_INET is defined +# and does not contain the TCP_HHOOK option. +.if defined(ALL_MODULES) || ${OPT_INET:UTCP_HHOOK:MTCP_HHOOK} != "" +SUBDIR+= \ + cc_cdg \ + cc_chd \ cc_hd \ - cc_htcp \ cc_vegas +.endif .include <bsd.subdir.mk> diff --git a/sys/modules/khelp/Makefile b/sys/modules/khelp/Makefile index 1901331a3c2f..256d8838c573 100644 --- a/sys/modules/khelp/Makefile +++ b/sys/modules/khelp/Makefile @@ -1,5 +1,13 @@ # $FreeBSD$ -SUBDIR= h_ertt +SUBDIR= + +# Do we have the TCP_HHOOK symbol defined? If not, there is no point in +# building this modules by default. +# We will default to building this module unless $OPT_INET is defined +# and does not contain the TCP_HHOOK option. +.if defined(ALL_MODULES) || ${OPT_INET:UTCP_HHOOK:MTCP_HHOOK} != "" +SUBDIR+= h_ertt +.endif .include <bsd.subdir.mk> diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 6414a8fa9e08..5560514932e4 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -57,7 +57,9 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/kernel.h> +#ifdef TCP_HHOOK #include <sys/hhook.h> +#endif #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/proc.h> /* for proc0 declaration */ @@ -278,6 +280,7 @@ kmod_tcpstat_inc(int statnum) counter_u64_add(VNET(tcpstat)[statnum], 1); } +#ifdef TCP_HHOOK /* * Wrapper for the TCP established input helper hook. */ @@ -295,6 +298,7 @@ hhook_run_tcp_est_in(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) tp->osd); } } +#endif /* * CC wrapper hook functions @@ -1753,8 +1757,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, } acked = BYTES_THIS_ACK(tp, th); +#ifdef TCP_HHOOK /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ hhook_run_tcp_est_in(tp, th, &to); +#endif TCPSTAT_ADD(tcps_rcvackpack, nsegs); TCPSTAT_ADD(tcps_rcvackbyte, acked); @@ -2499,8 +2505,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, */ tp->sackhint.sacked_bytes = 0; +#ifdef TCP_HHOOK /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ hhook_run_tcp_est_in(tp, th, &to); +#endif if (SEQ_LEQ(th->th_ack, tp->snd_una)) { u_int maxseg; diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 7e638104c922..2c113050922e 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/domain.h> +#ifdef TCP_HHOOK #include <sys/hhook.h> +#endif #include <sys/kernel.h> #include <sys/lock.h> #include <sys/mbuf.h> @@ -140,11 +142,14 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFLAG_VNET | CTLFLAG_RW, tcp_timer_active((tp), TT_PERSIST), \ ("neither rexmt nor persist timer is set")) +#ifdef TCP_HHOOK static void inline hhook_run_tcp_est_out(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, uint32_t len, int tso); +#endif static void inline cc_after_idle(struct tcpcb *tp); +#ifdef TCP_HHOOK /* * Wrapper for the TCP established output helper hook. */ @@ -165,6 +170,7 @@ hhook_run_tcp_est_out(struct tcpcb *tp, struct tcphdr *th, tp->osd); } } +#endif /* * CC wrapper hook functions @@ -1306,8 +1312,10 @@ send: __func__, len, hdrlen, ipoptlen, m_length(m, NULL))); #endif +#ifdef TCP_HHOOK /* Run HHOOK_TCP_ESTABLISHED_OUT helper hooks. */ hhook_run_tcp_est_out(tp, th, &to, len, tso); +#endif #ifdef TCPDEBUG /* diff --git a/sys/netinet/tcp_stacks/fastpath.c b/sys/netinet/tcp_stacks/fastpath.c index f64bc974bd0f..271ea7ad91cb 100644 --- a/sys/netinet/tcp_stacks/fastpath.c +++ b/sys/netinet/tcp_stacks/fastpath.c @@ -62,7 +62,9 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/module.h> #include <sys/kernel.h> +#ifdef TCP_HHOOK #include <sys/hhook.h> +#endif #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/proc.h> /* for proc0 declaration */ @@ -266,8 +268,10 @@ tcp_do_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (winup_only == 0) { acked = BYTES_THIS_ACK(tp, th); +#ifdef TCP_HHOOK /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ hhook_run_tcp_est_in(tp, th, to); +#endif TCPSTAT_ADD(tcps_rcvackbyte, acked); sbdrop(&so->so_snd, acked); @@ -1040,8 +1044,10 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, struct socket *so, */ tp->sackhint.sacked_bytes = 0; +#ifdef TCP_HHOOK /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ hhook_run_tcp_est_in(tp, th, to); +#endif if (SEQ_LEQ(th->th_ack, tp->snd_una)) { if (tlen == 0 && tiwin == tp->snd_wnd) { @@ -2127,8 +2133,10 @@ tcp_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (winup_only == 0) { acked = BYTES_THIS_ACK(tp, th); +#ifdef TCP_HHOOK /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ hhook_run_tcp_est_in(tp, th, to); +#endif TCPSTAT_ADD(tcps_rcvackbyte, acked); sbdrop(&so->so_snd, acked); diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 6490c68cbdae..b8c9ff0645e5 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -42,9 +42,13 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/callout.h> #include <sys/eventhandler.h> +#ifdef TCP_HHOOK #include <sys/hhook.h> +#endif #include <sys/kernel.h> +#ifdef TCP_HHOOK #include <sys/khelp.h> +#endif #include <sys/sysctl.h> #include <sys/jail.h> #include <sys/malloc.h> @@ -238,7 +242,9 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, signature_verify_input, CTLFLAG_RW, VNET_DEFINE(uma_zone_t, sack_hole_zone); #define V_sack_hole_zone VNET(sack_hole_zone) +#ifdef TCP_HHOOK VNET_DEFINE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST+1]); +#endif static struct inpcb *tcp_notify(struct inpcb *, int); static struct inpcb *tcp_mtudisc_notify(struct inpcb *, int); @@ -449,7 +455,9 @@ struct tcpcb_mem { struct tcpcb tcb; struct tcp_timer tt; struct cc_var ccv; +#ifdef TCP_HHOOK struct osd osd; +#endif }; static VNET_DEFINE(uma_zone_t, tcpcb_zone); @@ -605,12 +613,14 @@ tcp_init(void) tcbhash_tuneable = "net.inet.tcp.tcbhashsize"; +#ifdef TCP_HHOOK if (hhook_head_register(HHOOK_TYPE_TCP, HHOOK_TCP_EST_IN, &V_tcp_hhh[HHOOK_TCP_EST_IN], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) printf("%s: WARNING: unable to register helper hook\n", __func__); if (hhook_head_register(HHOOK_TYPE_TCP, HHOOK_TCP_EST_OUT, &V_tcp_hhh[HHOOK_TCP_EST_OUT], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) printf("%s: WARNING: unable to register helper hook\n", __func__); +#endif hashsize = TCBHASHSIZE; TUNABLE_INT_FETCH(tcbhash_tuneable, &hashsize); if (hashsize == 0) { @@ -763,6 +773,7 @@ tcp_destroy(void *unused __unused) tcp_fastopen_destroy(); #endif +#ifdef TCP_HHOOK error = hhook_head_deregister(V_tcp_hhh[HHOOK_TCP_EST_IN]); if (error != 0) { printf("%s: WARNING: unable to deregister helper hook " @@ -775,6 +786,7 @@ tcp_destroy(void *unused __unused) "type=%d, id=%d: error %d returned\n", __func__, HHOOK_TYPE_TCP, HHOOK_TCP_EST_OUT, error); } +#endif } VNET_SYSUNINIT(tcp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, tcp_destroy, NULL); #endif @@ -1204,6 +1216,7 @@ tcp_newtcpcb(struct inpcb *inp) return (NULL); } +#ifdef TCP_HHOOK tp->osd = &tm->osd; if (khelp_init_osd(HELPER_CLASS_TCP, tp->osd)) { if (tp->t_fb->tfb_tcp_fb_fini) @@ -1212,6 +1225,7 @@ tcp_newtcpcb(struct inpcb *inp) uma_zfree(V_tcpcb_zone, tm); return (NULL); } +#endif #ifdef VIMAGE tp->t_vnet = inp->inp_vnet; @@ -1477,7 +1491,9 @@ tcp_discardcb(struct tcpcb *tp) if (CC_ALGO(tp)->cb_destroy != NULL) CC_ALGO(tp)->cb_destroy(tp->ccv); +#ifdef TCP_HHOOK khelp_destroy_osd(tp->osd); +#endif CC_ALGO(tp) = NULL; inp->inp_ppcb = NULL; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 3cc9af577963..01533c005ae3 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -749,8 +749,10 @@ VNET_DECLARE(int, tcp_ecn_maxretries); #define V_tcp_do_ecn VNET(tcp_do_ecn) #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) +#ifdef TCP_HHOOK VNET_DECLARE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST + 1]); #define V_tcp_hhh VNET(tcp_hhh) +#endif VNET_DECLARE(int, tcp_do_rfc6675_pipe); #define V_tcp_do_rfc6675_pipe VNET(tcp_do_rfc6675_pipe) @@ -788,8 +790,10 @@ void cc_ack_received(struct tcpcb *tp, struct tcphdr *th, void cc_conn_init(struct tcpcb *tp); void cc_post_recovery(struct tcpcb *tp, struct tcphdr *th); void cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type); +#ifdef TCP_HHOOK void hhook_run_tcp_est_in(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to); +#endif int tcp_input(struct mbuf **, int *, int); void tcp_do_segment(struct mbuf *, struct tcphdr *, diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC index 478df09ff612..0e140c9af8da 100644 --- a/sys/pc98/conf/GENERIC +++ b/sys/pc98/conf/GENERIC @@ -30,6 +30,7 @@ options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index d464ac7ee120..48ea76cd6d10 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -38,6 +38,7 @@ options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols options IPSEC # IP (v4/v6) security +options TCP_HHOOK # hhook(9) framework for TCP options SCTP #Stream Control Transmission Protocol options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 88d481110915..598944473f6a 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -37,6 +37,7 @@ options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options SCTP #Stream Control Transmission Protocol options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX index 97464e84949c..0e60ceb24e55 100644 --- a/sys/powerpc/conf/MPC85XX +++ b/sys/powerpc/conf/MPC85XX @@ -36,6 +36,7 @@ options GDB options GEOM_PART_GPT options INET options INET6 +options TCP_HHOOK # hhook(9) framework for TCP options INVARIANTS options INVARIANT_SUPPORT options KDB diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 6c53da2a051c..aafa3979c186 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -32,6 +32,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options TCP_HHOOK # hhook(9) framework for TCP options IPSEC # IP (v4/v6) security options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC index a03f6367f354..4e8a31c85799 100644 --- a/sys/sparc64/conf/GENERIC +++ b/sys/sparc64/conf/GENERIC @@ -31,6 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support |