From nobody Wed Jul 19 18:17:12 2023 X-Original-To: dev-commits-src-main@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 4R5kYj0k1Rz4mpRS; Wed, 19 Jul 2023 18:17:13 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R5kYh5c4Hz3Pp7; Wed, 19 Jul 2023 18:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689790632; 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=gDB+Jll5TxJYx+WpMYlycvk2F9brrxXXNKYlr2P8vJo=; b=Mi83FNvj5ifN3NcFco5JcM/kLw/SjAba1DOJcoeNxoES6wH3MJrGQ2QJhGzeBYshvBprE5 cv3dwuNIhgDZdL6YEZg3Dm2Zzc2TGQEe/js2pagYV04YCy7nIlgaX1sSgAX/HMheNrj9Sr 67rfhYDnIvvi+jpi3IKfiTLHD7h9BFdqluvh877lcgmVMoyuUvAwOrKL+gG68GUUDoQ2iJ rC27YV9IsZfCzRnBjNcsRLX2Dd4MgdNiGJWt50xCeWZbjpkWECoop3Dy6xD7EfNA8L9NQM pu2yvMj0Ui+dZQK2b+8psOeKUh41T5+tf7Pm/uuZAUKcqUyNWrlimdEj+isvlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689790632; 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=gDB+Jll5TxJYx+WpMYlycvk2F9brrxXXNKYlr2P8vJo=; b=gljZT2Z6c7vgkoDjW+KLhAkJzVAMCXboXWQXF28P/dB12lZ1g37vr3U6vTYlPDs+lG71hG eax5QIRjLKGD9VoruFp3vH009BK8pq2yZeIAYy2XrmjSydtH5nk0T9OPTQvaCKzHAsD9Do Jj1W3+16Xo23XbrFRJrAMsxdRRqGnSyVgSV7/yXCya+H63YeoDj3KbDrtaENyX0AsVQl2L 0dq36z/zSTTMaBdYJXthQull7eqt9y6AMqXAS8GWmTu4ijRaaKQ9XCocmVft0YwliaCfBq ZY6yaK2nA8y3MV7l1DulEIM0/jdpeAq1kZYvpCJtf0bVGMPp2Qf1RZHxVqAdZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689790632; a=rsa-sha256; cv=none; b=af8RFvTpIrpj6Kv38lrTC9iClrBGmXhD7Y24IW23Cz+jYedN7CxYxM+u/TUT3pc+CoAok+ qTnPHVu7H/J9rrNo8jxH+qwbVdA6757NfOW87NRM9xYUCzPoKdLqcDBLy3smpCx2A9d2W4 lKLYhSUGCvlY50E3B+07plW4r86UF5XBTngJtSdgJN7CAQIp0+VG51bV5zU252SFfpSkWM bsjHMzC76LiS5RT/yvvdeocu0y9jaFA5iIHKCPf7x1avWKpIuYuU9WySthjB3FW2zyCMad eM0m7PVWVZpbcyI1eEbystE3cCyzkLqD1c+HqvCbPRCBNGYXSIgvjahxkYUnFw== 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 4R5kYh4WnpzyXQ; Wed, 19 Jul 2023 18:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36JIHCFo000232; Wed, 19 Jul 2023 18:17:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36JIHCk7000231; Wed, 19 Jul 2023 18:17:12 GMT (envelope-from git) Date: Wed, 19 Jul 2023 18:17:12 GMT Message-Id: <202307191817.36JIHCk7000231@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: c721694a1ca8 - main - ktls_alloc_rcv_tag: Fix capability checks for RXTLS4/6. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c721694a1ca8c1649b32a1ea6faa79a606cd19a6 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c721694a1ca8c1649b32a1ea6faa79a606cd19a6 commit c721694a1ca8c1649b32a1ea6faa79a606cd19a6 Author: Navdeep Parhar AuthorDate: 2023-07-19 17:56:03 +0000 Commit: Navdeep Parhar CommitDate: 2023-07-19 18:12:14 +0000 ktls_alloc_rcv_tag: Fix capability checks for RXTLS4/6. IFCAP2_* has the bit position and not the shifted value. Reviewed by: kib@ MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41100 --- sys/kern/uipc_ktls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index df4fe4b77c04..750e612cb273 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -993,12 +993,12 @@ ktls_alloc_rcv_tag(struct inpcb *inp, struct ktls_session *tls, INP_RUNLOCK(inp); if (inp->inp_vflag & INP_IPV6) { - if ((if_getcapenable2(ifp) & IFCAP2_RXTLS6) == 0) { + if ((if_getcapenable2(ifp) & IFCAP2_BIT(IFCAP2_RXTLS6)) == 0) { error = EOPNOTSUPP; goto out; } } else { - if ((if_getcapenable2(ifp) & IFCAP2_RXTLS4) == 0) { + if ((if_getcapenable2(ifp) & IFCAP2_BIT(IFCAP2_RXTLS4)) == 0) { error = EOPNOTSUPP; goto out; }