Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp8419rdb; Mon, 15 Jan 2024 10:05:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYTPfjnWe+C1rBiO5ne2ogOWIlbWGvms5l84RWOfQDHPZiDWY0X9Lz3c/zsv5q9cWnYmP7 X-Received: by 2002:a05:6512:31c2:b0:50e:5266:1008 with SMTP id j2-20020a05651231c200b0050e52661008mr3520465lfe.105.1705341925454; Mon, 15 Jan 2024 10:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705341925; cv=none; d=google.com; s=arc-20160816; b=Pt5XnHQmgLoXilqBpiKz+yfB/W0PBDjHfdMpYnusA4Z+//QYHOEpODqjY3XOjAwsSg 4SVAIrKfvYJ9g69Vu5tnomaBGfJLGQzWtShLuXHKt4KP45alQQjdu82mV59MadFYvrB1 urtWeyJ3WpXbkFcWGwVK0wd9m9kRiV427YaM68KD4Lxdbt2bDR3QsHBx1moz9sZgPazg 1egQbAFdKKVXUjnO4tYENwZk9HPm03UzMJWuJO+ZeNXWv1PosdZWb4//Gp0dC1i/uh9t GnpwRDct3d3gHLfZqo5zK/kp2wJmyBPpSpCI2OY8gUf9nnJCHTv1OrPpwK++he02220Y /Srg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ZYebFm02oQzKSho2r6zut1eAIyUxcztuNRtBzpyES9c=; fh=UyNH+HHezbjob6gBG4oyxJNFnIIRt+xAr7/Stkwdrto=; b=mC9iwmO9D0gQDlKqKJdYcIQJ1eQCrLwceQtxd8RPQMR+zXF68siSCvNLRtcGdmB5C0 8KxqwSY03Z/MzZQxtg5n32YQeUdVjKGCg79qRC8oLCzmr7WefCioWEuvyuuLjkxNyi3L TiFV6zoDFgefzhxkUmm/1+julyNTNBATdrfOM5CaUAyRuoVXqRsBk9vK4YtzPMZzxS68 CU8T9jhz4SBFbE0dGQMMZwOpnQ//qfPdZ5jXQ7Shh6J8BaUzZ8G5aUKXZ1Ufxvv0ZAIV tAHhKBd5ocsv5SyeYhHFEkKkNvBaSeMGbnnISUpnlDRt+TFt2bo8+HpA6+w4Vmve4NcE AK1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=google header.b=T2nyDvqA; spf=pass (google.com: domain of linux-kernel+bounces-26352-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=arista.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gs26-20020a170906f19a00b00a2af7e3f74bsi3726985ejb.172.2024.01.15.10.05.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 10:05:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26352-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arista.com header.s=google header.b=T2nyDvqA; spf=pass (google.com: domain of linux-kernel+bounces-26352-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=arista.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 22A431F22CE2 for ; Mon, 15 Jan 2024 18:05:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54D3D182BE; Mon, 15 Jan 2024 18:05:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b="T2nyDvqA" Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CE0018626 for ; Mon, 15 Jan 2024 18:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=arista.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arista.com Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40e5f746ac4so54602535e9.1 for ; Mon, 15 Jan 2024 10:05:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; t=1705341911; x=1705946711; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ZYebFm02oQzKSho2r6zut1eAIyUxcztuNRtBzpyES9c=; b=T2nyDvqA8Ef2ytacO55Ifrc2iQbForb2eIzGmKfYiSSt4oJ4Bn+CPYEFOO6BbH+C2e ssyP6OPdmsqYXencyQN46T/K35s30V8byPuH42t18uEzb3P8Beob6HXHbwfO9QMQQr4s Gexvy49Vbz5RJWPnqz+RZdYxoTcZ/EEP4qnu4IMsnf96LC7Am8TjH+wN/GUHHHW1kmCv H6LeoSbdsw2aO0rUx2yefZIMenWsYD6RsZd6z9PmJdGKl6fdN6hLz26D/elPBj2yDMr7 cWC6DIlcn5HQs4v3kz6Md3nI8+DBaTZG83DvpKy+jNZ7HeKvVocs3M7z1ltiY5J0rWed BlhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705341911; x=1705946711; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZYebFm02oQzKSho2r6zut1eAIyUxcztuNRtBzpyES9c=; b=dPdMc1z1sud/+s05rR37F5LOQPUDiahhL+yA0XZYtUCsf7PoDGeBCEatXuK7j8NYRs yIMrE2088bw+OfMc9ArfqnTGkjxvp6+9TfNgtxk12VPo+hWfT5WRCcw2azs7dqt1kPAx YCvDUIaDE/IpLSk/Uk6OEOEvZZKT/Jq7YHaL4X4gnvltTqedTfP4zSAtkKxYFzpQQscx gCwIiJqD+633wWj2rCV/YDG/bJC3NFPY8Ly++YmOBV9uub9ntjCQRpVxEGYx02IPZzI6 m0DoF4PCBWJT9uAw/CGENVe/GdOCecCnZmHkrakz1bn6NFhZmO2rYF3io+vNHiVrLNTq y8QA== X-Gm-Message-State: AOJu0Yzfp/JEk09P8pteBRhawXD09s4GlppK2DzaSjPCddZuMhL1IRVe lPjt/s5EwrivF5sSA/mcECKcNxXrloTG X-Received: by 2002:a05:600c:3546:b0:40e:7e0a:65f2 with SMTP id i6-20020a05600c354600b0040e7e0a65f2mr662182wmq.163.1705341911024; Mon, 15 Jan 2024 10:05:11 -0800 (PST) Received: from [10.83.37.178] ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id ay12-20020a05600c1e0c00b0040d802a7619sm20871602wmb.38.2024.01.15.10.05.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jan 2024 10:05:10 -0800 (PST) Message-ID: <934627c5-eebb-4626-be23-cfb134c01d1a@arista.com> Date: Mon, 15 Jan 2024 18:05:10 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 12/12] selftests/net: Add TCP-AO key-management test Content-Language: en-US To: "Nassiri, Mohammad" Cc: Shuah Khan , David Ahern , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Salam Noureddine , Bob Gilligan , "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "netdev@vger.kernel.org" , Dmitry Safonov <0x7f454c46@gmail.com> References: <20231215-tcp-ao-selftests-v1-0-f6c08180b985@arista.com> <20231215-tcp-ao-selftests-v1-12-f6c08180b985@arista.com> From: Dmitry Safonov In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Mohammad, On 1/12/24 18:57, Nassiri, Mohammad wrote: >> -----Original Message----- >> From: Dmitry Safonov >> Sent: Thursday, December 14, 2023 9:36 PM > >> + >> +static void end_server(const char *tst_name, int sk, >> + struct tcp_ao_counters *begin) { >> + struct tcp_ao_counters end; >> + >> + if (test_get_tcp_ao_counters(sk, &end)) >> + test_error("test_get_tcp_ao_counters()"); >> + verify_keys(tst_name, sk, false, true); >> + >> + synchronize_threads(); /* 4: verified => closed */ >> + close(sk); >> + >> + verify_counters(tst_name, true, false, begin, &end); > > Shouldn't it be reversed instead? > verify_counters(tst_name, false, true, begin, &end); > The sk is an accept socket and the function is called by the server. Good catch! Do you want to send a patch? :-) >> + synchronize_threads(); /* 5: counters */ } >> + >> +int main(int argc, char *argv[]) >> +{ >> + test_init(120, server_fn, client_fn); >> + return 0; >> +} >> >> -- >> 2.43.0 > Thanks, Dmitry