From patchwork Thu Jan 18 02:51:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 13522321 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 C1729567E for ; Thu, 18 Jan 2024 02:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705546309; cv=none; b=DXgjN9bdfGdRjcKBBljoc7hiXyAL1TnR1gpnV/PyCuWQTtazRhWR0PAecLVp4zZGhuGRPDke/pTDi/Ja2D4YXsXX55IiauyZmEf1CO5ImgJJbSvqXYODy4qN8mAIA0Xdk6dZAreNj6p16ahUGX3La0fqAmIQSi+u2Vb5DgjsZeM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705546309; c=relaxed/simple; bh=HHNvB7NqaX4iGz7NhjxGduwMzlm/JxAKon+6MvQQ7tQ=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:X-Mailer:X-Developer-Signature: X-Developer-Key:Content-Transfer-Encoding; b=QUVtbI0234eNbaHnd9Iio3tLLbZDYeS9sb1bHzL2aP8HZ2qhfC28wKjsVh7ab0j5ZsJvhZ+ad0xjYnBPaCoX7bwaAInZ5G922UJfON1ms3MS1Y2su6uyw+Rkw8VEDRduGjfzlQ02En9yExCam3vSwCsZZL9w7usYElePtlyKyds= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=arista.com; spf=pass smtp.mailfrom=arista.com; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b=ib315mbV; arc=none smtp.client-ip=209.85.128.46 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b="ib315mbV" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-40e490c2115so1487025e9.0 for ; Wed, 17 Jan 2024 18:51:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; t=1705546305; x=1706151105; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zhoYD3VTX6Mw3R+QWgSNnaN7EGj7heKEidij6gCGH3I=; b=ib315mbVRv3Bunh0vpyiLCp2/A25bKOgoyaSZhTqUF6S0i6rY8BPMGccT2/EhgBCjJ TGlTGea+4/1I4bJuQeq2+NR0F95swbCfDeW6EvAUvy7SRcPRlUd4mzxpNXN304ccjuHk umLKark19Czyyt4ctwq2Kt3I6R+Fe58t8RJIyZPRpTCow7PHzt+4g3NVkHKxcMFgPNId zBN4iXQqVTMZSruaQakT6P24zXxAqOlunna+yFtNf087gMSca7GDN9pw1glPy9KOOrWN wg39fnJzz3adMwncb0S1Mr7Q7b5xdIb/M9zcZLLciugWJJwfdsJ+GlaszVCu3qoLcrOv 4BjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705546305; x=1706151105; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zhoYD3VTX6Mw3R+QWgSNnaN7EGj7heKEidij6gCGH3I=; b=Ovvy9n8d0K29JfOgkiAd7IEQldP6HKN/L/PULp8DomneNu4pA5dP/uFbXmJ20zuy4O Az6u++ZRPtz+UcAmV2ry8Aj532Rr0Gu2dZmuvo4zEYe1rks95VNPsoYqeXTedAWUGLKB uLWz48TwaWaJvqcUqfaYXa2CtezpjDeT0cj6tU2juby5bWKuNIK9E8+HPLO78xx2+KGD BK06flUqwbPoFaN5rUdNSEuO2UzVAKCl31pbC3ktkqDC7oU6EFt6Olm7vgsM9zc1+23K 7JWK9YvzBxYnyr+RclXW211xlG2RY6by1zY1fbE/phtAdgqNYInvOKPtH5r1O+TetQoB Ky7g== X-Gm-Message-State: AOJu0Yx7QJBlMhZEJOfdmG7oD0QDvR7zAowZqIqWcMU4aZOwTYLjzcgU pOeFXY4pJqaqJ8QfGhi2bTYmVqxQO2TXcFpzfXxgihAIsrce8wUY6BE6aYnu2Q== X-Google-Smtp-Source: AGHT+IEarBwiy9S11+P1dfRevomL/EXd2tiBkN8AThfBc9EBa9ZMEtemzQOwx5lFVlSszCObFRDvsQ== X-Received: by 2002:a05:600c:1c98:b0:40e:47d7:45fe with SMTP id k24-20020a05600c1c9800b0040e47d745femr1066290wms.12.1705546305046; Wed, 17 Jan 2024 18:51:45 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id z15-20020a5d440f000000b0033664ffaf5dsm2868219wrq.37.2024.01.17.18.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 18:51:44 -0800 (PST) From: Dmitry Safonov To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com> Cc: Dmitry Safonov , Mohammad Nassiri , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] selftests/net: Argument value mismatch when calling verify_counters() Date: Thu, 18 Jan 2024 02:51:34 +0000 Message-ID: <20240118-tcp-ao-test-key-mgmt-v1-1-3583ca147113@arista.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147113@arista.com> References: <20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147113@arista.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.13-dev-b6b4b X-Developer-Signature: v=1; a=ed25519-sha256; t=1705546294; l=1291; i=dima@arista.com; s=20231212; h=from:subject:message-id; bh=kVnh27dlnNFLZT4j7XCBS7k2UYRkwKA/47jZVeTJqxM=; b=DvIQceG0/yFC+BI053HeWIerRGCMYN+ne8Heal2yoDlufaZ4By8K3WCQrn12pdLnYBQWgmadn ktHF1H3C665BcIpL2kiiQ7Nf1k53nYH27ZIaIz1rxnkRePR3/c12/TT X-Developer-Key: i=dima@arista.com; a=ed25519; pk=hXINUhX25b0D/zWBKvd6zkvH7W2rcwh/CH6cjEa3OTk= X-Patchwork-Delegate: kuba@kernel.org From: Mohammad Nassiri The end_server() function only operates in the server thread and always takes an accept socket instead of a listen socket as its input argument. To align with this, invert the boolean values used when calling verify_counters() within the end_server() function. Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Mohammad Nassiri Link: https://lore.kernel.org/all/934627c5-eebb-4626-be23-cfb134c01d1a@arista.com/ [amended 'Fixes' tag and carried-over to lkml] Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/key-management.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/tcp_ao/key-management.c b/tools/testing/selftests/net/tcp_ao/key-management.c index c48b4970ca17..f6a9395e3cd7 100644 --- a/tools/testing/selftests/net/tcp_ao/key-management.c +++ b/tools/testing/selftests/net/tcp_ao/key-management.c @@ -843,7 +843,7 @@ static void end_server(const char *tst_name, int sk, synchronize_threads(); /* 4: verified => closed */ close(sk); - verify_counters(tst_name, true, false, begin, &end); + verify_counters(tst_name, false, true, begin, &end); synchronize_threads(); /* 5: counters */ } From patchwork Thu Jan 18 02:51:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 13522322 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 06F2C79C4 for ; Thu, 18 Jan 2024 02:51:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705546311; cv=none; b=tT2f7NNZa/c5nAyADxKZnQsPJLkhos9nKlVD1WeUL5yKDbMSS8XciaOmKt79QbRhDy8O12yTKL9noIWssietUQ+1rT7+43pLPivK4/Vvt18/qLoMXpT2aohzMs+zdIl0RmJRLcgxOtDCzzdaaf3dnC4+aMwto0eQEdBn2oDHS8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705546311; c=relaxed/simple; bh=QZKaym8nFiRV9Re87RifRE/NGc2FIS+/ruqdmA8E/9Y=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:X-Mailer:X-Developer-Signature: X-Developer-Key:Content-Transfer-Encoding; b=QJmksntyHEKnG4ZLELaQHwMaYyER7Vh7J4lb5MMArEks/a8hq+tasfZs0mlvybTdCTkOgJe/HlrRwL/PmfqObk+mXUDjyUlw1XVKKtoKfc8j2h6fhGuzxyV8Fr95oWQRBHgjf4H5IVpLOrjDMKSNnjqk59Th/WQaV0Rs/0uINZw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=arista.com; spf=pass smtp.mailfrom=arista.com; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b=RnaUryu9; arc=none smtp.client-ip=209.85.221.53 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b="RnaUryu9" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-33678156e27so10079602f8f.1 for ; Wed, 17 Jan 2024 18:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; t=1705546307; x=1706151107; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QfduzUl6xeBtvtYJDyMTI1tDFj6QysY3Ss5eP9VLuq4=; b=RnaUryu9WJX+yexQ0bSf7o1a5cJbb3V+Ka1nrWiWSGu9to5m9tqaxoajm4yi/Hayzg uEKUUtd/WEOB3AyKTn6JL43sj6UY9yOgw6CGI6beTQPSMCIEZ0Kb+Tnn+DC4W1VYNxpg ULjYwcdo89pKQCzyxvtbv3dkV0/DgH6O684v/qNIc3swsqYe4gbaOiwfGKX5ITxmuY2V eJyKUjpRvP12EOXvzeABWNViAmFUHVFS9ETpq7SEQELuOlCznwHysZZ9IKWufhjuoEgp ippkf5jn4tITxqcFer/RRUvThMWHq4PzuyeUXFFN6VubjXtk2chJf0GaP0CV0UnMPstW mOdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705546307; x=1706151107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QfduzUl6xeBtvtYJDyMTI1tDFj6QysY3Ss5eP9VLuq4=; b=GA22NofpJpm/T9XwQCqlVJThTc4HQ2yU+APo570vptr+1DAMU7hpJQi3ZNVDiyx0RN yjD0kACDyQWEvNDnjwy+v2Fppmz1fvoPaCmL6V8XFU4RsVHCLmvFsCKTEV2KcVCVYx1P B4XutZ0tHonsY1pz7S1eV8p04QeaakDOfvWQsAQpnT+tEk/tqOd9hQcmMepPRc9I7qCL tTLCdjOxAHsb8Z0GP7yoew2heBYPfY327B8+H+UjXd0rhyhtUiHDz4ajUhwXV+8AwZv/ bXreH8mPCRVrBXZ2FXEAoOU50SesbXz0OABNMgBwxcfhBlEE185aDvwSuhhU3Ac8SPPr 8BLA== X-Gm-Message-State: AOJu0YwrFsQ/gY7URsh2SovONUOxRGG17S1jiO82pUJD0geJ6Zu1B4P4 kB3TPMge/NxvMnbXWQejQjXktSnfk0E5rerird3yhv98tFLdy/KUrZAfm6mjxg== X-Google-Smtp-Source: AGHT+IGm/R0MFqUoxs0sZnObB5pC5VwXCcB30vH4BNIs+FZOGPs6Y6wipK+yotRTeskn8mg4aUbhtA== X-Received: by 2002:adf:cd85:0:b0:337:be02:b9a4 with SMTP id q5-20020adfcd85000000b00337be02b9a4mr74557wrj.106.1705546307343; Wed, 17 Jan 2024 18:51:47 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id z15-20020a5d440f000000b0033664ffaf5dsm2868219wrq.37.2024.01.17.18.51.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 18:51:46 -0800 (PST) From: Dmitry Safonov To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com> Cc: Dmitry Safonov , Mohammad Nassiri , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] selftests/net: Rectify key counters checks Date: Thu, 18 Jan 2024 02:51:35 +0000 Message-ID: <20240118-tcp-ao-test-key-mgmt-v1-2-3583ca147113@arista.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147113@arista.com> References: <20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147113@arista.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.13-dev-b6b4b X-Developer-Signature: v=1; a=ed25519-sha256; t=1705546294; l=5702; i=dima@arista.com; s=20231212; h=from:subject:message-id; bh=QZKaym8nFiRV9Re87RifRE/NGc2FIS+/ruqdmA8E/9Y=; b=/L7fiuJ8pvO/Z7wlLHp2COBc8azS99uMQ8onBu9cjtNPemIMx1K/wiGBQ+XXKz4wm4HJrkVUg gzvxJJ/nJ8kDBcItyklbYDH+MU/L4UN18UKMbWpKDv8q2AcgKvJwmOo X-Developer-Key: i=dima@arista.com; a=ed25519; pk=hXINUhX25b0D/zWBKvd6zkvH7W2rcwh/CH6cjEa3OTk= X-Patchwork-Delegate: kuba@kernel.org As the names of (struct test_key) members didn't reflect whether the key was used for TX or RX, the verification for the counters was done incorrectly for asymmetrical selftests. Rename these with _tx appendix and fix checks in verify_counters(). While at it, as the checks are now correct, introduce skip_counters_checks, which is intended for tests where it's expected that a key that was set with setsockopt(sk, IPPROTO_TCP, TCP_AO_INFO, ...) might had no chance of getting used on the wire. Fixes the following failures, exposed by the previous commit: > not ok 51 server: Check current != rnext keys set before connect(): Counter pkt_good was expected to increase 0 => 0 for key 132:5 > not ok 52 server: Check current != rnext keys set before connect(): Counter pkt_good was not expected to increase 0 => 21 for key 137:10 > > not ok 63 server: Check current flapping back on peer's RnextKey request: Counter pkt_good was expected to increase 0 => 0 for key 132:5 > not ok 64 server: Check current flapping back on peer's RnextKey request: Counter pkt_good was not expected to increase 0 => 40 for key 137:10 Cc: Mohammad Nassiri Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Dmitry Safonov --- .../testing/selftests/net/tcp_ao/key-management.c | 44 ++++++++++++---------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/tools/testing/selftests/net/tcp_ao/key-management.c b/tools/testing/selftests/net/tcp_ao/key-management.c index f6a9395e3cd7..24e62120b792 100644 --- a/tools/testing/selftests/net/tcp_ao/key-management.c +++ b/tools/testing/selftests/net/tcp_ao/key-management.c @@ -417,9 +417,9 @@ struct test_key { matches_vrf : 1, is_current : 1, is_rnext : 1, - used_on_handshake : 1, - used_after_accept : 1, - used_on_client : 1; + used_on_server_tx : 1, + used_on_client_tx : 1, + skip_counters_checks : 1; }; struct key_collection { @@ -609,16 +609,14 @@ static int key_collection_socket(bool server, unsigned int port) addr = &this_ip_dest; sndid = key->client_keyid; rcvid = key->server_keyid; - set_current = key->is_current; - set_rnext = key->is_rnext; + key->used_on_client_tx = set_current = key->is_current; + key->used_on_server_tx = set_rnext = key->is_rnext; } if (test_add_key_cr(sk, key->password, key->len, *addr, vrf, sndid, rcvid, key->maclen, key->alg, set_current, set_rnext)) test_key_error("setsockopt(TCP_AO_ADD_KEY)", key); - if (set_current || set_rnext) - key->used_on_handshake = 1; #ifdef DEBUG test_print("%s [%u/%u] key: { %s, %u:%u, %u, %u:%u:%u:%u (%u)}", server ? "server" : "client", i, collection.nr_keys, @@ -640,22 +638,22 @@ static void verify_counters(const char *tst_name, bool is_listen_sk, bool server for (i = 0; i < collection.nr_keys; i++) { struct test_key *key = &collection.keys[i]; uint8_t sndid, rcvid; - bool was_used; + bool rx_cnt_expected; + if (key->skip_counters_checks) + continue; if (server) { sndid = key->server_keyid; rcvid = key->client_keyid; - if (is_listen_sk) - was_used = key->used_on_handshake; - else - was_used = key->used_after_accept; + rx_cnt_expected = key->used_on_client_tx; } else { sndid = key->client_keyid; rcvid = key->server_keyid; - was_used = key->used_on_client; + rx_cnt_expected = key->used_on_server_tx; } - test_tcp_ao_key_counters_cmp(tst_name, a, b, was_used, + test_tcp_ao_key_counters_cmp(tst_name, a, b, + rx_cnt_expected ? TEST_CNT_KEY_GOOD : 0, sndid, rcvid); } test_tcp_ao_counters_free(a); @@ -916,9 +914,8 @@ static int run_client(const char *tst_name, unsigned int port, current_index = nr_keys - 1; if (rnext_index < 0) rnext_index = nr_keys - 1; - collection.keys[current_index].used_on_handshake = 1; - collection.keys[rnext_index].used_after_accept = 1; - collection.keys[rnext_index].used_on_client = 1; + collection.keys[current_index].used_on_client_tx = 1; + collection.keys[rnext_index].used_on_server_tx = 1; synchronize_threads(); /* 3: accepted => send data */ if (test_client_verify(sk, msg_sz, msg_nr, TEST_TIMEOUT_SEC)) { @@ -1059,7 +1056,16 @@ static void check_current_back(const char *tst_name, unsigned int port, test_error("Can't change the current key"); if (test_client_verify(sk, msg_len, nr_packets, TEST_TIMEOUT_SEC)) test_fail("verify failed"); - collection.keys[rotate_to_index].used_after_accept = 1; + /* There is a race here: between setting the current_key with + * setsockopt(TCP_AO_INFO) and starting to send some data - there + * might have been a segment received with the desired + * RNext_key set. In turn that would mean that the first outgoing + * segment will have the desired current_key (flipped back). + * Which is what the user/test wants. As it's racy, skip checking + * the counters, yet check what are the resulting current/rnext + * keys on both sides. + */ + collection.keys[rotate_to_index].skip_counters_checks = 1; end_client(tst_name, sk, nr_keys, current_index, rnext_index, &tmp); } @@ -1089,7 +1095,7 @@ static void roll_over_keys(const char *tst_name, unsigned int port, } verify_current_rnext(tst_name, sk, -1, collection.keys[i].server_keyid); - collection.keys[i].used_on_client = 1; + collection.keys[i].used_on_server_tx = 1; synchronize_threads(); /* verify current/rnext */ } end_client(tst_name, sk, nr_keys, current_index, rnext_index, &tmp); From patchwork Thu Jan 18 02:51:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 13522323 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 C38A59475 for ; Thu, 18 Jan 2024 02:51:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705546312; cv=none; b=r/Y5nKQXcOp9AdW3oQt9J9vI83ov5RUGBAiCocIZjyjYz/m0Uch8wBa3sUUZSoos3t0gpvg9+mX4oHL1Uo6YuaSlYGVRnDcdK6HauZ9nmJe0782BfD7m1YyKtMI2V/56Plkl0weMR/BtQxikImBPXRZ+D+mBRjs9kHK09t6sjKk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705546312; c=relaxed/simple; bh=qeZ3tY/o44baRhR6QAmQ3u7Ui4fQMK8qYGmLuQSHVR4=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:X-Mailer:X-Developer-Signature: X-Developer-Key:Content-Transfer-Encoding; b=pLzXNz1dCWvvp6YYZSJK05sIjg0R5YIoAcii6tCGJtJ1N+/Y399jR89W8H5dAS8PDw3j950Vz6+t44KIcofzUlLu4UcWh1knrJ55fwi5W8py8BkOHSD1pdVpWwHQ2z+ow7y6mChwZcrb4VcQCyVJeqTtSdP7u8sDO/8zuGMDcGQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=arista.com; spf=pass smtp.mailfrom=arista.com; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b=GCy8msPQ; arc=none smtp.client-ip=209.85.128.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b="GCy8msPQ" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-40e800461baso30835075e9.3 for ; Wed, 17 Jan 2024 18:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; t=1705546309; x=1706151109; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3o3JIW0lMFFX9linU1Dr7QEV8ZT+tiEVZq+1/7eCMH8=; b=GCy8msPQX4RwUoFlDWaO2h4HYSplkrqpQIvPaS5AgnuN38X+8ggV3Fl9JapMsW0ALt 4iNNlnkLpubt9kwLMmMM9Qwpx8NDO0cgNYhO44zv5ovoyxpK2OarrJbej3cPfSZA6kUd 1T/4/zexLh8ySXUtCSHxUK4M6hhj2AY5FbFJ6+Efn4mOi1Izg7veck6QecMLTBnDFPx6 8/mKFiHwXE+sG6jPEEWV5ziQkzmDMUtGIUEdQqVYSAJeP444PkhYWpe1E4Z/pxkt8/GN vQbs/bEb6kcWXylE/QYeaoGhKX9S3xuFloH8hWpFS0l8E+183q7FW40eAq73PGLjr2ZW CKyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705546309; x=1706151109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3o3JIW0lMFFX9linU1Dr7QEV8ZT+tiEVZq+1/7eCMH8=; b=ZkY86N1YFa/HgkVftlVVQ2dFYbXX1hPRJUDoylm3A49kg62KJI9hxZDR2/V/3milW3 cUjTXcpQFh4rQE/6mzKBkYb6QcTrnvT1VVQw9v/i9MPqUslXeM08bbnRAZlH3SFiujl0 SZ+q4xmGRAn0ucoXU3UqljKaxJ4rua0DuVSFtGjIbycy28bWwRr1UWc52KaR5wkWh97W LrJUYkETHYTDdvK1Jj9vglt/7qo0wA7XHm0Bkogw7OlLaiSHezKJNP5gndCGcuzHQU5A BI3lEAtTYHhPVSKCUIQejWChU4G/DSS49+zEo8tMbefblhp9iRiQvztNjSuFlWWxjoSQ qbyQ== X-Gm-Message-State: AOJu0YxSKmpy3YsHKaKMZS3DMljrlvip8LLxa9eLo/B2xBm9dfhfnYDo QYZIPMnyhZXo7E677HcV61MWXtitXZcFaZNtOpwvjf2R+uyc3fDnQnMN24nxCA== X-Google-Smtp-Source: AGHT+IGTP8bDonVO2FTMnOfmYmhTkXA7oZIjIWi56IdHYCM3+hcb2Gwh7mTQIsxRTHcK1mpkziqCEQ== X-Received: by 2002:a1c:4b14:0:b0:40e:47bf:f332 with SMTP id y20-20020a1c4b14000000b0040e47bff332mr41977wma.97.1705546309242; Wed, 17 Jan 2024 18:51:49 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id z15-20020a5d440f000000b0033664ffaf5dsm2868219wrq.37.2024.01.17.18.51.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 18:51:48 -0800 (PST) From: Dmitry Safonov To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com> Cc: Dmitry Safonov , Mohammad Nassiri , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] selftests/net: Clean-up double assignment Date: Thu, 18 Jan 2024 02:51:36 +0000 Message-ID: <20240118-tcp-ao-test-key-mgmt-v1-3-3583ca147113@arista.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147113@arista.com> References: <20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147113@arista.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.13-dev-b6b4b X-Developer-Signature: v=1; a=ed25519-sha256; t=1705546294; l=958; i=dima@arista.com; s=20231212; h=from:subject:message-id; bh=qeZ3tY/o44baRhR6QAmQ3u7Ui4fQMK8qYGmLuQSHVR4=; b=nB5WMfppjsBWtpYlDmqyc73zjVS9nEfgidteoRQ0/Rfb/dLrknlixH1oNA964bflYfHGG2n2a /PKkERTk0U/BI8T0dEMYZie22fblu4GxYKvI1gJlXBlW4Qmnysso9RP X-Developer-Key: i=dima@arista.com; a=ed25519; pk=hXINUhX25b0D/zWBKvd6zkvH7W2rcwh/CH6cjEa3OTk= X-Patchwork-Delegate: kuba@kernel.org Yeah, copy'n'paste typo. Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Reported-by: Nassiri, Mohammad Closes: https://lore.kernel.org/all/DM6PR04MB4202BC58A9FD5BDD24A16E8EC56F2@DM6PR04MB4202.namprd04.prod.outlook.com/ Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/lib/sock.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/net/tcp_ao/lib/sock.c b/tools/testing/selftests/net/tcp_ao/lib/sock.c index c75d82885a2e..923a9bb4f1ca 100644 --- a/tools/testing/selftests/net/tcp_ao/lib/sock.c +++ b/tools/testing/selftests/net/tcp_ao/lib/sock.c @@ -377,7 +377,6 @@ int test_get_tcp_ao_counters(int sk, struct tcp_ao_counters *out) key_dump[0].nkeys = nr_keys; key_dump[0].get_all = 1; - key_dump[0].get_all = 1; err = getsockopt(sk, IPPROTO_TCP, TCP_AO_GET_KEYS, key_dump, &key_dump_sz); if (err) {