From nobody Tue May 24 20:59:53 2022 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 91DCF1B4FA9C; Tue, 24 May 2022 20:59:54 +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 4L765j5GDQz4jY3; Tue, 24 May 2022 20:59:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653425994; 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=K6u+Nlrao0EC5FuN5I0bRZxb90XHack5PkzIeWHFiCM=; b=RZSwak+qo0X9gdBq92wt23vHxEP6foxRNJPj5ekeZDce0U/3DZdoPuiLe0KOG64I5ynqYx Wh6u8wiV79xrux5xPn1qiv/QF9UTgo29n04rOPl3PFSp/Lofh7IXqJ6pGRjttRZg2aNitE ftq8byv8aVAE+MdLRBeh5yTncCnuzSNUDFiI3Mj6HFoEwktICUedY6DAaQgCgdeDTPRZ1q c6g57iFjnEeNyZt4GOQ0TGBDYTPSg4FkaUVnQRF7naYnAZda0lbDWKnKYPuqEr0pAzrvdr vpL2B+Cv3TcRQJ7S2FduimW7RyBcwHc0fSEcUQk8W31LCdgJ33y04id33IV2UA== 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 604163CE1; Tue, 24 May 2022 20:59:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24OKxror036753; Tue, 24 May 2022 20:59:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24OKxr3h036752; Tue, 24 May 2022 20:59:53 GMT (envelope-from git) Date: Tue, 24 May 2022 20:59:53 GMT Message-Id: <202205242059.24OKxr3h036752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 277b9588fde6 - main - ifconfig: add rxtls and -rxtls commands 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 277b9588fde66850171e013051d79737a01c3de9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653425994; 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=K6u+Nlrao0EC5FuN5I0bRZxb90XHack5PkzIeWHFiCM=; b=Jv2hanEh/bI7KFzCwyxY3GOR5s7kcNSDeY21Om+YXIOMUsbC9ePyy4g3s9xFyf81MKEH6S 1oqzWAptYqrddEzoCc2VPRD9DglFj7sBLmtR4dzbwSy+ASycKCIo+8qruBTK1jLEulYGly 3+pliZoUXekDS4+560GdIJh0xZvtSRK2/zUeiwCRuJ/6ZuzGEMfF1TccrBRhKP1JiDPQbJ F6ODPkl2+uNPOpOmFDzRUUZj2pZvSV9UHvFHc6dLnE6ifiUZZgHhTWF7G4pLReAdKklzWS 3A1Voo5/VYXAYj8nyACiEu6xNcMByYVS+9X/3jwt0ACofrD0ccPw9bOXhzmAcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653425994; a=rsa-sha256; cv=none; b=R3+PBqPilLJUDde+eMUCoZZ03w7DTEq02+ULLMn1HN72cMxMaJVAELNryUhTIgXFj2mgYp 49gm910EaTwPfgt377fpFTTy4YJxiFQ0xs3Yjxpyj3AegBoA2w3+Xg6elLpP4y8L/9dE2q Vog8OThcm7B6rWGhNQTebcAO4IDGBUQfZ10o5Am1awezAagPoZ9leInmmqMRYdevmxCEIu WO2W8FMKFAOwC6BPwfmFnWzVmtwtfLc/wBDqn3ByX2Yh6XCd0ZuSN3f8XKZQ+oc7GHoJr0 GlUl5wztWLFuoWCfTHmcnZnC0onCH/ePpkvAz+3gYPBJOAOjEvjbushGX1pcjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=277b9588fde66850171e013051d79737a01c3de9 commit 277b9588fde66850171e013051d79737a01c3de9 Author: Konstantin Belousov AuthorDate: 2021-12-15 03:06:08 +0000 Commit: Konstantin Belousov CommitDate: 2022-05-24 20:59:33 +0000 ifconfig: add rxtls and -rxtls commands Reviewed by: hselasky, jhb, kp Sponsored by: NVIDIA Networking MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D32551 --- sbin/ifconfig/ifconfig.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 9ee86b2a5169..2ed7d43ac50c 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1280,7 +1280,12 @@ setifcapnv(const char *vname, const char *arg, int s, const struct afswtch *afp) neg = *mopt == '-'; if (neg) mopt++; - nvlist_add_bool(nvcap, mopt, !neg); + if (strcmp(mopt, "rxtls") == 0) { + nvlist_add_bool(nvcap, "rxtls4", !neg); + nvlist_add_bool(nvcap, "rxtls6", !neg); + } else { + nvlist_add_bool(nvcap, mopt, !neg); + } } buf = nvlist_pack(nvcap, &nvbuflen); if (buf == NULL) { @@ -1739,6 +1744,10 @@ static struct cmd basic_cmds[] = { DEF_CMD("-lro", -IFCAP_LRO, setifcap), DEF_CMD("txtls", IFCAP_TXTLS, setifcap), DEF_CMD("-txtls", -IFCAP_TXTLS, setifcap), + DEF_CMD_SARG("rxtls", IFCAP2_RXTLS4_NAME "," IFCAP2_RXTLS6_NAME, + setifcapnv), + DEF_CMD_SARG("-rxtls", "-"IFCAP2_RXTLS4_NAME ",-" IFCAP2_RXTLS6_NAME, + setifcapnv), DEF_CMD("wol", IFCAP_WOL, setifcap), DEF_CMD("-wol", -IFCAP_WOL, setifcap), DEF_CMD("wol_ucast", IFCAP_WOL_UCAST, setifcap),