From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D98FB4385D; Mon, 8 Jan 2024 02:55:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC295402B0; Mon, 8 Jan 2024 02:55:19 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2046.outbound.protection.outlook.com [40.107.6.46]) by mails.dpdk.org (Postfix) with ESMTP id EC69A40272; Mon, 8 Jan 2024 02:55:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OSzwsBfi49jp2ySx1XRvtt7Fg1fTBxOM77w7J41+CNC/quxkpC7u84HyEqnllI46ZoxOrSzqRn2kd9yDBHx0uIqJKpgD3vIpCEHr0Yt7eN2p5zqPaMLcNnXOGrzgV5yrlPngLzNDc+UovFkiLOLSQLqHsaOXY0D4Z0VU42y+VNNGhTNdyrgiLGgIQ9gR9mB1Bz/tIeK2kpTt2U9rgqIpEBnUdoZfnXT6QCeYpc28hbixKqTRcaiok5Pf/1ZUJkyc4k6YDpd3FbBNfwBrJwBUkn+5qpWYVkMuFKSQbkz4yIK6jJZvlcJgja2/ThRigyLo9o8wh69BWlSO+qeRuDlq8Q== 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=FbOOjS+qa3An4OOR3PQct2OuHXqbXCAHupCmdU2OiVY=; b=PFwqmpE8JbW/7Qjr1Xc75cYd2KGoTtjpZfX7mKTu9B+LVTmD9Ym3GGQhOnrguUex7gMgtKmU2x5R5MGEFWZwTTvlZ9C0xWCHwxhidhdS3PDvNJBwGgMUhoz2WiImiN81wz+ImEPkSMOKZSHHnrdyl9AL1Gk58JNXFS8Y6yup0TnIp8E/2EkrGi8wzmpYMOsBUOUqmQ2mK9YjkWgahOEyu0rkzX3TYCcCnmrAfOt0lPjr0GAn7OlloGmk3603UFVS+XkwiAAzO4oVrcjD7RamI0ECXtE8tG7F0kQcvO1Qe7GNoaZdxKoP5pCNflFJMCTrp+C7rpy4TutM6p15T0UudA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FbOOjS+qa3An4OOR3PQct2OuHXqbXCAHupCmdU2OiVY=; b=LlE5ymwU/blwON+Y8hx6g1VXVGdzKDIkpoFNva2Nry7VPz02AsowtTfUeOcfW6Zv+6w0p/vgozdYZcKTo9DfOSdTpqbmJSPgZylAcP8wTybdAjkMcxBT5nmLJK7bQ5d6deV2/h4PdALD6gzWcL4rNdT27IWWR/O4DZ6TsaunEo4= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by AS1PR08MB7451.eurprd08.prod.outlook.com (2603:10a6:20b:4dd::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Mon, 8 Jan 2024 01:55:13 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::6ee5:b854:81e:c23e]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::6ee5:b854:81e:c23e%7]) with mapi id 15.20.7159.020; Mon, 8 Jan 2024 01:55:13 +0000 From: Honnappa Nagarahalli To: "Etelson, Gregory" , "thomas@monjalon.net" , =?iso-8859-2?Q?Juraj_Linke=B9?= , Paul Szczepanek , Luca Vizzarro , Yoan Picchi , Jeremy Spewock , Patrick Robb , "ci@dpdk.org" , "dev@dpdk.org" CC: nd , nd Subject: RE: DTS testpmd and SCAPY integration Thread-Topic: DTS testpmd and SCAPY integration Thread-Index: AQHaN82gFgukYiDti0G5PqJLhjUxcrDPOGbw Date: Mon, 8 Jan 2024 01:55:12 +0000 Message-ID: References: <2a287ee7-cda4-f2ab-a4e6-a47021f8573f@nvidia.com> In-Reply-To: <2a287ee7-cda4-f2ab-a4e6-a47021f8573f@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 42E50F5315B3CA42834027847CCEE956.0 x-checkrecipientchecked: true authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DBAPR08MB5814:EE_|AS1PR08MB7451:EE_ x-ms-office365-filtering-correlation-id: baa66dd2-ed91-4ef6-3a98-08dc0fecda65 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: true x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7xRdP65Z4hR7ux3Tk1oFCbmNZZk6YHeWI01zZVoG8JH1KOl/gSbKc9SVGpV+WiGfTefP3hn3NuNRYHNutgK8dEmyqAW9eFfd5g+418vr1qaVuNkiCD4OPzpIc61SHREVIhiZaDZrTrqwJUAikRlbRir9Hgic0Kw8IsYJalinSeRepk5Muo6Vsr8fVERIub58e3g5YLLMcSdY+IzoClj9oZ7QH6UDY250M66jw//COaR4Lo6MJjhXP4qD7rZODoY4lws65crLMyaiDZkCm0x4wcz2Uuusfw7xPY1e+gXtPlb613v6xZNtt5xgJm5ufIX1i/H7pLF0BNXh/lJBYRr91VqAPkzqHKtXwGJdEJdJmveLmNnFvKS90PB7do5Yj+DLti9L6cCwyKPrXG7iHJuu1gGYhewhlW9+AyI3FqODSi1Nu7K7OYqfsiFcrdRZsoFOHYHfeVBOQVAvu/RIbnR2n4Vx5nu+wmTmJLDoty1eS8w9dA1Xau7sD3z3YbcVn/vROGnwP0HmYLenHOD695ViFYDiBcBVMLOmv3TTmVlVb8D8IBr99d+wD2QBOszOHwWsFlql//XqKgaZc9FY8+2D72o7DSt3r/mL0KM6V9STVBVFGvg1xkJahwlJJwYJUmWmcOB1bmMRB4droKrSxdbn+g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(376002)(346002)(366004)(396003)(136003)(230922051799003)(186009)(451199024)(1800799012)(64100799003)(316002)(110136005)(54906003)(8936002)(8676002)(921011)(71200400001)(7696005)(83380400001)(6506007)(52536014)(4326008)(33656002)(53546011)(66946007)(66556008)(76116006)(55016003)(9686003)(478600001)(64756008)(66476007)(66446008)(122000001)(38100700002)(2906002)(38070700009)(5660300002)(41300700001)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-2?Q?3x2VUpd9wNEEsdnqZx6zS9AVQ3YefizZPb+C4r+bsM7AlmvKxbRFIPTLVC?= =?iso-8859-2?Q?l3fKeDH/0qddNjUYHe6i1Gb5l9oUl+ogFJBlzv92GJZxgcaxMDJgTUv7g5?= =?iso-8859-2?Q?HL6e43G8mFmlX0unkc7lXUfbOFu9IXaUug5c/7BngFRTMTXZ+EO4Lav3Wo?= =?iso-8859-2?Q?frjZp6mqS0SNpTfmYNxJdHqVVL5144JebIGGNYFimIAd23RuqxkgCTfB4w?= =?iso-8859-2?Q?3VbIEvd+GR7Ag32TsfJEXLu8SE8rM/SlvChXP+U1oPbw5QlDUjIZyzXGSy?= =?iso-8859-2?Q?qP53UWIhTsXrP8v4Kqria6T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=?iso-8859-2?Q?70lskgheOTEACI6Nqv7E/gY1iuF+30w3/Smkz6BGg/VWwlaSNLhLz6/yF1?= =?iso-8859-2?Q?Slj6LvOfwQu3MovTQ3z69RLuSVoYnTyXSkXB8wEDeJ0uCR8a4rA8/pEyC8?= =?iso-8859-2?Q?qDd4xdjOmsc1KsjymzgnKSY/8y5MPcUlPwfNlcpi+Crp/ZGfKX16E8aIxl?= =?iso-8859-2?Q?aEI5sv8sj5mLAzu3CeckVyxpMR+GY93hwi3KveSz/lAk1lDSSMI/insaNe?= =?iso-8859-2?Q?bYyqYUFwddWaDKh/p+iHbuZfB8hdGOL7zZvjnY82V4Xaqw0LRgnJdkS55u?= =?iso-8859-2?Q?gwOuDb1JRaWciwpICvSV+HqDr//0dTLaunu/IsM1pJZsQ4K1udSXR/H2EY?= =?iso-8859-2?Q?IYNNtVpNTv4DX4Kar6T0LjMq3ErUNjQJSGrhCKIuN+Bd8SP96abs7kNsXQ?= =?iso-8859-2?Q?s7sJsLO8VK0H8QwqSllH2iw1vvZ7o4h7x8LnnKOBKyp9nYBpp+vBygoxn8?= =?iso-8859-2?Q?SnrK04YWdlKkRHoXKUvF6r61/9hkDf+nbyGpgjO9+zJQ5F+NsUHNiY+Cnk?= =?iso-8859-2?Q?Usjw=3D=3D?= Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DBAPR08MB5814.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: baa66dd2-ed91-4ef6-3a98-08dc0fecda65 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2024 01:55:12.9898 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3chByduRIKFqNLkPjRKgdKC2cv1xbtbBoIwFWwC/YaJW/lehhbBGEdWgx/nuEgSM4uH8JjMh2hwR0FjFApJJCGaYzv61b39hXu8AQrVMsNM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7451 X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org > -----Original Message----- > From: Etelson, Gregory > Sent: Tuesday, December 26, 2023 1:32 AM > To: thomas@monjalon.net; Juraj Linke=B9 ; > Honnappa Nagarahalli ; Paul Szczepanek > ; Luca Vizzarro ; Yoan > Picchi ; Jeremy Spewock > ; Gregory Etelson ; Patrick > Robb ; ci@dpdk.org; dev@dpdk.org > Subject: DTS testpmd and SCAPY integration >=20 > Hello, >=20 > Consider an option to describe DTS test with testpmd and SCAPY plain text > commands. >=20 > For example: >=20 > Scenario: > - Configure UDP packet in SCAPY and a flow in testpmd. > - Send UDP packet and validate testpmd output triggered by that packet. >=20 > ```yaml > phase_0: > name: CONFIGURATION > tg: | > udp_pkt =3D Ether()/IP()/UDP(sport=3D31)/Raw('=3D=3D TEST =3D=3D= ') > print('packet is ready') > dut: | > start > set verbose 1 > flow create 0 ingress pattern eth / ipv4 / udp src is 31 / end a= ctions queue > index 1 / end > result: > dut: 'Flow rule #0 created' > tg: 'packet is ready' >=20 > phase_1: > name: SEND and VALIDATE > tg: sendp(udp_pkt, iface=3Dpf0) > result: > dut: '- RSS queue=3D0x1 -' > ``` >=20 > Test described as a sequence of phases. >=20 > Phase definition: > ~~~~~~~~~~~~~~~~ >=20 > ``` > : # unique phase ID > name: # phase name > : # application APP1 commands > ... > : # application APPy commands > ... > : # application APPx commands >=20 > result: # optional phase results verification section > : # APPx expected output > ... > : # APPy expected output= ``` >=20 > - Application commands in a phase executed sequentially, > in order of application IDs: commands executed > before commands. >=20 > - Application results in a phase validated sequentially, > in order of application IDs: result validated > before APPy result. >=20 > - Application result is a regular expression. >=20 >=20 > Test application definition: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > ``` > : # unique application ID > agent: # mandatory application type identifier: {testpmd|scap= y} > cmd: # optional application command template > ``` >=20 > Example: >=20 > ```yaml >=20 > dut: > agent: testpmd > cmd: 'dpdk-testpmd -a pci0 -- -i --rxq=3D4 --txq=3D4' >=20 > tg: > agent: scapy > ``` >=20 > Test commands do not bound to a specific setup. > Therefore, testpmd commad line and SCAPY sendp() function use encoding to > describe relative interface position in a tested HBA. >=20 > PCI encoding scheme for testpmd: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > - PF PCI: `pciX` > Example: `pci0: '0000:08:00.0'` >=20 >=20 > - PCI SR-IOV: `pciXvfY` > Example: `pci0vf0: '0000:08:00.2'` >=20 > Network devices encoding scheme for SCAPY: > - PF: `pfX` > Example: `pf0: enp8s0f0np0` >=20 >=20 > - PCI SR-IOV: `pfXvfY` > Example: `pf0vf0: enp5s0f0v0` >=20 >=20 > - Network device representor: `pfXrfY` >=20 > Example: `pf0rf0: enp5s0f0npf0vf0` >=20 >=20 > Test execution requires an additional file to describe tested setup. >=20 > Setup file format: > ~~~~~~~~~~~~~~~~~ >=20 > ``` > : # unique application ID > host: # hostname or IPvX address > path: # optional application path > hba: # optional HBA description > pmd: # PMD > hw: # HW type > ``` >=20 > Example: >=20 > ```yaml > dut: > host: 1.2.3.4 > path: /opt/dpdk.org/build/app > hba: > pmd: mlx5 > hw: mt4125 > tg: > host: ::1234 > ``` >=20 > ```yaml > dut: > agent: testpmd > cmd: 'dpdk-testpmd -a pci0 -- -i --rxq=3D4 --txq=3D4' > tg: > agent: scapy >=20 > test: > - > phases: [ *ref_phase0 ] > repeat: 1 > - > phases: [ *ref_phase1 ] > repeat: 3 >=20 > phase_0: &ref_phase0 > name: CONFIGURATION > tg: | > udp_pkt =3D Ether()/IP()/UDP(sport=3D31)/Raw('=3D=3D TEST =3D=3D= ') > print('packet is ready') > dut: | > start > set verbose 1 > flow create 0 ingress pattern eth / ipv4 / udp src is 31 / end a= ctions queue > index 1 / end > result: > dut: 'Flow rule #0 created' > tg: 'packet is ready' >=20 > phase_1: &ref_phase1 > name: SEND and VALIDATE > tg: sendp(udp_pkt, iface=3Dpf0) > result: > dut: '- RSS queue=3D0x1 -' > ``` >=20 > The plain text format provides minimalistic and intuitive framework for D= TS > tests. > DTS can use plan text testpmd/scapy command format in addition to Python > framework. Hi Gregory, I do not fully understand your proposal, it will be helpful to join the DT= S meetings to discuss this further. YAML has wide support built around it. By using our own text format, we wil= l have to build the parsing support etc ourselves. However, YAML is supposed to be easy to read and understand. Is it just a m= atter for getting used to it? Thank you, Honnappa >=20 > Regards, > Gregory