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 E73AA455D5; Wed, 10 Jul 2024 18:46:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D048C42E46; Wed, 10 Jul 2024 18:46:12 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 3783C42E45 for ; Wed, 10 Jul 2024 18:46:11 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-706a1711ee5so19247b3a.0 for ; Wed, 10 Jul 2024 09:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720629970; x=1721234770; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PfUQ8DCRHJ18ntvzFpi0Mz54LfOLM7H/1yCN8lb7z+I=; b=Qwzy47YIAuV5l16d5+chXr9KstZBn0KuQVS3QNeO5kh2eb6EEKeMbFIqM1VRXJFk1q ilhjUyX/Ox1m1uVKT/y6GiPunqYDleB4SwRHU52ZaGSymm7Db9W/KYpA+b2wYVwSuQgL NkIOoUP3D2XSo7x5W16qeGVGWGaXxbpoQ2kUE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720629970; x=1721234770; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PfUQ8DCRHJ18ntvzFpi0Mz54LfOLM7H/1yCN8lb7z+I=; b=vzHkAMyLJxSVPSG41KHIE78raJIVzx3TM8nMB85xNi9aP3Fpi1YFCjc4cs/s+f8LNc b/h4OHCUg596UTi2R3xLLfafamAaORAhKEto0olrIJQMTtw6XmBZboNB5mf8IBulGMaT pG9XhrztRRNt/NW2Tdr3pMeKPhyQch9oLFkHchOI3BgmAHklYBso45aq3va8E1p32ZpW xmIkBv86WOV4S8A07SE/CXXLE4CrkKmT2xPYfrZ+VkNy8HtkOfgYU08l5bji0wrr2IfE y8vPtcDF/lTtuS4szuPTL9tkxFBo7+aH0UEgTnMdUupeMs+Zp2skOJnoihy8HyRV03iR emOQ== X-Forwarded-Encrypted: i=1; AJvYcCXRLcCWTFPxLGTWpnvYj9VQiuDfRg1jhhxlR6ig7/5/ltc2x0TFBgqNlbIN6L6gGmT6F6dmLowJ9S6qcME= X-Gm-Message-State: AOJu0YzmgUsMmnOhEPSg47cz0GsFVKE2oIAYCDdz8uqej/CmsLb88wbM 364Zrl8LKayPUGOh/8huGTiB47n5tFbfkDJ/vSVDW8txak9RPf30eeMDTkMhVv+medEWxdrAl/6 Sd+Yy6Js34XkiHkwQFAj0sRbsqkPUKqhK7bAtsw== X-Google-Smtp-Source: AGHT+IGkjh/EXOQL1g17vPy0kJ+x+gY6JIGuLyn9d8P2cAuThbR965jFTNMMvErGPqX322lwgZtetZvzr8lWyn2V5Jg= X-Received: by 2002:a05:6a20:734b:b0:1be:caf6:66e5 with SMTP id adf61e73a8af0-1c29820d407mr6976575637.6.1720629970281; Wed, 10 Jul 2024 09:46:10 -0700 (PDT) MIME-Version: 1.0 References: <20240708191938.32132-1-dmarx@iol.unh.edu> <20240708193012.5465-1-dmarx@iol.unh.edu> <20240708193012.5465-4-dmarx@iol.unh.edu> In-Reply-To: <20240708193012.5465-4-dmarx@iol.unh.edu> From: Jeremy Spewock Date: Wed, 10 Jul 2024 12:45:59 -0400 Message-ID: Subject: Re: [PATCH v3 4/4] dts: dynamic config test suite To: Dean Marx Cc: Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, bruce.richardson@intel.com, luca.vizzarro@arm.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jul 8, 2024 at 3:30=E2=80=AFPM Dean Marx wrote: > > Suite for testing ability of Poll Mode Driver to turn promiscuous > mode on/off, allmulticast mode on/off, and show expected behavior > when sending packets with known, unknown, broadcast, and multicast > destination MAC addresses. > > Signed-off-by: Dean Marx > --- > dts/tests/TestSuite_dynamic_config.py | 149 ++++++++++++++++++++++++++ > 1 file changed, 149 insertions(+) > create mode 100644 dts/tests/TestSuite_dynamic_config.py > > diff --git a/dts/tests/TestSuite_dynamic_config.py b/dts/tests/TestSuite_= dynamic_config.py > new file mode 100644 > index 0000000000..a6e5384c50 > --- /dev/null > +++ b/dts/tests/TestSuite_dynamic_config.py > @@ -0,0 +1,149 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2024 University of New Hampshire > + > +"""Dynamic configuration capabilities test suite. > + > +This suite checks that it is possible to change the configuration of a p= ort > +dynamically. The Poll Mode Driver should be able to enable and disable > +promiscuous mode on each port, as well as check the Rx and Tx packets of > +each port It might be worth explaining here more of what specifically is being checked by the PMD. It seems like there is different expected output based on whether promisc mode is on or not as well as different behaviors with different MAC addresses. . > + > +If packets should be received and forwarded, or received and not forward= ed, > +depending on the configuration, the port info should match the expected = behavior. > +""" > + def test_default_mode(self) -> None: > + """Tests default configuration. > + > + Creates a testpmd shell, verifies that promiscuous mode is enabl= ed by default, > + and sends two packets; one matching source MAC address and one u= nknown. > + Verifies that both are received. > + """ > + testpmd =3D TestPmdShell(node=3Dself.sut_node) > + isPromisc =3D testpmd.show_port_info(0).is_promiscuous_mode_enab= led > + self.verify(isPromisc, "Promiscuous mode was not enabled by defa= ult.") > + testpmd.start() > + mac =3D testpmd.show_port_info(0).mac_address > + # send a packet with Rx port mac address > + self.send_packet_and_verify(should_receive=3DTrue, mac_address= =3Dstr(mac)) > + # send a packet with mismatched mac address > + self.send_packet_and_verify(should_receive=3DTrue, mac_address= =3D"00:00:00:00:00:00") We should be careful using the MAC address that is all 0s as that is a special address that is reserved for localhost. I think it would still work in this case since it wouldn't match the address of the tester's port anyway, but it might be safer to just make the last digit of this a 1 regardless. > + testpmd.close() > + sleep(6) > + > 2.44.0 >