Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp685705pxb; Tue, 5 Apr 2022 18:44:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/OhbNF1hWDjBWtHlMBptpU+jCe/lbTjXFv58+7i/aQZno9lRBuWEy/9fgtILa5y0FXDN8 X-Received: by 2002:a05:6402:449:b0:41c:9096:44f7 with SMTP id p9-20020a056402044900b0041c909644f7mr6440894edw.43.1649209384177; Tue, 05 Apr 2022 18:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209384; cv=none; d=google.com; s=arc-20160816; b=o1qVzaKwWSeCCQWUNRXeHV4wcmL+m7KuqJJjhwxmE3el2tTY6iB9twEP4ZtUvDxuFI v4M45Rc5AuAp8IlBtTA5c3LcM6MzxY/To4fF0kMPJcwQDxa2I+FIMyfXpyOpYHcA7oFW l1jHRkfDWQz6RChbUYd38N4sncIFaYEA3Eij65SgI7vshCS4DEmQ78S1c8GYFrpH2Z3V A9/suLa1EzdPKaIDvkTZN1Kvq2jKtQNv+JzAwqa7i8SosXdmlbM0d4ews6KpMPsnMXVB Juoz0h1RIEY+SSsDC/83fxC7G4gs4rHWFg9bC0TScgO2JLZIZ22nV8cAxLsyBPRQMQ/q xqmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7pvT52uTTK6jzNymJc33fcyRYSovQq1qy/IBYrm1JBs=; b=hDPl21XVFILXIXy9MHJSscGYHMWcNYh7fyjW4nFVv3dd1WFJVTFl6/Gc1oxIbaEhS4 ovdQ87NYn28luah7/YTbPp06rL+SHR54kDnR2GRBCD4vJsScU04VGAyWy8jAiBuNWEzn WkRrlv+j+e6aqKoGrg56/PkvJ9zRyUsnEx9G9dbJJ8ji5IPdRzYAUTrUqtxCe0XG0gz5 4KCwV1Cgy1FIOcPuv3rQ62kFWiZz/r/VgqDyPyqzRZ1CZehTdSYn6SQDoCX3OYduR0r4 o9TjAq5TzWfWckXkKmN8IIV4DLUpqYagoBm3G4bFrnZZEhLqapJ3xH6MU2h/8+N+xwmY EfYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iNiySDHW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss4-20020a170907c00400b006e804fac620si3688440ejc.404.2022.04.05.18.42.34; Tue, 05 Apr 2022 18:43:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iNiySDHW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236945AbiDEJDs (ORCPT + 99 others); Tue, 5 Apr 2022 05:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237382AbiDEIR6 (ORCPT ); Tue, 5 Apr 2022 04:17:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE88CB53DC; Tue, 5 Apr 2022 01:06:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3B0C4B81B14; Tue, 5 Apr 2022 08:06:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 906DBC385A1; Tue, 5 Apr 2022 08:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145966; bh=U56hZjD4S/pEnKF2LuvYVCgeLMT6KTmLGPDAPE1EpZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iNiySDHWAnFNIzRUTPS1ZqZVREptSqIaBsLOSal6AQa12nDfiZeUHJm23ynaoJcXH X7DeAgB8rGSRuEs8lFqwH8bUNLykrBqp7PVsZt5NKshyy3vmBBEA8AE/dRoGForRq9 EBExSQ1HfCFp9TDYhl6QxZ0poWq/XVEHXQ2jUpJM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geliang Tang , Mat Martineau , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.17 0556/1126] selftests: mptcp: add csum mib check for mptcp_connect Date: Tue, 5 Apr 2022 09:21:43 +0200 Message-Id: <20220405070423.953672524@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geliang Tang [ Upstream commit 24720d7452df2dff2e539d9dff28904e25bb1c6d ] This patch added the data checksum error mib counters check for the script mptcp_connect.sh when the data checksum is enabled. In do_transfer(), got the mib counters twice, before and after running the mptcp_connect commands. The latter minus the former is the actual number of the data checksum mib counter. The output looks like this: ns1 MPTCP -> ns2 (dead:beef:1::2:10007) MPTCP (duration 86ms) [ OK ] ns1 MPTCP -> ns2 (10.0.2.1:10008 ) MPTCP (duration 66ms) [ FAIL ] server got 1 data checksum error[s] Fixes: 94d66ba1d8e48 ("selftests: mptcp: enable checksum in mptcp_connect.sh") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/255 Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- .../selftests/net/mptcp/mptcp_connect.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index f0f4ab96b8f3..621af6895f4d 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -432,6 +432,8 @@ do_transfer() local stat_ackrx_last_l=$(get_mib_counter "${listener_ns}" "MPTcpExtMPCapableACKRX") local stat_cookietx_last=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesSent") local stat_cookierx_last=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesRecv") + local stat_csum_err_s=$(get_mib_counter "${listener_ns}" "MPTcpExtDataCsumErr") + local stat_csum_err_c=$(get_mib_counter "${connector_ns}" "MPTcpExtDataCsumErr") timeout ${timeout_test} \ ip netns exec ${listener_ns} \ @@ -524,6 +526,23 @@ do_transfer() fi fi + if $checksum; then + local csum_err_s=$(get_mib_counter "${listener_ns}" "MPTcpExtDataCsumErr") + local csum_err_c=$(get_mib_counter "${connector_ns}" "MPTcpExtDataCsumErr") + + local csum_err_s_nr=$((csum_err_s - stat_csum_err_s)) + if [ $csum_err_s_nr -gt 0 ]; then + printf "[ FAIL ]\nserver got $csum_err_s_nr data checksum error[s]" + rets=1 + fi + + local csum_err_c_nr=$((csum_err_c - stat_csum_err_c)) + if [ $csum_err_c_nr -gt 0 ]; then + printf "[ FAIL ]\nclient got $csum_err_c_nr data checksum error[s]" + retc=1 + fi + fi + if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then printf "[ OK ]" fi -- 2.34.1