Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3412529rdh; Thu, 28 Sep 2023 10:47:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyieox0LCxTk1gxzqJmOzLEXxfD79OF3UYRXOs7tzP7QKbVyTKozexNVSpvMoc5JrI6J1m X-Received: by 2002:a05:6a20:12cb:b0:157:d7cd:ebd with SMTP id v11-20020a056a2012cb00b00157d7cd0ebdmr2110390pzg.1.1695923268923; Thu, 28 Sep 2023 10:47:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695923268; cv=pass; d=google.com; s=arc-20160816; b=O+G8nm71IUIAw6Q9DckaXbcAdlGZ829WTk/Gp/acJ1X9zygWAcobs6dM2AvuAu0YnW PrPQkXdJeTfQHiseXr+Xb1zrNWHXL6DK51eSgUksjH8nmHnx8pjRtsJnguFOrMlvUR/C QbdkkITfZCCRA0tdE51KP4CfU7OA+SrAPyQldQ4pfOcVYGBnKH/olN2Pi1LInTp1w7u4 8AXyOL9gvVdyhn+Pa2c5Q8UB+JX+uzUiu/b1feiDiUxiv1SaAehdBlLzry3d8M5dynCz h/0LdRILm22C0MgY6uvRv+7CS2ta8XIuhnx9tpRZ643a1mzBS7MiKn5KRMrqgFXCfHCl bLlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QKYf26JiSxy6Jy5mplrNxdemiKwkr6mb96uYAT2xFb0=; fh=gOZmdXQWWYi2KI/CDlaL8bHElbVrtxjT8kPXxzTdvp8=; b=tR6Nbqp9Z1EVCT14QlC9Uf4TBBo5WGpHTE8mJmslnEstm4Dsc9t4Qs9EPJfKvARLzW t+ybsW3cienf8uS0sT0gubeQTNZs45dm85HeB/GhHoEa80cLqIee/HQguMwVTy8cNTjx t3gWywdhzndnoX/m8bfgU8jMKs+nR/e1EBAb9kRrHl9UHfImJhKCpsptWI3l/glcLaf2 DxVon8NEYKeYtOEhqdKRMtMu3GPiW/SWcWdXpiXtQJtlhgRCrvXxRtjuEdWByz7G++Ca G18vPrly9vXzn1cVzsEuD34MBIHhWLdCszXgk72ypb0r8DVQi48GczqzoPYk2XlSFdMg 8rPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=BW4r89hz; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bw21-20020a056a00409500b0068a49a550b9si19006366pfb.139.2023.09.28.10.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 10:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=BW4r89hz; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C4B8081D4764; Thu, 28 Sep 2023 07:28:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232178AbjI1O2v (ORCPT + 99 others); Thu, 28 Sep 2023 10:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231480AbjI1O2u (ORCPT ); Thu, 28 Sep 2023 10:28:50 -0400 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2061.outbound.protection.outlook.com [40.107.247.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90C0319E for ; Thu, 28 Sep 2023 07:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TniCbWxDc3msJ3uwYyDkAeFP7HS+fDRuNp49exQ7hD0yaAnz0cd/whlwxxunmirkxVKdzfkSpdhELC05zPVXWQOfvNNYyO7bXb0TEF4GqIxfe/KDtms96IjtKNn3i98jcMdF2EIqUB6skMJlGeqEaWPwqNXMf+DeGoqgMB9s+I5K1GYhe68ztv5XR0k2ES2mKdQ2hLLYhOMUFJHZoN6ukELxUw6F3Qic0KwgHcKf2sPkrMh2jgKjnWX39LcWs1YTUii9jdsigF+xRuYqurU/E9Lq+RYhhc6rv+8C7nf6zgbVcPD3CDpm6J8npJldTDHLTefTo+BCSG60vOL4NOyqvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=QKYf26JiSxy6Jy5mplrNxdemiKwkr6mb96uYAT2xFb0=; b=AuIJ5FRa0lJP2DBi+phRQJRylokDRhrf5d4TI3BCc90FstRtBeNuYbDTxQq3eN8FaROjcDrQQhMSrHhb5MoP9sU89dH1FgWUnmkZHSwd8+8UAA/2DLhsudOCeEAHvtHaBGiTR9FTlA5iG64ANln8+SqI/eamzCA4+dj/cdnS353mOHZ3YnAKxrnZtGkgkKM+yc9bNfzRM7fW9Gb+0SyRNMTJajnn8eB3XIYa7HJ4iaUA6oGsmT+vJvUmxMw0OLtmjvD9COwVo3nqzr1i5PU3YJ/GKvp9zwTx2vdEXFU1suIX01M5SeaDI3mFfd0lAMHGlrSKd4jGckNlNBK5oSmlOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QKYf26JiSxy6Jy5mplrNxdemiKwkr6mb96uYAT2xFb0=; b=BW4r89hzHLDiDVpJK73picNIgEa2UWgyMq7dZMQQpwDlBHfnwaH8F6yA1QqrbzWSwqyUYbi9zkl6IJl9WRbyuK9YgCENiBqVaMqqrteHD4Desdp+ZPkWj/mDWowM6xuhPI2cyK5sEM3cl3x/A8ttC14A76FHAt+2UY78NH1Iao0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by AM9PR04MB7619.eurprd04.prod.outlook.com (2603:10a6:20b:284::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.25; Thu, 28 Sep 2023 14:28:46 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7763:779b:1a89:47da]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7763:779b:1a89:47da%3]) with mapi id 15.20.6813.027; Thu, 28 Sep 2023 14:28:46 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 1/1] iso-tester: Test bcast receiver with PA sync, no BIS Date: Thu, 28 Sep 2023 17:28:32 +0300 Message-Id: <20230928142832.3174-2-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230928142832.3174-1-iulia.tanasescu@nxp.com> References: <20230928142832.3174-1-iulia.tanasescu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR06CA0196.eurprd06.prod.outlook.com (2603:10a6:802:2c::17) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|AM9PR04MB7619:EE_ X-MS-Office365-Filtering-Correlation-Id: 94b21cca-6bf8-4e85-ddea-08dbc02f395a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HPxMhbmtk7BWxDIMBq1UrBTfe27QSxcIoLo3mS3F8gXY0jE9cD/yOM9BEyW4BsmOG9gP3jcNiFAIqAp95Hr8W4Jsm0b/kMTI4rvlDJ6po2c3LzFMcQYm8ID5v7/oXyFVfutCHP/FiyGnT6c/H618mFJx6uJbNIjyqCwvPX2XyJxGnkcPRjlmpelYTV87PKb7D+02HXc1UOb+d8fY29Y3b7HfE8qm/2kkWeaq78TiUyVPXQFEQ1d/U7yDSO82Aj7NBKyqKqWW7mJvS+5BRMoD8yxyrM+qAO7EYfAIStNm1ZFOrCPeV8A1LzneQDgSpv9iQEEMoHl2B/BYBzXhwlUcxxxYpavohJcD1RQprdVFncy+koj9aZ1sOWtchad1DP71a93RwVW7dMbj0qjP2Vh8AlymhZaIFUro5SdtEo9JDaroSc92BM8c0eS+CqGtmocrUlcJJ4nwLpQ3mKlHWRwX+ZCBSTMveqmk/GcAwqUilMX3JONO29CdMV3ajdeJhBcehtVCvmyLcT0qxx0DKtstez8LosAgWBI/dw1boBcDVd/o+jTGlnm70T2i7edVym+l X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8898.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(366004)(376002)(396003)(39860400002)(136003)(230922051799003)(186009)(64100799003)(451199024)(1800799009)(38100700002)(6666004)(478600001)(6512007)(6486002)(6506007)(86362001)(26005)(5660300002)(66556008)(8676002)(36756003)(66476007)(8936002)(44832011)(66946007)(41300700001)(4326008)(316002)(6916009)(2906002)(83380400001)(1076003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?h+cmW1k8OLxBkjdRRAa6RwoQsiyH+Ym5TmBs2Cof8w7+x6EJ5NFTXWYJSh7Y?= =?us-ascii?Q?rzoRB952aZx5kkNZ2eXkKpCw6oQ4JhcrApvHeQF9j/MM1cSWqCd8fLs051N1?= =?us-ascii?Q?I/nr+y1lqcVmiOXj6Ew2iBVZ+87gdPuwsnZYZsBMo86UsiAaGa6MhV0/bCpI?= =?us-ascii?Q?JR9dYj38Pxb1fLy5U+K/H28hsRXSqLnRNqAFUivZTYfMPdbPXWp1ks/O2WpJ?= =?us-ascii?Q?4+Zfc++3WOMj0XXC5+jMuFn6WDDwIgMwRu9l0RxcBIi3baz9LHtDpItPS6fl?= =?us-ascii?Q?5q1Dpk7OQDJTp583uIoDJK6FcTeyUSyzyTF+sCZCWK4HwLJb1k+hkgdQvfxx?= =?us-ascii?Q?cmsUpH7UE4n0/D0/3CHxvH8m8If9s9fRbJAIPPm9L6rfJ/izjnIN4DbWwq7V?= =?us-ascii?Q?5Bx9kLTjdxK99WPkNlJTf1jTvqsGNw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BVNYYAFi/QCnUHJK5g7hs/rxHcViTT8ku7evKOtVWnZOfDLGmrb6LUXf?= =?us-ascii?Q?dmgt6fVSxTqrQOr6t+QrLpCMkiYIB1Bed7cJtkv+aRQ5rGCIMsdnq+Iw6y23?= =?us-ascii?Q?H2PW/g8qWG6AjJmszWhxPHVz0EPGj5Kq4gReRmJfnDeDDXniH81nzrHibvRF?= =?us-ascii?Q?9jcWClH7+2KhEYJrxXW8flqVuFbQO2nG3vz/W0MXw/ZIHTZdxTYOelxE+Wrt?= =?us-ascii?Q?VQGcj9Z/aq+bvsc7xN7+m1hd5kjvjL4lBJ7bKN2ObF6jmI7XO/4u/VF7o8ss?= =?us-ascii?Q?0A=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94b21cca-6bf8-4e85-ddea-08dbc02f395a X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2023 14:28:46.2311 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: S/7hmmIuTDf5qRTy+C6Y2yT1JlFgS3Y32m7MJpXQ8zhXgbZHkd1O8qEPgzpICeMmexm3789u0eCp1DCOpOBvEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB7619 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 28 Sep 2023 07:28:56 -0700 (PDT) This tests that a broadcast receiver is able to successfully sync to the PA transmitted by a source, without performing BIS sync also: ISO Broadcaster Receiver Defer No BIS - Success --- tools/iso-tester.c | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/tools/iso-tester.c b/tools/iso-tester.c index 410da2c93..6d24c4c8c 100644 --- a/tools/iso-tester.c +++ b/tools/iso-tester.c @@ -411,6 +411,7 @@ struct iso_client_data { uint8_t pkt_status; const uint8_t *base; size_t base_len; + bool bcast_defer_accept; }; static void mgmt_debug(const char *str, void *user_data) @@ -1141,6 +1142,16 @@ static const struct iso_client_data bcast_16_2_1_recv_defer = { .recv = &send_16_2_1, .bcast = true, .server = true, + .bcast_defer_accept = true, +}; + +static const struct iso_client_data bcast_16_2_1_recv_defer_no_bis = { + .qos = QOS_IN_16_2_1, + .expect_err = 0, + .defer = true, + .bcast = true, + .server = true, + .bcast_defer_accept = false, }; static const struct iso_client_data bcast_ac_12 = { @@ -2257,8 +2268,11 @@ static int listen_iso_sock(struct test_data *data) bacpy(&addr->iso_bc->bc_bdaddr, (void *) dst); addr->iso_bc->bc_bdaddr_type = BDADDR_LE_PUBLIC; - addr->iso_bc->bc_num_bis = 1; - addr->iso_bc->bc_bis[0] = 1; + + if (!isodata->defer || isodata->bcast_defer_accept) { + addr->iso_bc->bc_num_bis = 1; + addr->iso_bc->bc_bis[0] = 1; + } err = bind(sk, (struct sockaddr *) addr, sizeof(*addr) + sizeof(*addr->iso_bc)); @@ -2420,9 +2434,21 @@ static gboolean iso_accept_cb(GIOChannel *io, GIOCondition cond, return false; } - if (isodata->bcast && data->step > 1) { - data->step--; - goto connect; + if (isodata->bcast) { + if (data->step > 1) + data->step--; + else + data->step++; + + iso_connect(io, cond, user_data); + + if (!data->step) + return false; + + if (!isodata->bcast_defer_accept) { + tester_test_passed(); + return false; + } } if (!iso_defer_accept(data, io)) { @@ -2444,7 +2470,6 @@ static gboolean iso_accept_cb(GIOChannel *io, GIOCondition cond, } } -connect: return iso_connect(io, cond, user_data); } @@ -3031,6 +3056,10 @@ int main(int argc, char *argv[]) &bcast_16_2_1_recv_defer, setup_powered, test_bcast_recv); + test_iso("ISO Broadcaster Receiver Defer No BIS - Success", + &bcast_16_2_1_recv_defer_no_bis, + setup_powered, + test_bcast_recv); test_iso("ISO Broadcaster AC 12 - Success", &bcast_ac_12, setup_powered, test_bcast); -- 2.39.2