Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp779258pxb; Tue, 5 Apr 2022 23:00:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW+UhdTVoLCWJbtNB72hRoolvg79iiGE7HXEZGv8C13SOL5Ab80olYCcjNaVB6YsAfGzYy X-Received: by 2002:a05:6a00:b87:b0:4fa:a79a:72e7 with SMTP id g7-20020a056a000b8700b004faa79a72e7mr7215729pfj.68.1649224800882; Tue, 05 Apr 2022 23:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649224800; cv=none; d=google.com; s=arc-20160816; b=F7JpVXcD5lRkeDjdajERu6k4FKWMjIHfz1Z0TfZ6x270QQ1ld15X6FS1Rj2apWaT0A 8mkoKQ/kpCRXIPNgq+tekAx5IVyQ90orEm+z3/eBuzWPnp4E4iLSnV4C/PYouahO9Um1 N4GOScVdni9GdAibAATa5CztUr2fYM62MLELn9nGV4wP6Ctx3ZdTCk0shLlFzwC3Nb2s NxkN0+9n+l8faA0Nmcgc7cql4tJ+xKfOda2I4sKyNWSavM4o3QQlTkW6jedQX1YL56tv JykEXdSvlO5YMNTibrl9+ktQllXMJUaVrTxEatNLa0ShGNZFbG4yGFPPM+99e1RowSVQ n7IQ== 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=Ev4oIEEtmfV1x1DUEM/aI/7wuZ+pd1NPF1DVp7qzwNE=; b=gkxs9qzAAE9tglxuAk8PgvkiPhp2CD0L1oMPnN1ZUYbe1RSroZyB9+y2NZ66Gc2XVL pfiIVchuin8EfnhSZesZOqn7xSRxngwI9y6Y9Den4jlycO2LsvJ6g61Lbvdr0BKtI0Fe Q0mKJCGYfP/4R1Whe7WmtortAFF3LMd1WJbV7HskLB/0CR5s0F/hSyOCpN0zuEkor5Ju alg/5dN92QQX0q20Ebxv2L3Qt1vjXYa+CWy54ehv9TrL9ooU536NeQe+Bj+8AuoyJQgx jE54am3XMq6hsmI0uz8XwaqNZSRX8i3AabtJJ0SCJiktpUT5AFKN3clqas9iJ3sJHX13 lQnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1scPs9iz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q12-20020a170902f78c00b00153be606662si13824917pln.419.2022.04.05.23.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 23:00:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1scPs9iz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6AD182D565E; Tue, 5 Apr 2022 22:37:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1578895AbiDEXZV (ORCPT + 99 others); Tue, 5 Apr 2022 19:25:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349055AbiDEJtC (ORCPT ); Tue, 5 Apr 2022 05:49:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D5EA94E6; Tue, 5 Apr 2022 02:39:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 41C51615E5; Tue, 5 Apr 2022 09:39:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53CC4C385A2; Tue, 5 Apr 2022 09:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151561; bh=b9CmBkPoTzeTLTQ03P0MF8/xi7jAsA2piHfG702kMsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1scPs9izTJkIW6jFdO22FVoV2DrdK/dNVeL4ISpH4cxK2ziQ6V6BeH6dNHBYysx70 ujZ5Ws4SAPGQlOO+vTa7sxeT/VAqXp+uCVE4kNio2SF6l2lw4rulFTt0uPZQpQl19C i+EfYn6XLpfl0ZSvCv+0ilfWqczhmY3Pa51ZU5xI= 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.15 461/913] selftests: mptcp: add csum mib check for mptcp_connect Date: Tue, 5 Apr 2022 09:25:23 +0200 Message-Id: <20220405070353.667445310@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 559173a8e387..d75fa97609c1 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -445,6 +445,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} \ @@ -537,6 +539,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