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 89D9E45A36; Thu, 26 Sep 2024 10:25:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 702A1402D5; Thu, 26 Sep 2024 10:25:49 +0200 (CEST) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 10A314025D for ; Thu, 26 Sep 2024 10:25:48 +0200 (CEST) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42cc8782869so6246275e9.2 for ; Thu, 26 Sep 2024 01:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1727339148; x=1727943948; darn=dpdk.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=t0xfSL5icMA5qq6Oqpk35Iz/TPEN3Plh+8QBFqHqgBI=; b=gO5NghTvI3xJA9KV56nCZEDs7xFXudOmavejaaAtEy51PlvIhMNtlGSS4kbX7n+Xqf fF0Wt5JZVpBjKlPMopCqOs6D3heJGDrYDnq/yeRljEU77gHYqD7tyLWTB/N63qOFp3V4 WrKTbiyHNzqHb3GE+St1BQyJJIgUFovNVq26STh3typpx8DvA01pl+rOsSQ+p+XytzPR WsaR7WGgnzPSdFfL/0CtjjopynO1Iz8F9ytbAgjUMPCXjzJCDoyoyRwjQBjebPGbciSt He3RDacPZKZAdQvEVp94iHoSFO/StJphojIhR4074QQ/iTjWsfbMlybVwA9PnXBRy2/E 3gmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727339148; x=1727943948; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t0xfSL5icMA5qq6Oqpk35Iz/TPEN3Plh+8QBFqHqgBI=; b=grjYPMSrK7AzR7Wix2gNr/pYfEu+o3ku5i6qhK1UlFgR4YvmPfRuy2N3irpe1ilBoM pZmunLN9+p7mlpktMrkGMBj42vwDw7Gb9ZBkeGUiZ9bDzp5p9zY898wFKHCpmLlCLNOQ Jq7r3veMGt55Bx2n8eShGGXfryK60PCHaacLHB4mHybt8Zvl23xZZhEUeuHBu88RxsPF 8HIN3ucDqjwLL1EHgE1xKVH35M1Uy59RPsVfjeic2VdOGENJQycy3M1Eyp4emGv9fm2Q 734+rUg1Pzt5fnUw9rxrw0GJjK9bGgmj0Bs3qHSIi+b78O8AGyDB2s0QJaZSB04OgRZo EBCg== X-Gm-Message-State: AOJu0YxbhoxWoey2dRWPRlYHtj0IqQ5Lvbih5GT+k942o23BSL2Oy9UX uVJc52Y8EI901mflloJenie/kgFyqXfxaTiwJPcIs+i7FPYb/uaHJc9CLIjl1+c= X-Google-Smtp-Source: AGHT+IEuNMjY7jjU3obqbBgljvoLXZfsDcVEtkoi0wRtekttQ2n5lhBjdgLBypKGAxMZUfCyrDF2Gg== X-Received: by 2002:a05:600c:1e27:b0:42c:acb0:dda5 with SMTP id 5b1f17b1804b1-42e9610182cmr40373855e9.1.1727339147520; Thu, 26 Sep 2024 01:25:47 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e969ddb85sm40166535e9.2.2024.09.26.01.25.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Sep 2024 01:25:47 -0700 (PDT) Message-ID: Date: Thu, 26 Sep 2024 10:25:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 1/1] dts: add text parser for testpmd verbose output To: jspewock@iol.unh.edu, Luca.Vizzarro@arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, alex.chapman@arm.com, probb@iol.unh.edu, wathsala.vithanage@arm.com, thomas@monjalon.net, yoan.picchi@foss.arm.com, npratte@iol.unh.edu Cc: dev@dpdk.org References: <20240729203955.267942-1-jspewock@iol.unh.edu> <20240925154612.11399-1-jspewock@iol.unh.edu> <20240925154612.11399-2-jspewock@iol.unh.edu> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: <20240925154612.11399-2-jspewock@iol.unh.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py > @@ -581,6 +581,506 @@ class TestPmdPortStats(TextParser): > tx_bps: int = field(metadata=TextParser.find_int(r"Tx-bps:\s+(\d+)")) > > > +class PacketOffloadFlag(Flag): > + #: RX IEEE1588 L2 Ethernet PT Packet. > + RTE_MBUF_F_RX_IEEE1588_PTP = 1 << 9 > + #: RX IEEE1588 L2/L4 timestamped packet. > + RTE_MBUF_F_RX_IEEE1588_TMST = 1 << 10 There are a few instances with two or three consecutive bits set expliticly instead with auto(). I don't know if it's better to use auto() or the explitic value, just wanted to point it out. > + > + #: FD id reported if FDIR match. > + RTE_MBUF_F_RX_FDIR_ID = 1 << 13 > + #: Flexible bytes reported if FDIR match. > + RTE_MBUF_F_RX_FDIR_FLX = 1 << 14 > + @classmethod > + def from_str(cls, flags: str) -> Self: Now that we're doing the same thing as the other classes, I think it makes sense to just flat out copy-paste the from_list_string method. > + """Makes an instance from a string containing whitespace-separated the flag members. > + > + Args: > + arr: A string containing ol_flag values. > + > + Returns: > + A new instance of the flag. > + """ > + flag = cls(0) > + for name in flags.split(): > + if hasattr(cls, name): This is still different from the other class. I think making these exactly the same would make it clear what needs to be put into the base class if we ever create one. > + flag |= cls[name] > + return flag > + > +class RtePTypes(Flag): > + """Flag representing possible packet types in DPDK verbose output. > + > + Values in this class are derived from definitions in the RTE MBUF ptype library in DPDK located > + in lib/mbuf/rte_mbuf_ptype.h. Specifically, the names of values in this class should match the > + possible return options from the methods rte_get_ptype_*_name in rte_mbuf_ptype.c. I think these are functions (rte_get_ptype_*_name), not methods. > + """ You didn't update the docstring here (double backticks (for file and function names) and the References: section). > + @classmethod > + def from_str(cls, flags: str) -> Self: The same comments apply here.