From owner-svn-src-all@freebsd.org Mon Oct 19 21:11:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D364435184; Mon, 19 Oct 2020 21:11:50 +0000 (UTC) (envelope-from np@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CFTw572B2z4DFB; Mon, 19 Oct 2020 21:11:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D31289ACB; Mon, 19 Oct 2020 21:11:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09JLBnDr000785; Mon, 19 Oct 2020 21:11:49 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09JLBnTg000784; Mon, 19 Oct 2020 21:11:49 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010192111.09JLBnTg000784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 19 Oct 2020 21:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366862 - in head: share/man/man4 sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/cxgbe X-SVN-Commit-Revision: 366862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2020 21:11:50 -0000 Author: np Date: Mon Oct 19 21:11:49 2020 New Revision: 366862 URL: https://svnweb.freebsd.org/changeset/base/366862 Log: cxgbe(4): Updates to the drop features from r366532. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/t4_main.c Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Mon Oct 19 20:43:29 2020 (r366861) +++ head/share/man/man4/cxgbe.4 Mon Oct 19 21:11:49 2020 (r366862) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 8, 2020 +.Dd October 19, 2020 .Dt CXGBE 4 .Os .Sh NAME @@ -369,6 +369,7 @@ The attack filter will drop an incoming frame if any o true: src ip/ip6 == dst ip/ip6; tcp and src/dst ip is not unicast; src/dst ip is loopback (127.x.y.z); src ip6 is not unicast; src/dst ip6 is loopback (::1/128) or unspecified (::/128); tcp and src/dst ip6 is mcast (ff00::/8). +This facility is available on T4 and T5 based cards only. .It Va hw.cxgbe.drop_ip_fragments Set to 1 to drop all incoming IP fragments. Default is 0. @@ -378,9 +379,11 @@ Set to 1 to drop incoming frames with Layer 2 length o Default is 1. .It Va hw.cxgbe.drop_pkts_with_l3_errors Set to 1 to drop incoming frames with IP version, length, or checksum errors. +The IP checksum is validated for TCP or UDP packets only. Default is 0. .It Va hw.cxgbe.drop_pkts_with_l4_errors -Set to 1 to drop incoming frames with Layer 4 length, checksum, or other errors. +Set to 1 to drop incoming frames with Layer 4 (TCP or UDP) length, +checksum, or other errors. Default is 0. .El .Sh SUPPORT Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Oct 19 20:43:29 2020 (r366861) +++ head/sys/dev/cxgbe/t4_main.c Mon Oct 19 21:11:49 2020 (r366862) @@ -4823,7 +4823,7 @@ set_params__post_init(struct adapter *sc) F_DROPERRORIPHDRLEN | F_DROPERRORTCPHDRLEN | F_DROPERRORPKTLEN | F_DROPERRORTCPOPT | F_DROPERRORCSUMIP | F_DROPERRORCSUM; val = 0; - if (t4_attack_filter != 0) { + if (chip_id(sc) < CHELSIO_T6 && t4_attack_filter != 0) { t4_set_reg_field(sc, A_TP_GLOBAL_CONFIG, F_ATTACKFILTERENABLE, F_ATTACKFILTERENABLE); val |= F_DROPERRORATTACK;