Message ID | 20240223-upstream-net-next-20240223-misc-improvements-v1-2-b6c8a10396bd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-79084-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp826397dyb; Fri, 23 Feb 2024 12:25:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUI5QZsmZaL/gHwC4KsUQE8FVUVVIcor4UL2YOWKaey8yAxEOhvjliSX1f6kOSmtWqliIphmbeFVgIjqfS5eL+22x9mLg== X-Google-Smtp-Source: AGHT+IHBo+bmSbrqGkyPdUT14nMO7tdzj3L7kmBlnpiMIIQx7A2zTPo9MZ6cvO/uFeuyLMg3Wln1 X-Received: by 2002:a05:6a21:1583:b0:1a0:e09d:8ecb with SMTP id nr3-20020a056a21158300b001a0e09d8ecbmr1188046pzb.6.1708719904140; Fri, 23 Feb 2024 12:25:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708719904; cv=pass; d=google.com; s=arc-20160816; b=do0cm/Q0G+F8GMYi8I0MHt1rv/kl8Vdl+TdpQUGjTnM5dwRI7pU5Iddvn/Wb8nshKE R5ND+HwEsEZTYJu5qdaD78lroeL20Ti9fi8FSGUNVw+RFX3VmS78CL/CKJgBTWKQsotY Mz4V/eqsvhKE6PwbxiZHkuljNgfMIasXxazQKC/bSXeLSgC/jkch5yx4cV1S1GCmDse8 GI4uIiLBV9wt/7D9vZwGmWJ65YaCc3RbXjjGrdOCujG5xnW0OpWU6F5p1gl6WYHIzKmn pGKuUY7SEWTjryULa0Ujqt/nUlF3zZdvn+wjbyypp3LCOLN2iIJ6BMQv+QmmrmJDWmfJ S3wA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=IX/3atdoMMNke9J8LvEuQNLuWRS3hLOsIO686/wPLe4=; fh=Z1YWgvxkmJ0/+y4FkLRSZ5mzUdtmyDAS67SU6REkp38=; b=DxGxEK6tGlxGpzQIplZFsFjjPrOZ7nuS3ZYzRZUc0kd7rL2c7VnpWdlIltCfSvRwFT KFu/QP7ExYDQl3sy3BwoJAe3hYq2LCpyiIEVF0mjYwBCvt3X/xUv5whSrXDgC20xI4x2 02u9l+PhS2JK1QXG1s75OvLkj88oowWJaCJeUTijkgjJTMcI1N0cb/RFfqyTkE7hvuQg C9Ps9Ii1Sr3zk+u8lq1AlTC+DFbXu/pdjjm/bADNbPVINXYf0UOUokKTwKD4plsbKkoL mHoovqWcMFFDKONNz+5G9OUU/iHXZd2s+gE1gAfx4zGbNksXlkyF5Uwfb1ne6R56FiZ5 1Dng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sBpChH4u; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79084-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79084-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l8-20020a63ba48000000b005dc8922fe5csi12625362pgu.457.2024.02.23.12.25.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:25:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79084-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sBpChH4u; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79084-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79084-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D3247B2636F for <ouuuleilei@gmail.com>; Fri, 23 Feb 2024 20:21:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81AE514DFE1; Fri, 23 Feb 2024 20:19:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sBpChH4u" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 319FE14938A; Fri, 23 Feb 2024 20:19:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719545; cv=none; b=syCak26xb6FpjUhuJtnXi8BNJWBrE9Z63iUTOXf4d/kZd4n7uz05630NSSS64z4Q/mS0Jl6/C41NoLPOPHtJQW2uLUB+kOjiIJGj0tiOlmwrC7ViMhwdhblYo5J0cLZ5pu9ffr58j40dwPtOWuBU2Rqqlx9KSRhfxzQaKbNr0wg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719545; c=relaxed/simple; bh=Dm6ZdORui82/8VoYa4bD5q/6VoXige1uFQXuWG3HMks=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SrnqrAdN52uY3DbnkMG6uqxP003ynq7onolVinf8nIJolnGdLWhiGKaWjouppeAbQ5RIXnyuxsNb68/+nxu6kNk0w54jHy75Nt+/UmyQbBewP8eOBgHBP/jXySeHL5OxtBcqMhmlUwiXQlCqLvV9YPfEWE/S1dY5rfdkS2DNzBI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sBpChH4u; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AED8C433C7; Fri, 23 Feb 2024 20:19:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708719544; bh=Dm6ZdORui82/8VoYa4bD5q/6VoXige1uFQXuWG3HMks=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sBpChH4ubXj9H2Rq6Zjdq1N8SM3jKzp/2P5UcRMCsk+oNWuTfWTikoN32ya4NJxvN waNiAHkJsQJeAOSPtWISoAmE4U4SixqmrRJpj2yltbcOFlpXtijD8IvuhE6hWEoj3J ZKI0lQlDEVGuKU7NzaiITE+7UwkqFhnK1nFHU8Xt7GhK5Z5CJ6lb15uaPid6c+Yiwp iz4Iz6wq4bDcAchlR4CSbkzGW04c/7f9fAVsw9o9EOT0YONSyooThTGssr13bv8Odn Vl8wXRrwk2BJtE5NelQZ3ZCtysYE8rbs1XURb72/jDu03hQLqRLX9GK+0gePih3s2u SBc+gQsId5SkA== From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org> Date: Fri, 23 Feb 2024 21:17:54 +0100 Subject: [PATCH net-next 2/8] mptcp: token kunit: set protocol Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240223-upstream-net-next-20240223-misc-improvements-v1-2-b6c8a10396bd@kernel.org> References: <20240223-upstream-net-next-20240223-misc-improvements-v1-0-b6c8a10396bd@kernel.org> In-Reply-To: <20240223-upstream-net-next-20240223-misc-improvements-v1-0-b6c8a10396bd@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>, Geliang Tang <geliang@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org> Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" <matttbe@kernel.org> X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1235; i=matttbe@kernel.org; h=from:subject:message-id; bh=Dm6ZdORui82/8VoYa4bD5q/6VoXige1uFQXuWG3HMks=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBl2P2q2eS9x43GC5y4A1Ev0Db4KVnezwT0MGWbc R/lDEWzoIKJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZdj9qgAKCRD2t4JPQmmg c7jnD/4jD0nW63U92fD3F/Fzyx81Zku0ZzjDDRDfwaZC5/HajMUrJmOWRY24NV0oHlkMYa2J6kY jpLpuJyu7+Y8J9L5wTpdKKGIGi7pOSuB9JZQBgjYRBlWsK2nVPbgSJ756oHJPekgEM7nXsCElfO mOoq8VG1Qm4vWDxIqxUdBp9/8oiOKN4U3OwQUFxJvMBjxtgH3PxEEV6C2x49oPkfyVWW4bMGFt9 yVJNcDiZn79hgc+N0Zl0fG0XLNrR99IOCydPxrQKzdwkqRrhGtG7OnAkoBJSQAcrUSrka/WnXC/ oU7h6RJXdPVb3y8jccAGdgJ/KBhkGIlF6w2bqmQe+9jgrlvY1dp+gAs56Ivgy11kyNKr6kShrzh eTgR8KiFg397D/U8YNtVfgWkln52tW+ve0DGUGAgaWBiAtEkP9Lm3xv3RTt5m85JJmyXWVbZ5Jc /dzLFX7X3gOUDCZ0Bq/cGJnm98DEMTStHCfAQwP0cFQSgwlmWjDomyw5WnkLsZ/EzX5MFn2ywMf ynE0SSyY5b5+tP64CauPOky8+cLM5Dl8mj+foz6KJDOKvZrB577STwUK0XsgQ/ZSbo0PbpTt7u4 aPqvTj8fyvVtKmVWq8xxNb/7KhwtzsjM+PTr9Tvv0oPvrNVhA0YNQWGgq/4ulnLcoS2Z3Bil1Z6 OXcc9tkgFMzHwqw== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791722682169734364 X-GMAIL-MSGID: 1791722682169734364 |
Series |
mptcp: various small improvements
|
|
Commit Message
Matthieu Baerts (NGI0)
Feb. 23, 2024, 8:17 p.m. UTC
As it would be done when initiating an MPTCP sock. This is not strictly needed for this test, but it will be when a later patch will check if the right protocol is being used when calling mptcp_sk(). Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> --- net/mptcp/token_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/token_test.c b/net/mptcp/token_test.c index bfff53e668da..4fc39fa2e262 100644 --- a/net/mptcp/token_test.c +++ b/net/mptcp/token_test.c @@ -52,14 +52,19 @@ static struct mptcp_subflow_context *build_ctx(struct kunit *test) static struct mptcp_sock *build_msk(struct kunit *test) { struct mptcp_sock *msk; + struct sock *sk; msk = kunit_kzalloc(test, sizeof(struct mptcp_sock), GFP_USER); KUNIT_EXPECT_NOT_ERR_OR_NULL(test, msk); refcount_set(&((struct sock *)msk)->sk_refcnt, 1); sock_net_set((struct sock *)msk, &init_net); + sk = (struct sock *)msk; + /* be sure the token helpers can dereference sk->sk_prot */ - ((struct sock *)msk)->sk_prot = &tcp_prot; + sk->sk_prot = &tcp_prot; + sk->sk_protocol = IPPROTO_MPTCP; + return msk; }