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 928AE459CC; Wed, 18 Sep 2024 14:58:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 210D34026F; Wed, 18 Sep 2024 14:58:42 +0200 (CEST) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mails.dpdk.org (Postfix) with ESMTP id 036644025C for ; Wed, 18 Sep 2024 14:58:40 +0200 (CEST) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a8a7596b7dfso133504366b.0 for ; Wed, 18 Sep 2024 05:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1726664320; x=1727269120; 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=sdFz7V3Q9a3QZGdkFe36RvLnsNSmUKKU9Z8IS8IbAuA=; b=EtN4TGKBsLwXf9VcJtakY5LtnUGDdWIarEPws0vVob9p7BzV6ZD4Nm8WY8s4Y5v27P iagSwv8iAUJT7LZk9jeSP277R2gxWKIa8y+QFjSbFG6QxGPR5t3HtQ8UauvYgf3ptO0N SiT1gkAt13bJLq+E4sDs/mwfy9Gj01KagXpFx0sVspoFXKqV6Q6E7RTz10jsdzMyZY+c tB7BzUSR6gCSnnwQaTlLRYIvgJ1Ck+WTucEHghTUPFuJ/MBSpJEDkt3swfrYADNd/xjK +PL6/icxIoT1qEZdD33bFU+qZeWN5HWW9Np1ATTAMHK6NbpPDBk+xK96xkcEXU34ZjZ+ vobw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726664320; x=1727269120; 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=sdFz7V3Q9a3QZGdkFe36RvLnsNSmUKKU9Z8IS8IbAuA=; b=VCLZZf2SdXh/2D+dISxiKC2Jpka6EYHvUOGiRb8W8dqDCRfneMM2aejNp3uPYR2Y5G iT1asABSmImKiSdLCaAnnxPZS4p0MUO/LtGs8ywiOPDIQCDigluvkbjmTeEEsRFjB0N7 mVq7eZ81x0m5tSdJGH5R6gyQ8c/mNDs5pKEn8/0v3RWCrML5FGYlEXFz6uTs8wN7JXGm emY62LxQa1c8nnjxP2tDSs+nXZSmg5exfvTWUDyDtWv46I0vZrq+xcP3Drzj+0jqNoPd mCqYoTYhueGoeNz/8l/H7n04BSIt8zqPfrEFedZKQA288JkoZtiOhaYNusQ47HKh/+I5 STeg== X-Forwarded-Encrypted: i=1; AJvYcCUkb4BsITZbbBICgNkmnm4qszunPFPr7uEkoJ0GufG95uvRzjGEjjZ/pqQkgleMMO5ubYE=@dpdk.org X-Gm-Message-State: AOJu0Yy9LEa/nDV9L+c6yvLHa+PXEaHXoNDG4iKo2L8Hsci20WxmpdCe nC3SK4YmBZeKLwGgAR1kXNFw1WwjLzuyUtWAJKWYqhATPLyCx0F3HGLXsihtbNI= X-Google-Smtp-Source: AGHT+IF0TCNmQWSfFPz/QhiB0dD/THsDJNH1ZHVnQeoyj5Ga2upfZ344pby8AnrftttIHehMAsluBQ== X-Received: by 2002:a17:906:fd88:b0:a72:7ede:4d12 with SMTP id a640c23a62f3a-a902a3d168amr2283020766b.5.1726664320412; Wed, 18 Sep 2024 05:58:40 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90610f3ae2sm582465866b.76.2024.09.18.05.58.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Sep 2024 05:58:40 -0700 (PDT) Message-ID: <0d6ab3ba-58bd-4750-8113-79d8285bc19a@pantheon.tech> Date: Wed, 18 Sep 2024 14:58:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 08/12] dts: add NIC capability support To: Jeremy Spewock Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu, dmarx@iol.unh.edu, alex.chapman@arm.com, dev@dpdk.org References: <20240301155416.96960-1-juraj.linkes@pantheon.tech> <20240821145315.97974-1-juraj.linkes@pantheon.tech> <20240821145315.97974-9-juraj.linkes@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 27. 8. 2024 18:36, Jeremy Spewock wrote: > On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš > wrote: > >> diff --git a/dts/framework/testbed_model/capability.py b/dts/framework/testbed_model/capability.py >> index 8899f07f76..9a79e6ebb3 100644 >> --- a/dts/framework/testbed_model/capability.py >> +++ b/dts/framework/testbed_model/capability.py >> @@ -5,14 +5,40 @@ > >> + @classmethod >> + def get_supported_capabilities( >> + cls, sut_node: SutNode, topology: "Topology" >> + ) -> set["DecoratedNicCapability"]: >> + """Overrides :meth:`~Capability.get_supported_capabilities`. >> + >> + The capabilities are first sorted by decorators, then reduced into a single function which >> + is then passed to the decorator. This way we only execute each decorator only once. >> + """ >> + supported_conditional_capabilities: set["DecoratedNicCapability"] = set() >> + logger = get_dts_logger(f"{sut_node.name}.{cls.__name__}") >> + if topology.type is Topology.type.no_link: > > As a follow-up, I didn't notice this during my initial review, but in > testing this line was throwing attribute errors for me due to Topology > not having an attribute named `type`. I think this was because of > `Topology.type.no_link` since this attribute isn't initialized on the > class itself. I fixed this by just replacing it with > `TopologyType.no_link` locally. > I also ran into this, the type attribute is not a class variable. Your solution works (and I also originally fixed it with exactly that), but I then I realized topology.type.no_link also works (and was probably my intention), which doesn't require the extra import of TopologyType.