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 C64FD45638; Wed, 17 Jul 2024 21:57:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A699C402F2; Wed, 17 Jul 2024 21:57:45 +0200 (CEST) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by mails.dpdk.org (Postfix) with ESMTP id A7B13402B7 for ; Wed, 17 Jul 2024 21:57:44 +0200 (CEST) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2ee844bb5d7so242901fa.0 for ; Wed, 17 Jul 2024 12:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1721246264; x=1721851064; 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=GjWgMkqUTXf6fzksiOimO2WFZ06G2+SLoClGzIGOj0c=; b=aIbHWoewVp4914xNZbNOGhQzRGFt1z4FZQWere1cEGXbOek05RbfvBR9XXF4fMvjfL BnwcF7wZpkJ6hwPG17a64VFyBaEwZWr12gOXCp/0WqbOK6VTBDheZJxtTPQUVLNjkU9L Biq+Gbkb37WgWuvtBKBgofyPLhdAo9NH303j4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721246264; x=1721851064; 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=GjWgMkqUTXf6fzksiOimO2WFZ06G2+SLoClGzIGOj0c=; b=TGKGe9Lp0D+zROzoZhZSCLe40dMrya2E8ycAJDETb+S3sFHH0Qb8OEfEBHafYDtUjC EKSKLJKRMfHKh59Dnmcoil0vrKj7OFpAYpC36ba8WBWvBG6QGLmRIqAPpDGJijZjQzuO Y9HlpFiCIiLUqRRcM3CmqVqhUXmtIlhTfIhk+iGvP38O0iicRkY9gH6spjJlYx5pxgKl IIQXDIGEcoLaTupWPqBi2JggfSQam1G9qA6zz+K2rD8DnsYhMnPsVT41lgYCp1/NQ9fi gAiB5Y1Zdn2Gblw8vsfj2keNr6wAnEQjMdH6n1Lo5QtW15ZhUfE1/FUOXbOYiisW14cE awNA== X-Forwarded-Encrypted: i=1; AJvYcCWvp+W63rLfEIfCv7/pXEE0KKJ1grk1AZtIIevLhduZQ32FG0jR+EYL4pnFr2+ShyXW4C88+6FBWnU1vOk= X-Gm-Message-State: AOJu0Yyu29q8X8/VhOQuPaYLkeQfdnroMNKYXFT5OTGW06Nd7uxPjr01 TLyCJsQevrlqOj5h1FKGYW+KY/Ge3Z+jMlt39CUYwgL5inQDsD9Ra28EmR1qyJItVGs0cc0C+Wg Nv3zbfRNVYNVitARRDfYuMyn+Wkl1Z8nypnZwfw== X-Google-Smtp-Source: AGHT+IF99Gv8lEDR/ScGinLkAX45A6XMcjAInwZOTh565NjXdXcdB/h5h3qznZReMhhksWTPWofUuhTl/H9qWKNiMjQ= X-Received: by 2002:a2e:870c:0:b0:2ef:80:8a73 with SMTP id 38308e7fff4ca-2ef05d9864cmr1522111fa.8.1721246263837; Wed, 17 Jul 2024 12:57:43 -0700 (PDT) MIME-Version: 1.0 References: <20240702192422.2480-2-npratte@iol.unh.edu> <20240702192422.2480-4-npratte@iol.unh.edu> In-Reply-To: From: Nicholas Pratte Date: Wed, 17 Jul 2024 15:57:32 -0400 Message-ID: Subject: Re: [PATCH v2 2/3] dts: add testpmd methods for test suite To: Jeremy Spewock Cc: Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu, juraj.linkes@pantheon.tech, paul.szczepanek@arm.com, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, dmarx@iol.unh.edu, 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 Thu, Jul 11, 2024 at 3:33=E2=80=AFPM Jeremy Spewock wrote: > > There were a few emails that came through for this series but this was > the most recent one so I went with reviewing this one, but it looks > like the more descriptive commit subject got lost in this iteration. > It would probably be worth adding that back. > > Additionally, it looks like the functions you added here (including > the ones added from the VLAN suite, but I believe those ones are > already fixed in the latest version ) are all missing their return > types. Of course they don't return anything, but that is still useful > to note by annotating it as "None". Surprised I never saw that. I'll fix this. > On Tue, Jul 2, 2024 at 3:25=E2=80=AFPM Nicholas Pratte wrote: > > > > Several new methods have been added to TestPMDShell in order to produce > > the mac filter's individual test cases: > > - set_mac_addr > > - set_multicast_mac_addr > > - rx_vlan_add > > - rx_vlan_rm > > - vlan_filter_set_on > > - vlan_filter_set_off > > - set_promisc > > > > set_mac_addr and set_multicast_addr were created for the mac filter tes= t > > suite, enabling users to both add or remove mac and multicast > > addresses based on a booling 'add or remove' parameter. The success or > > I think this is a typo and "booling" should be "boolean" but I could be w= rong. Good catch! > > > failure of each call can be verified if a user deems it necessary. > > > > The other methods listed are implemented in other respective test > > suites, and their implementations have been copied, but are subject to > > change; they are not the focus of this patch. > > > > Bugzilla ID: 1454 > > Signed-off-by: Nicholas Pratte > > --- > > dts/framework/remote_session/testpmd_shell.py | 177 ++++++++++++++++++ > > dts/tests/TestSuite_mac_filter.py | 0 > > It looks like creating the file somehow snuck into the diff for this > commit instead of the other one that populates it. Strange. I can fix that real quick. > > > 2 files changed, 177 insertions(+) > > create mode 100644 dts/tests/TestSuite_mac_filter.py > > > > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framew= ork/remote_session/testpmd_shell.py > > index ec22f72221..0be1fb8754 100644 > > --- a/dts/framework/remote_session/testpmd_shell.py > > +++ b/dts/framework/remote_session/testpmd_shell.py > > > + def set_multicast_mac_addr(self, port_id: int, multi_addr: str, ad= d: bool, verify: bool =3D True): > > + """Add or remove multicast mac address to a specified port fil= ter. > > Just to make this more clear that you specify the port and not the > port filter, it might be helpful here to show that the port possesses > the filter by saying "a specified port's filter." Yes. This was just a typo. What you have here is what I was going for. > > > + > > + Args: > > + port_id: The port ID the multicast address is set on. > > + multi_addr: The multicast address to be added to the filte= r. > > + add: If :data:'True', add the specified multicast address = to the port filter. > > + If :data:'False', remove the specified multicast addre= ss from the port filter. > > + verify: If :data:'True', assert that the 'mcast_addr' oper= ations was successful. > > + If :data:'False', execute the 'mcast_addr' operation a= nd skip the assertion. > > + > > + Raises: > > + InteractiveCommandExecutionError: If either the 'add' or '= remove' operations fails. > > + """ > > + mcast_cmd =3D "add" if add else "remove" > > + output =3D self.send_command(f"mcast_addr {mcast_cmd} {port_id= } {multi_addr}") > > + if "Bad arguments" in output: > > + self._logger.debug("Invalid arguments provided to mcast_ad= dr") > > + raise InteractiveCommandExecutionError("Invalid argument p= rovided") > > + > > + if verify: > > + if ( > > + "Invalid multicast_addr" in output > > + or f'multicast address {"already" if add else "not"} f= iltered by port' in output > > + ): > > + self._logger.debug(f"Failed to {mcast_cmd} {multi_addr= } on port {port_id}") > > + raise InteractiveCommandExecutionError( > > + f"Failed to {mcast_cmd} {multi_addr} on port {port= _id} \n{output}" > > + ) > > > > def show_port_stats_all(self) -> list[TestPmdPortStats]: > > """Returns the statistics of all the ports. > > > > diff --git a/dts/tests/TestSuite_mac_filter.py b/dts/tests/TestSuite_ma= c_filter.py > > new file mode 100644 > > index 0000000000..e69de29bb2 > > -- > > 2.44.0 > >