From patchwork Tue Nov 26 20:38:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Aptel X-Patchwork-Id: 13886347 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2060.outbound.protection.outlook.com [40.107.237.60]) (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 4C5F88831 for ; Tue, 26 Nov 2024 20:39:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732653579; cv=fail; b=NDJyxB+WE6fK0goIHz3WeQHs4du0ZSxZXPWN4hvOfhhFeYlz1Cb/WdgFibIge5CPiHZ89eB1WINGbGtuSaIOKFnsDK9wGvfLu7n7MAWMtWb+g+x2ooFMZ3PhwusPsBdqETEWwN5wQm1TSLVvuVPFIP4TlegR1vq/8kLtPnaOBZM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732653579; c=relaxed/simple; bh=gHCcTM/t6ZN2gyS2olcrQN5cOX/MakN3jmv4TIK9KdM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=H9kmcqoFOryHULzT+/JtpL33PslXH2AwIatciCUWSFJTxkbuNK8G8e4QDXVg0zaxCbJScxanqRuHLR6oKDhCVHv2jXm3B9yWk8qVCF7+kL49oSOQX1e1yLFBPX4vCWEQKS2ketqmNuf1vxPPqAjfHtoIRxWi1IeE6Ezo5IWr5K8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=cfCsWTA2; arc=fail smtp.client-ip=40.107.237.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="cfCsWTA2" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ivk6w13h7Y7XI8Qh058/aX7R71+6UGIJ/DNFvTaq4h+CuuRur7S+Fl3vQ66swnEcpLCWP7beezO3dwgWhWm3FtaxbUix6Ba0yRp6dOGylf+LI5+H+fFsfWt2zohVpOtDQQNuX3lil1uFk/oyHRXtRxbRHUGawiornKKp9i5JH5TvZxoCuPIW7Iy/MgXocvPLFkoE89h1yzD4BjMQTgRDsaA7Iq8hdg/1higxKvbM2xlD7GruVVpjYl6mg5f8CMQomh9QvCaYrxxBT/E5XbXwQjcno/HGZ+l4ZLJe4ZfRxfrSs5jixqjCUbK2O/JDEeoFykOfnQJdqtlHx/xOouNW0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=u8kKWnfCJ9VW2smK9l8627N9zkaZ49KFZoR8iWBxeZA=; b=dR82ZkFzL/J/Z0F6EjcztzaBkSJ9eLKA9+z2TO9Ea2xVKTBbDBe9jqdVFEYyIsWHPONK1mGgGo3M37dhSk0Zebq5ICV7V0vznhuHAgjJE+VMSTkzldyohxaqsnLFZygIppUUmLqakAbzV4OOIIOAvO6jPwx7REMQqTjo4AtAKq4RBhi/KYiTsMgSiba8u7cTHfYvQMKaQ19SBV6fH5Tqd20M3TnZUODypmMxBk9EA+9uwuVhcyDeKUW2H+ybMsIEdZoLD6+hf/4YwwI7es6sfOiWCpVuW8jmhLAvKeWnw87vr9PKaCD3riY6sOpUau9eNUoxD2rVuFxLJkcHMimksA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u8kKWnfCJ9VW2smK9l8627N9zkaZ49KFZoR8iWBxeZA=; b=cfCsWTA2QVknvisK/4+3zA9iZ5toePdUfiOydYHFtTsE1s+X5uRKMLxEsELXavBa3UkXucaANQoij/4ptr4vN0pzvBgsxIu7uh+2pZ7nadPUxwg0WeqcojDrkoxeZCjDjuET/oOr5bZayI4yBgTwWQvge+g2H97JkTLAZeAdKYuX1NGXKJ6EwVRjlTIUxpgb72wMC/hzIg43eYrL0+YsPY1K78KCVRm/2Q+dcU/4ymHHVpe0163MS8OO/ZEcMk7yMxsBnHkdgM0/d0VNpfkdFwP2eJ8ylAvY1XWt8JzAwLXi+mudpN3hBGpguPFDNszfD/oulKDQGZvpDHSusRGLmg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from SJ2PR12MB8943.namprd12.prod.outlook.com (2603:10b6:a03:547::17) by SA3PR12MB7859.namprd12.prod.outlook.com (2603:10b6:806:305::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Tue, 26 Nov 2024 20:39:31 +0000 Received: from SJ2PR12MB8943.namprd12.prod.outlook.com ([fe80::7577:f32f:798c:87cc]) by SJ2PR12MB8943.namprd12.prod.outlook.com ([fe80::7577:f32f:798c:87cc%7]) with mapi id 15.20.8182.019; Tue, 26 Nov 2024 20:39:31 +0000 From: Aurelien Aptel To: aaptel@nvidia.com, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org Cc: Chaitanya Kulkarni , Daniel Wagner , Shai Malin , Shin'ichiro Kawasaki Subject: [PATCH blktests v4 2/5] common/nvme: add digest options to __nvme_connect_subsys() Date: Tue, 26 Nov 2024 22:38:53 +0200 Message-Id: <20241126203857.27210-3-aaptel@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241126203857.27210-1-aaptel@nvidia.com> References: <20241126203857.27210-1-aaptel@nvidia.com> X-ClientProxiedBy: FR4P281CA0067.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ce::18) To SJ2PR12MB8943.namprd12.prod.outlook.com (2603:10b6:a03:547::17) Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8943:EE_|SA3PR12MB7859:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ff2bff5-ee35-4747-744d-08dd0e5a6e4e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: A6N7UX55zRXuNUkO0NGk4l/A3V0i/KvRdDf4qW6zned0py38ZRQXuZDova917IwlGppjaY0ocQP2RZktT/GJHR10kSOwxcdyx7DafEhmcUwyhe81SOFhvLR5bEPiYP7IGMr08P23dW04lx1HbZw+Zl1GkwJ6Sq98MHoD13XjUZ4RYEKbYyJ/V1jI3oy8/5sBUcOqPHdy8C6u8VM/QK3QXTuthOGJWJKeR53zjSEzAloI/K1/XMC7M1WOS0O8WuGbZVaV/IDRdE76mSLe/wetGfC0CdDFmIDk3unpA3LfRprzQJflqfz6OEO460W8JY4vBuJ/QfowHqnwkNmJwez4d7UftRdV4kCcnUTLERTT9hXXyLkupFUsa4B26Gn9bX4jzWGfDacEj0wXdElXnzNIGFM3RxmsMQ2L/z3E2RJZosa1A+O7AR9XfZfFlF36HNsjoOr1Lp0m662e1sSNzf2sOke2+WFUSXTEgTKvexreq3IxzRAHWDHzpDGdgf5bzlvdWp069BPmf87sxuBTJkNxlTJEUAcFg+TPMzyB/P1Z2eoUT8HjntJvbba3XYs7C1ms2Qo1JZWM2FpRtZ9Kj4OAEFVc5C0vTDJJqYkRiE1IOC43KlgLiKbHaBv5CzJvGnnxB8xP1RV6uyX5eHPrEpiYmL7bJugsM4XAijshiMRoQFLCIDbTA8fUJPIwrOdN9V/Jc/NLFs0JqTv/QmoWwwrYAnh0QAL0qbyW35CBynxhIo/0F/BigH0OtJwser0SjeXA347/r57FWG5hxsp8eBN3mOqEIuuq5JZ9OZi82yZIvAnQRl7RLvV/ESAr3sYHMcccehIc3xa0IP1Em7B0YU4oevueBG+oCI9gr7giFoEU3smUzGJZnUGLw5d5fhDOv34TlZdN/E/ZNKcDVSMWcml04cP/qlVFw+mv2QKhm5mpMm1N2UpWbhEHlXIwgUO38fdWX87FFXxR892VKDMrFNApgKoClEGwnaGaQPUDweY1DuOd0fESy/6cvFPxdg8MDWeJtGomfum0enoFJwrpNKAjxNesNmFtjDP690/Uno5oxgxHiiXgfNLwglZekWvoRukq+gPBSzzeQuURs/8iVdNZVeyjpljkv5nTBaZK+STAvSGNmqa55aBeDhHDvVt8MyKLI3SJzwBWZeWC/2Sw7siYWXIf8GH0YXWmGXK1EherrIQrA2LOr2xsvpP/l8jY7nIx0y3MFRnzWObgJcqSytcntA/K2wHA/kWPPncelGPeeypjVaREbsCNNomT+0M965PN7Pg223L2nrO4jyghaVsqmRfVki8CglMEBe12TPr6aNd4HA7sJpvOnF4VdN6lJIBa0+PsJupvpVyqaf/Z0pzprg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR12MB8943.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS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RCuED8mSeYZN9fWEegPV3c/Y36Pw1TOhBQn9zIvZWpTp9asqXV10/m1f6a3go4nC8clVXN+zSINvtdKg8o+2hzVBiNk/gCMMWa7ozA6mov8tGDTqBnuIB8rzZb/Rixfgszdon9HnQnE2AVFRBiIsDGOdD8P8Z4e9pBSevDZtLhjgdff1qtMHtePYrwcEIs2BDem/zTiOzbjym+FyOCy7brLMzpdepIpH+AxotNmKLLykjLLW448MyL7W8vS05Vbw3KucFuOccoIo2/dIyHk/FcncW8GUSaTE4k2OFcNvH6awf/AW5lmR8JNYJItX+cS7s8ffeQ6pQ79WjzEfUKS0mHFkivdfwTwWgVND49dxRZzsvLvLQKPAxwSU6YrBYIGlVVQM11fzrZFCFUOdzii+IaDDfWxhbi2MxsaY4Zl5rhi8KHdY4bb3aybwhSbG6KQC7hV/pgBAEtCMBG98ZCyVzcT+Gh6g3V9Zg4XpwyBI0iVShRVUEbURnWmCxzJQyqmS/aQA8gWmCYT+1ze3s6WTSbCUvUCFOX1OkVRl5TrsDohG8YDZFteexmkbVPiAFoS4tDoJ X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ff2bff5-ee35-4747-744d-08dd0e5a6e4e X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8943.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 20:39:31.7883 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vVJ8jIe52NeJD1Ha2wG+jWEzH8Y0EnLrBdjXHZazvMF5uSgc6+PKdvPCADx6zIHZIifHewDjN7bMZ3+NfaN6bA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7859 This commit lets tests connect nvme subsystems with data and header digest. Signed-off-by: Aurelien Aptel Reviewed-by: Daniel Wagner --- common/nvme | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/common/nvme b/common/nvme index f99af5a..e5e5344 100644 --- a/common/nvme +++ b/common/nvme @@ -272,6 +272,8 @@ _nvme_connect_subsys() { local reconnect_delay="" local ctrl_loss_tmo="" local no_wait=false + local hdr_digest=false + local data_digest=false local port local i local -a ARGS @@ -330,6 +332,14 @@ _nvme_connect_subsys() { no_wait=true shift 1 ;; + --hdr-digest) + hdr_digest=true + shift 1 + ;; + --data-digest) + data_digest=true + shift 1 + ;; *) echo "WARNING: unknown argument: $1" shift @@ -381,6 +391,12 @@ _nvme_connect_subsys() { if [[ -n "${ctrl_loss_tmo}" ]]; then ARGS+=(--ctrl-loss-tmo="${ctrl_loss_tmo}") fi + if [[ ${hdr_digest} = true ]]; then + ARGS+=(--hdr-digest) + fi + if [[ ${data_digest} = true ]]; then + ARGS+=(--data-digest) + fi ARGS+=(-o json) connect=$(nvme connect "${ARGS[@]}" 2> /dev/null)