From nobody Tue Dec 26 11:34:12 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Szt2s0dcSz54dxT for ; Tue, 26 Dec 2023 11:34:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Szt2r6Cjjz3XVn for ; Tue, 26 Dec 2023 11:34:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703590452; a=rsa-sha256; cv=none; b=wmJ0DUiBUz63T1B7TFrEdRPuV/S75/L/X8wZ8mqE6fgRRZsC2el+XatxkJwFtsogQMl6GB s/W4mzcKGLjvVd84vWVe4+44241o69qywBAinf9hzqt6as7Pgp6tkUEMoUD0k/1J+VyPRf qruDjFc7NFVL/N5ASJxioGXRPKa2z+c8iCbTnOrmWC/WuTqQZPv5TK/5OFB151M1O6l5Gj 2Jb60aZjLT/MA48HVOnH1c8jRSaKkILsD8PBz4SR7fb8jZ8MKwKdqehdlNQmi6SSnT8plB 5U77Czy8VT3W/V7alzrH+/HyCf/EjB03ct2JSYC+u21bD5OLcQKjYNNr4rmNXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703590452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kaekEB4/PnAtpCxksksNrHEWdqGtElM+RJrF6Oz6AAQ=; b=VFS55CpT+UhekP7AR7JDNjjlatF76/qYVh1x0oOtmAsWIHGgC2u/jV3tRwLtH9qmaVuz5y tsQsM/X8ehiPrEYKljNupCD37oCH62pZFp1HSzFWmttziiP/8UxHqI5hOCKsbvGTLH5Ccn viUkrFJGjMQGNS5JJ4b2VFUKlU8cTnkhrZ7B7RJ/JGDgsq1Vukm4tf4U39nz6OI0No5CI0 XbsQIEDoGtpXsyOshYZQ35HeuOCurSFKG/10E/djYNw0AesOziS7kd0P+cvyRuul9tMkXQ XSHgx7fE1tyA4oe2LJ2/GyCZNl62kRsIQ4Aruzoz3+yqVIsbu7gWlLwdMeZCKg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Szt2r5HYCztCH for ; Tue, 26 Dec 2023 11:34:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3BQBYCRv004029 for ; Tue, 26 Dec 2023 11:34:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BQBYC2S004028 for bugs@FreeBSD.org; Tue, 26 Dec 2023 11:34:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 275943] PF Ether Rules : High Cpu Usage Date: Tue, 26 Dec 2023 11:34:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: 32carleone@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275943 Bug ID: 275943 Summary: PF Ether Rules : High Cpu Usage Product: Base System Version: 14.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: 32carleone@gmail.com Hi When I use pf as Layer3, I don't encounter any performance issues. However, when I enable Layer2, the CPU usage goes up to 100% and I loose throughput. Below is htop and iperf during Layer3 ``` 0[ 15.7% ] 1[ 12.6% ] 2[ 65.4% ] 3[ 9.4% ] Mem[ 1.74G/3.86G ] Swp[ 0K/3.79G ] # iperf3 -c 192.168.1.236 -t 30 -p 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 111 MBytes 930 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 1.00-2.00 sec 111 MBytes 933 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 2.00-3.00 sec 111 MBytes 933 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 3.00-4.00 sec 111 MBytes 934 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 4.00-5.00 sec 111 MBytes 933 Mbits/sec=20=20 ``` And output for Layer2+Layer3 ``` 0[ 12.0% ] 1[ 7.7% ] 2[ 100.0% ] 3[ 4.3% ] Mem[ 1.73G/3.86G ] Swp[ 0K/3.79G ] # iperf3 -c 192.168.1.236 -t 30 -p 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 52.0 MBytes 436 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 1.00-2.00 sec 79.7 MBytes 669 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 2.00-3.00 sec 79.5 MBytes 667 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 3.00-4.00 sec 79.6 MBytes 668 Mbits/sec=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ 5] 4.00-5.00 sec 79.4 MBytes 666 Mbits/sec=20=20 ``` Issues arose after I added this rule to my config file ``` ether anchor "allowed_mac_igb1" on { igb1 } ``` And these are the rules in the anchor ``` ether pass in quick from 00:0c:29:4e:df:8e l3 all tag allowed_mac_igb1 dnpi= pe 1002 ether pass out quick to 00:0c:29:4e:df:8e l3 all tag allowed_mac_igb1 dnpip= e 2 ether pass in quick from 00:0c:29:97:15:80 l3 all tag allowed_mac_igb1 dnpi= pe 1002 ether pass out quick to 00:0c:29:97:15:80 l3 all tag allowed_mac_igb1 dnpip= e 2 ether pass in quick from 00:11:32:52:54:3a l3 all tag allowed_mac_igb1 dnpi= pe 1002 ether pass out quick to 00:11:32:52:54:3a l3 all tag allowed_mac_igb1 dnpip= e 2 ... +270 line ``` --=20 You are receiving this mail because: You are the assignee for the bug.=