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 F15E3440FA; Tue, 28 May 2024 23:06:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D65834026C; Tue, 28 May 2024 23:06:38 +0200 (CEST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mails.dpdk.org (Postfix) with ESMTP id 06BD44025D for ; Tue, 28 May 2024 23:06:37 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2e724bc46bfso14879271fa.3 for ; Tue, 28 May 2024 14:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1716930396; x=1717535196; 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=bRk6DvcLizoOYX7tqs4IO20FOpM+QO0NxbUzJdoq4HA=; b=PVwCHROLBry6MDz5XEK8dz5nkHSziO08OI8WAQF6FNM1vU/noUWlz8V9oPUxnEgppz XsXFkIoLVnc+5TrFho/Jm93v1I4vcUcqIf1pjoI3qGx6P9d+Ldl636ZcxMvIdQoo5FGi dM6P4EFZ0rB2jDIN/66p8w/HEqClqcV5Y+1rk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716930396; x=1717535196; 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=bRk6DvcLizoOYX7tqs4IO20FOpM+QO0NxbUzJdoq4HA=; b=ufrd/amaIb/D6ACIf2qI9VktrAdivXHA+o15RPmT+9XPMcjZFnUuTE53y4A5p7rVa4 Vs/s7o9GPGoXT3Mbbf9xC6Mpv2xsICrr8rkAQpp4NF29AHIcsFGlbrj5qBxdFcx0Jqog lv1Ia+2DIo0B3GyIN7eUgmi3WpNc8h/ruHQy3JCZSbOJW3PnctEa4TRq0yfzKtowetyR RDO7O9t6I+J8P7saxQwYbK0pGKpzPXaBlmQiHU4OgWzmeT4XIy+12lY8bmL8ifXLZhfm NgXeqNry+GE+OgQ+rJsVvjP00D2IDZONsb1Gr2Qx9l9Un8H4qJYoYuq6Y14qaQFAMj84 OlqQ== X-Gm-Message-State: AOJu0YxZ66o8cYDnwCjFkot4WKay3teq5trwcOwWzXNr+4dym76n1ZZC CE0MM9TElQLRPgiyZ1QubvuPcohzxVwjJIzUFJrkhYt2C0w2DwUjMqbCrwFNbvHD87nKV8Ycver k7zrrtK/A8oW66C8t2sgO9pu63Ib2Ojwd1KCgyQ== X-Google-Smtp-Source: AGHT+IHFUGJmZ54JasCFoz8DG4mzZvUuFmr+JtyX+bhaT9E5rUQFD3GV+L2aeYzYDEkauNbvldgl8LaVc8jsDHDpT5E= X-Received: by 2002:a2e:9607:0:b0:2e6:f3ee:c443 with SMTP id 38308e7fff4ca-2e95b24c610mr84264791fa.36.1716930396401; Tue, 28 May 2024 14:06:36 -0700 (PDT) MIME-Version: 1.0 References: <20240326190422.577028-1-luca.vizzarro@arm.com> <20240509112057.1167947-1-luca.vizzarro@arm.com> <20240509112057.1167947-6-luca.vizzarro@arm.com> In-Reply-To: <20240509112057.1167947-6-luca.vizzarro@arm.com> From: Jeremy Spewock Date: Tue, 28 May 2024 17:05:58 -0400 Message-ID: Subject: Re: [PATCH v2 5/8] dts: add testpmd shell params To: Luca Vizzarro Cc: dev@dpdk.org, =?UTF-8?Q?Juraj_Linke=C5=A1?= , Paul Szczepanek 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 This looks good, the only comment I had was in some classes the docstrings didn't get updated to what was discussed previously in the comments (making sure the comments are included in the class' docstring). I tried to point out a few places where I noticed it. Other than those comments however: Reviewed-by: Jeremy Spewock On Thu, May 9, 2024 at 7:21=E2=80=AFAM Luca Vizzarro wrote: > > Implement all the testpmd shell parameters into a data structure. > > Signed-off-by: Luca Vizzarro > Reviewed-by: Paul Szczepanek > --- > dts/framework/params/testpmd.py | 608 ++++++++++++++++++ > dts/framework/remote_session/testpmd_shell.py | 42 +- > dts/tests/TestSuite_pmd_buffer_scatter.py | 5 +- > 3 files changed, 615 insertions(+), 40 deletions(-) > create mode 100644 dts/framework/params/testpmd.py > > + > + > +class PortTopology(StrEnum): > + """Enum representing the port topology.""" > + > + paired =3D auto() > + """In paired mode, the forwarding is between pairs of ports, e.g.: (= 0,1), (2,3), (4,5).""" > + chained =3D auto() > + """In chained mode, the forwarding is to the next available port in = the port mask, e.g.: > + (0,1), (1,2), (2,0). > + > + The ordering of the ports can be changed using the portlist testpmd = runtime function. > + """ > + loop =3D auto() > + """In loop mode, ingress traffic is simply transmitted back on the s= ame interface.""" > + This should likely be the comment style for class vars: `#:` > + > + > +@convert_str(hex_from_flag_value) > +@unique > +class HairpinMode(Flag): > + """Flag representing the hairpin mode.""" > + > + TWO_PORTS_LOOP =3D 1 << 0 > + """Two hairpin ports loop.""" > + TWO_PORTS_PAIRED =3D 1 << 1 > + """Two hairpin ports paired.""" > + EXPLICIT_TX_FLOW =3D 1 << 4 > + """Explicit Tx flow rule.""" > + FORCE_RX_QUEUE_MEM_SETTINGS =3D 1 << 8 > + """Force memory settings of hairpin RX queue.""" > + FORCE_TX_QUEUE_MEM_SETTINGS =3D 1 << 9 > + """Force memory settings of hairpin TX queue.""" > + RX_QUEUE_USE_LOCKED_DEVICE_MEMORY =3D 1 << 12 > + """Hairpin RX queues will use locked device memory.""" > + RX_QUEUE_USE_RTE_MEMORY =3D 1 << 13 > + """Hairpin RX queues will use RTE memory.""" > + TX_QUEUE_USE_LOCKED_DEVICE_MEMORY =3D 1 << 16 > + """Hairpin TX queues will use locked device memory.""" > + TX_QUEUE_USE_RTE_MEMORY =3D 1 << 18 > + """Hairpin TX queues will use RTE memory.""" > + Same thing in this class, these should likely be documented as class vars with `#:` > + > +class SimpleMempoolAllocationMode(StrEnum): > + """Enum representing simple mempool allocation modes.""" > + > + native =3D auto() > + """Create and populate mempool using native DPDK memory.""" > + xmem =3D auto() > + """Create and populate mempool using externally and anonymously allo= cated area.""" > + xmemhuge =3D auto() > + """Create and populate mempool using externally and anonymously allo= cated hugepage area.""" > + Also here. Same as the previous, should likely be `#:` > + > +@dataclass(kw_only=3DTrue) > 2.34.1 >