From nobody Tue Dec 03 00:51:32 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 4Y2MY03ZMzz5fGgR; Tue, 03 Dec 2024 00:51:32 +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 4Y2MY02L7hz4TmB; Tue, 3 Dec 2024 00:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733187092; 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=Cmm7iYN5XWx9A/4Z2gfMkCHmeXLGmFEu2w1KuU1iPuY=; b=hn8ljJxLGEKqQEr+w8FbiaG9LWC03FrH72FCs047OJ5h6J6PI/JUX1upLl09YntH+wrI5N pU7WRkFGLPc8tVF16ubB2a574djNjO+eBBfKnYMO9kS+kVpGB31Qdl+o8dAq+DNUa56auh 1IT+FO2TNh8HWis/eOWDjPjpuwTWrLh9dl4jr2DUjY1w/5frJnsODb/ayXHbPuGhxyz3ZT GaqEYI2oLV0OF5z9HnqpiKMloOsGmhO3AyWDZqa/oyBE2/xgAA244vZpnjAiRVCNzjrYE6 7zW/KMMGph+yjdWviJorbHZAqezrY1yMpHvl1npMRl32hRT2gMgny7QnFpkGZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733187092; 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=Cmm7iYN5XWx9A/4Z2gfMkCHmeXLGmFEu2w1KuU1iPuY=; b=uzw7S3TJRfUTCciRkr6q3EdNtdCvrOVuDi1KYj63giUmeRWi754efaqF4RZNFrN/2+RjKh krtnI9mlyakthJn1v6wYNejESQPwzvFFSDbj5dyOV8GP6icC0XvhqcQq1l5aqMI7HMVzq8 SVA+vQu2tBaNcmKcXi488HjC7tx/MsRK2sj2QE8w0Oj2JjQv2IAhXo5xeR5DIRzuYAHDdE /rFIby0j5m2NuVV6pmCm2QFvsRApf7Bxkpp9GQM8xpNA8bR/ttlQTRkhvlF9tPdSbbiKll G2kPNBFUgtnlNGPj3Zs/eAU6lgci9P7Lp6XPnb8+uXo4D0oH7726oKXqmL7WCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733187092; a=rsa-sha256; cv=none; b=MaoDCt3Qd5bfRaoOMUWTPfr+q5VCZPWBSuq8ZE9jHWYviu3FWtBLkY5rxaOpWPs6fSRQjM rhAC8MU0Xby/IAuVpgAIO0JVSH60YbK0nE7aEZhfyO8Q8f/nzLujeKmRyURrDGjaYdw3Lq VyGeZz284ZN9hUb+IXAoeVrUIgsazdNkAX7di46IQhKc5rsKL6+p3rl9S0SXQ2K5cCrU7C WUTPCL75SqTyjgCpr3MNgv5Y+Y8mXGiDgnH/OR/SLdzI1WA6I5whbjGR8geY5tI1VFMxMw 9XrBo22Es4x0/m84q7SizDZQGOKg2RjGXKwYzNoxl/LpeUgc4V+1ZR9f8J+U2w== 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 4Y2MY01xsbz11j2; Tue, 3 Dec 2024 00:51:32 +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 4B30pWNd017478; Tue, 3 Dec 2024 00:51:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B30pWfi017476; Tue, 3 Dec 2024 00:51:32 GMT (envelope-from git) Date: Tue, 3 Dec 2024 00:51:32 GMT Message-Id: <202412030051.4B30pWfi017476@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: f16b81e620c6 - stable/14 - mlx5en: only enable to toggle offload caps if they are supported 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: f16b81e620c613f509ed5bf66b7f96f87928bb1c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f16b81e620c613f509ed5bf66b7f96f87928bb1c commit f16b81e620c613f509ed5bf66b7f96f87928bb1c Author: Konstantin Belousov AuthorDate: 2024-11-21 06:06:01 +0000 Commit: Konstantin Belousov CommitDate: 2024-12-03 00:39:23 +0000 mlx5en: only enable to toggle offload caps if they are supported (cherry picked from commit 4cc5d081d8c23020130c5f30ed31f79fa105de74) --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 58d305dd43f3..0e1de4d304a9 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3537,6 +3537,20 @@ mlx5e_ioctl(if_t ifp, u_long command, caddr_t data) drv_ioctl_data = (struct siocsifcapnv_driver_data *)data; PRIV_LOCK(priv); siocsifcap_driver: + if (!mlx5e_is_tlstx_capable(priv->mdev)) { + drv_ioctl_data->reqcap &= ~(IFCAP_TXTLS4 | + IFCAP_TXTLS6); + } + if (!mlx5e_is_tlsrx_capable(priv->mdev)) { + drv_ioctl_data->reqcap &= ~( + IFCAP2_BIT(IFCAP2_RXTLS4) | + IFCAP2_BIT(IFCAP2_RXTLS6)); + } + if (!mlx5e_is_ratelimit_capable(priv->mdev)) { + drv_ioctl_data->reqcap &= ~(IFCAP_TXTLS_RTLMT | + IFCAP_TXRTLMT); + } + mask = drv_ioctl_data->reqcap ^ if_getcapenable(ifp); if (mask & IFCAP_TXCSUM) {