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 60E82459CA; Wed, 18 Sep 2024 10:09:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 092604029B; Wed, 18 Sep 2024 10:09:24 +0200 (CEST) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by mails.dpdk.org (Postfix) with ESMTP id E325340264 for ; Wed, 18 Sep 2024 10:09:21 +0200 (CEST) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5c24c92f699so6968744a12.2 for ; Wed, 18 Sep 2024 01:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1726646961; x=1727251761; 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=GwpM0nAB1etADA7d5yNYhJDSYDLut87wNVPVpOCfhC4=; b=qkBGkkNAoVCcGkmDFVzwy4nDFoqc3HBk6/jhdnEiYonCaPAgxcm3+4Ufr7Idn5pJk5 /eBUq/X6xMfM5plxcr3CAkwYIIfjzbZSV745NSxLzZvJR2Fah2o41WcPM3JZ8heOQz3K pCECuVgHZIDG7HVEUpFnPJWwGuKeLR/zl014LbaZi5LlK+eiv2IfjfgrXiegnYy7FN5j 9cDEfqjO2X5nwLvnl1cPWSabJ+Zqi2fOTzPPu3I6GT6XlYO4sZtTwh6t8xJc7ovDLxrA Rn+vplOmnazACl5W57hUjjayKRn4OnP1UtIdydG1MuHauemtnYGH/wCQqMULcKTNYMEy 8aqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726646961; x=1727251761; 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=GwpM0nAB1etADA7d5yNYhJDSYDLut87wNVPVpOCfhC4=; b=Z/Ytd7n7aciC5yCWWvf3WrE+FKlzVGuS7nE8OKos9MRzaCVO8UX4z/5qSY680LSc/k 4u6bOv09Dvjr3QVbdjeN/y1Y4PO/EooyrvKEhyELZVvBYZ6N56SR20a72c2x7dIGc8fR X4hQ80Ea3PvPf5rUEc6O4iNpGXpThmXBdCUs3YHImpN6rrIIevsmbk6lF4bJD0WV7X+1 7DobCDErPiS4Z/5dVdnsM0z9NY0kezsS/WOH27kaKnvAAVWLvhiNJ63pd3bjfzPx1AH+ DvXtOzsZFR+riCG4TfqfFDsOtxFOkTv+jGLBUNQs/oM3ZbjitFF+nUoO8YoFsV/kceb5 67cg== X-Forwarded-Encrypted: i=1; AJvYcCUQLc4sPeYfcQ3TAhyDWr5AD0RIJ5i7v91+/X6LS2TRAOz1lVmsR+PDJRy4aPs9gPC836Y=@dpdk.org X-Gm-Message-State: AOJu0YzHtwC8Db1dgQhBf3QH/hONdQr9mo7vS/O/BtUZ2gHF+AKdebvT MDcTpfib/qCYTdXGgpwBDyXwKX64VA/i4RljYlGuUK1Elgr0Fa9Efs3rS0qUFv4= X-Google-Smtp-Source: AGHT+IEv0xQTlnxgtoAzGXHjYkHODFLd8dwoya1JL2YjXj/k6XNH2fG0RpldVc+z/sFcw7Bnc8dDIA== X-Received: by 2002:a05:6402:5249:b0:5c2:5075:7d1 with SMTP id 4fb4d7f45d1cf-5c413e05ee8mr18718566a12.7.1726646961332; Wed, 18 Sep 2024 01:09:21 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c42bb89cebsm4460278a12.60.2024.09.18.01.09.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Sep 2024 01:09:21 -0700 (PDT) Message-ID: <084f5e5c-6a88-4eeb-ba90-baeaec73bdea@pantheon.tech> Date: Wed, 18 Sep 2024 10:09:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/1] dts: add text parser for testpmd verbose output To: Jeremy Spewock Cc: thomas@monjalon.net, yoan.picchi@foss.arm.com, paul.szczepanek@arm.com, Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu, wathsala.vithanage@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu, alex.chapman@arm.com, dev@dpdk.org References: <20240729203955.267942-1-jspewock@iol.unh.edu> <20240808203612.329540-1-jspewock@iol.unh.edu> <20240808203612.329540-2-jspewock@iol.unh.edu> <3627c429-9a3e-48af-8c42-d85c83ee2998@pantheon.tech> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 17. 9. 2024 15:40, Jeremy Spewock wrote: > On Mon, Sep 9, 2024 at 7:44 AM Juraj Linkeš wrote: >> >> >>> diff --git a/dts/framework/parser.py b/dts/framework/parser.py >>> index 741dfff821..0b39025a48 100644 >>> --- a/dts/framework/parser.py >>> +++ b/dts/framework/parser.py >>> @@ -160,6 +160,36 @@ def _find(text: str) -> Any: >>> >>> return ParserFn(TextParser_fn=_find) >>> >>> + @staticmethod >>> + def find_all( >>> + pattern: str | re.Pattern[str], >>> + flags: re.RegexFlag = re.RegexFlag(0), >>> + ) -> ParserFn: >> >> I'd remove this if it's not used, the rule being let's not introduce >> unused code because it's not going to be maintained. We can always add >> it when needed. > > Since submitting this I did actually find one use for it in the Rx/Tx > suite, but that one has yet to undergo review, so it could be the case > that people don't like that implementation. > Ok, we can (and probably should) add it in that test suite patchset if needed. The required infrastructure is in this patchset and additions to it can be added in individual test suites (if only that one uses that addition). >>> diff --git a/dts/framework/utils.py b/dts/framework/utils.py >>> index 6b5d5a805f..9c64cf497f 100644 >>> --- a/dts/framework/utils.py >>> +++ b/dts/framework/utils.py >>> @@ -27,6 +27,7 @@ >>> from .exception import ConfigurationError >>> >>> REGEX_FOR_PCI_ADDRESS: str = "/[0-9a-fA-F]{4}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}.[0-9]{1}/" >>> +REGEX_FOR_MAC_ADDRESS: str = r"(?:[\da-fA-F]{2}:){5}[\da-fA-F]{2}" >> >> Is this the only format that testpmd returns? > > I believe so, but because I'm not completely sure I can change this > regex to support other variants as well. The hyphen separated one is > easy enough that it might as well be included, the group of 4 > separated by a dot might be a little more involved but I can probably > get it to work. > Ok, might as well be safe, doesn't sound like a big change. A small point is to make the regex as readable as possible - we could split it into multiple regexes (and try to match multiple times) or put the one big regex string on mutliple lines if possible (with each line being a separate variant or multiple closely related variants).