From nobody Tue Nov 19 05:20:16 2024 X-Original-To: dev-commits-src-all@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 4Xst9X6Gttz5dZhX; Tue, 19 Nov 2024 05:20:16 +0000 (UTC) (envelope-from git@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xst9X5rFtz4GHy; Tue, 19 Nov 2024 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993616; 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=SnuPIrTq/t3WWaKHRak+Uu/9P/v+xm6XXkExJrxudsM=; b=YHpmhmXuxj67Ie9rQDQzXr18IekZRpbWgIyWzz3aNeC3RgxX3mjZHCDk7bitmx1y+Rrjpp dtQJvCKqSHOf41Gd4daZj2MMQpl7BUj24D1AACN9xKQ8IS93XmBqQGrLwnZGiPlpReUr33 PBsTcA/Mw34QtWDBSQBIG9WFI9TimtJxnxXVT1g1IkV8G0cxJHw2Sw9uU2Sn39QOeHUgux Rx3N6yTlZIXfhc9+azcQQh/4jSAbD6wTpprkpIIZDks6n3auejLekzHEnnU1B8feOWO2Kl MDmZDqb1HFUwJndJjbBSYmfs3ni+k/PNHpI6bz7kEJG/dkGfDfyJh89sEDOKgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993616; 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=SnuPIrTq/t3WWaKHRak+Uu/9P/v+xm6XXkExJrxudsM=; b=hK8fF+CfCBvqbQM1puTp5hDi1uTk9+u+2yT14sZThP8I0qp+XU4P41fIljmG0umLzKUXSX Mm3XTRmP9fipItiWIkUoaYXXuc7sV6PpqjgvXESHWHFIlSHq5oGwAggHFs6aq96jpeII0L apt9q5qaFyzBQHaP+L3H770UVLeBSKD/g4kELC70VttMpeOW1NneStGnvUNMgQSXLMA/6e 6ZSGQ+e+sp5c6CdAeBljvVyiWAayuPr1AePH67ckrU0ARc6uholDdPg3YDpuB2ObTfZ/Fc HZD7uW/WnSYAqSwLypOhJmnNv3wtvr/osc8e6Si62XzZP1tRIU94KYI2Rg1rLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731993616; a=rsa-sha256; cv=none; b=ud5jQM42zGbs+/3awgLmpKxBKTTKCQ0xTH3X9/a0i6DqZQqAQOoRV5PuVPX5ajr7VRPWgF CRF65IzEGHnjdl8rdbK48W5OgAxJGTLd+58TrkMYzSnputlSRY+tOKceGkZasRi1t4GGsf 0WzPfQ4pADYkOu3Oec64sgZcbCXXXNd4N4Xtj0uC3O7gW2aGpeCBxnxAtvBA+FH9eusHFJ y/7FhT4Y05/nKWr2sYxOSeGXxSwsTLqcW9sP243a7YYOZbC+gcyHMqYtDZPXcKPx5WG3hX v+SupxhqmzPvmAgcJwm7ViYN5e44QU/p3iTtIzo1cc2MxxzXiSi6xgZ/UnbaDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Xst9X5GcRz1BSm; Tue, 19 Nov 2024 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJ5KGl1014907; Tue, 19 Nov 2024 05:20:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ5KGLi014903; Tue, 19 Nov 2024 05:20:16 GMT (envelope-from git) Date: Tue, 19 Nov 2024 05:20:16 GMT Message-Id: <202411190520.4AJ5KGLi014903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8925ea58c206 - stable/14 - mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8925ea58c20600fb740e5aa370af70b6b9b5febe Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8925ea58c20600fb740e5aa370af70b6b9b5febe commit 8925ea58c20600fb740e5aa370af70b6b9b5febe Author: Konstantin Belousov AuthorDate: 2024-10-15 22:34:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-19 05:20:09 +0000 mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps Sponsored by: NVidia networking (cherry picked from commit de7a92756f0ab50e5e243ce9ac680e27f5c41370) --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 55a4bc3cec79..4399af43b93b 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -4518,13 +4518,25 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if_setcapabilitiesbit(ifp, IFCAP_TSO | IFCAP_VLAN_HWTSO, 0); if_setcapabilitiesbit(ifp, IFCAP_HWSTATS | IFCAP_HWRXTSTMP, 0); if_setcapabilitiesbit(ifp, IFCAP_MEXTPG, 0); - if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); +#ifdef KERN_TLS + if (MLX5_CAP_GEN(mdev, tls_tx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0) + if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); + if (MLX5_CAP_GEN(mdev, tls_rx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0 && + MLX5_CAP_FLOWTABLE_NIC_RX(mdev, + ft_field_support.outer_ip_version) != 0) + if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | + IFCAP2_BIT(IFCAP2_RXTLS6), 0); +#endif #ifdef RATELIMIT - if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, 0); + if (MLX5_CAP_GEN(mdev, qos) && + MLX5_CAP_QOS(mdev, packet_pacing)) + if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, + 0); #endif if_setcapabilitiesbit(ifp, IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO, 0); - if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | - IFCAP2_BIT(IFCAP2_RXTLS6), 0); + if_setsndtagallocfn(ifp, mlx5e_snd_tag_alloc); #ifdef RATELIMIT if_setratelimitqueryfn(ifp, mlx5e_ratelimit_query);