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 8463F4553F; Mon, 1 Jul 2024 22:17:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6ED0E402E4; Mon, 1 Jul 2024 22:17:54 +0200 (CEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id EC790402D0 for ; Mon, 1 Jul 2024 22:17:52 +0200 (CEST) Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-7226821ad86so2025104a12.2 for ; Mon, 01 Jul 2024 13:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1719865072; x=1720469872; 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=U3HOHUebYa+KKrvEHtE2QL9eiCMyjDT4avkffHP5X6Y=; b=FrHwy/Smld3YAnvIQIeTJQuuyi7eEKPO974KsxrptkXzXqfpx74fcJaegA9EJWyFY7 s3qNl0NaXnmA8vHyIxYGKPlawP3dNDqtkrHtMLjUU8s5l3DgcwXSzZKHa6FtNHiuNqT5 rCYZtDQ3LycCuaW0OwayiEXJWxXp3r4DLfalU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719865072; x=1720469872; 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=U3HOHUebYa+KKrvEHtE2QL9eiCMyjDT4avkffHP5X6Y=; b=fwRV9jv9qzR2lZRpoeYpEGVVqabjJcrxl4wZ7vci7qE0Imus+cHBm1B/c1a2gu76WU odPcQOPaTZP8YJsREoM+bCrtSQ7UeKZI9lfumAsHuXx3ZwKXhqONyrNXRfrGS3XkqGDo 69XQifSbxqltWc6I/+v/s/ZKjw6s4nQVd/K6xkPUsZE/wn+UL1j2f8RZyXRVhelxlLbQ ViBJ4JNnbD4TwXOyRLP2OSjZWEok6qQMemztfNAWr7zWbEIxFEmICWbI/GlhPPqVmq0q mN8ZSbvXwuoswZ3gK3q8UNslrarIbhELci6O8sZj745LwvYuNS2ZYI0RX6QaqVL9C73Y JVCA== X-Forwarded-Encrypted: i=1; AJvYcCXH/BhytyqEqxpfaajje5Pcl8PskUBIcD6TfmS8wInlcj6FOrJZ0CNWhBFp6pmYF6ieeru5VFU7xQgwHas= X-Gm-Message-State: AOJu0YzlZRTmDaQYiAyzQvZilueAxpIZAOhG+iNrAXH7HaCzvW97W6Ht HZIP9bXW9OaTVWjGemFv7g1QpBJz04kHypQ4mgciyM8usxDdgo3MxvaM6sKm3DmdFIJoFdtkGNy qhL8mO7md6gEv5WTHsiZM3ynDzRFzOutWKs2qpA== X-Google-Smtp-Source: AGHT+IFXfakaed/4OpAYY6z8JnKKBs6ZkPlxzzV1D4shikPXhLlwWHM/uwSj8cyR4pC+tmUW0U1hxI/tW6LdprUgmBY= X-Received: by 2002:a17:90a:f410:b0:2c8:6582:16e8 with SMTP id 98e67ed59e1d1-2c93d6ea840mr3276101a91.3.1719865072055; Mon, 01 Jul 2024 13:17:52 -0700 (PDT) MIME-Version: 1.0 References: <20240617194638.12926-2-dmarx@iol.unh.edu> <20240628161930.15915-1-dmarx@iol.unh.edu> <20240628161930.15915-2-dmarx@iol.unh.edu> In-Reply-To: <20240628161930.15915-2-dmarx@iol.unh.edu> From: Jeremy Spewock Date: Mon, 1 Jul 2024 16:17:40 -0400 Message-ID: Subject: Re: [PATCH v4 2/3] dts: initial queue start/stop suite implementation 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 Fri, Jun 28, 2024 at 12:20=E2=80=AFPM Dean Marx wrot= e: > > This suite tests the ability of the Poll Mode Driver to enable > and disable Rx/Tx queues on a port. > > Signed-off-by: Dean Marx > --- > dts/tests/TestSuite_queue_start_stop.py | 95 +++++++++++++++++++++++++ > 1 file changed, 95 insertions(+) > create mode 100644 dts/tests/TestSuite_queue_start_stop.py > > diff --git a/dts/tests/TestSuite_queue_start_stop.py b/dts/tests/TestSuit= e_queue_start_stop.py > new file mode 100644 > index 0000000000..48306cf03c > --- /dev/null > +++ b/dts/tests/TestSuite_queue_start_stop.py > @@ -0,0 +1,95 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2024 University of New Hampshire > + > +"""Rx/Tx queue start and stop functionality suite. > + > +This suite tests the ability of the poll mode driver to start and > +stop either the Rx or Tx queue (depending on the port) during runtime, > +and verify that packets are not received when one is disabled. > + > +Given a paired port topology, the Rx queue will be disabled on port 0, > +and the Tx queue will be disabled on port 1. > + > +""" > + > +from scapy.layers.inet import IP # type: ignore[import] > +from scapy.layers.l2 import Ether # type: ignore[import] > +from scapy.packet import Raw # type: ignore[import] > + > +from framework.remote_session.testpmd_shell import SimpleForwardingModes= , TestPmdShell > +from framework.test_suite import TestSuite > + > + > +class TestQueueStartStop(TestSuite): > + """DPDK Queue start/stop test suite. > + > + Ensures Rx/Tx queue on a port can be disabled and enabled. > + Verifies packets are not received when either queue is disabled. > + The suite contains two test cases, Rx queue start/stop and > + Tx queue start/stop, which each disable the corresponding > + queue and verify that packets are not received/forwarded. > + """ > + > + def set_up_suite(self) -> None: > + """Set up the test suite. > + > + Setup: > + Verify that at least two ports are open for session. > + """ > + self.verify(len(self._port_links) > 1, "Not enough ports") > + > + def send_packet_and_verify(self, should_receive: bool =3D True): > + """Generate a packet, send to the DUT, and verify it is forwarde= d back. > + > + Args: > + should_receive: Indicate whether the packet should be receiv= ed. > + queue_type: Indicate which port should be verified (True for= Rx, False for Tx.) This arg doesn't seem to be part of this method anymore, we should pull it from the documentation too. > + """ > + packet =3D Ether() / IP() / Raw(load=3D"xxxxx") > + received =3D self.send_packet_and_capture(packet) > + contains_packet =3D any( > + packet.haslayer(Raw) and b"xxxxx" in packet.load for packet = in received > + ) > + self.verify( > + should_receive =3D=3D contains_packet, > + f"Packet was {'dropped' if should_receive else 'received'}", > + ) > + > -- > 2.44.0 >