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 2997A46E69; Thu, 4 Sep 2025 18:32:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19CB44278F; Thu, 4 Sep 2025 18:32:25 +0200 (CEST) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 1352940275 for ; Thu, 4 Sep 2025 18:32:24 +0200 (CEST) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-b47173749dbso797519a12.1 for ; Thu, 04 Sep 2025 09:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1757003543; x=1757608343; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OJ1GBiYl+LoRRdtskHYbAtGzNyCLpccL1yN8Wo/yHF0=; b=e8+EbYBe8aiZxCtpx0ybA4wVaoW9k9vafQY/ba05Kr6BVVE3ee5hGwJpQaxLnZmGlB tEpuxWZHkqD1ZdPCbTx8/Wca7JCIh5ALccNDuL/conAuJL0HmUBU2pWY6DZlnKCvyIkr TXcQUixCq2+sktCDQcRBR9mh1n3NXYo/kozvI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757003543; x=1757608343; h=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=OJ1GBiYl+LoRRdtskHYbAtGzNyCLpccL1yN8Wo/yHF0=; b=Sc1N3zcEfTEdzGAbbRbSZ2L1kt3Kvcdt3ULfWSXicN5hW6/YgaXaCTwwv9hJow8Slr 4e1/xUezHw16v5/mZlYxWLPsgMiUGSreCt8RHlzUyrKXmi2Usw3QChZMVP0NJUtVcLU/ 5rPKY1QMjs+LlvTf/hI76uUUE3RplpktCgmwWBEIoae19RLDChjifbNeuVU7+pK68RyH xCfeYxu85dCgBIjwata49TbC+TiVxQSnM2bi9H5LcaIy9rX7iteu9Hj72NF7pjgQltEv ZP0IdZgPWwO6PfQZaDHVCt+/diaPfBd+kaTGd4HqO9uuIHXi7/jndn5zZM64em7zAy6x dFgg== X-Forwarded-Encrypted: i=1; AJvYcCUO3KzpZ44X6crXDXfTvlxsLNsx7dV88ZoToPN+6416+kz27QFlUj9e0vUnZWWbpmLiFCw=@dpdk.org X-Gm-Message-State: AOJu0YxYDiYOV+1QJSEIByLIgSANLFZTuLueKxNrJ6nfsk1pnOyZFvSB dSNwubz607TwCeQ/cty1bT0W+YB8lgmEJod2rpV8K6YQwO2lp1GYU/sDCbeWUboEwvVSMgtzV6X FaF0WvPZqcBLGcmS8sym7qDl33kF2TFsR6vcjWZSLhA== X-Gm-Gg: ASbGncuQGQXHdWhr/P8FnYRUEnebjbqBTj8E05PHHlZI5zYK3oF9k9+vP/C71++DBjf tVuP5YkV5MCQCT/bHpA0F5KmKjMfp7E+edildvvfK/Tqnz4yGZ69Smi6YWmugya5iCed74AI0Nq OSxnVeHE4c7CamNN3o29KEtF/aBC1YI8S6JAW1GuQJy7lfuFbKTRr+V3KUBpPAV8ydUI83fM8Jn wdlrIHZvXJGupbO94VWmFG+CQZcTzTAf3GmtuXGFw3owIrjzpk= X-Google-Smtp-Source: AGHT+IG4EwZr9jLKk16a6vMyADDOJ8WdyJue3MkOUGbTX2pdkUuKGV/4kPlMcmg/zJ0kgrIIs7qnMtMbmReXkY6nkn0= X-Received: by 2002:a17:90b:518e:b0:32b:5f76:9e29 with SMTP id 98e67ed59e1d1-32b5f76a03amr8085448a91.32.1757003542859; Thu, 04 Sep 2025 09:32:22 -0700 (PDT) MIME-Version: 1.0 References: <20250808182152.356879-2-abailey@iol.unh.edu> <20250828123758.20451-1-abailey@iol.unh.edu> <175683053809.93271.2049800112988455963.luca.vizzarro@arm.com> In-Reply-To: <175683053809.93271.2049800112988455963.luca.vizzarro@arm.com> From: Patrick Robb Date: Thu, 4 Sep 2025 12:25:35 -0400 X-Gm-Features: Ac12FXxFy3uf850KuFTZUaip6HkEj4xlhecSdbYbDcvi8nsP8j34LAY4dx0GSbo Message-ID: Subject: Re: [PATCH v3] dts: enable port binding on the TG To: Luca Vizzarro Cc: Andrew Bailey , dev@dpdk.org, dmarx@iol.unh.edu Content-Type: multipart/alternative; boundary="0000000000000aac46063dfc447a" 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 --0000000000000aac46063dfc447a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 2, 2025 at 12:52=E2=80=AFPM Luca Vizzarro wrote: > Hi Andrew, > > Thank you for clarifying. It makes more sense now. > > On Thu, Aug 28, 2025 at 08:37:58AM +0000, Andrew Bailey wrote: > > diff --git a/dts/framework/testbed_model/port.py > b/dts/framework/testbed_model/port.py > > index fc58e2b993..e9ad145f97 100644 > > --- a/dts/framework/testbed_model/port.py > > +++ b/dts/framework/testbed_model/port.py > > @@ -126,7 +126,12 @@ def original_driver(self) -> str | None: > > @property > > def bound_for_dpdk(self) -> bool: > > """Is the port bound to the driver for DPDK?""" > > - return self.current_driver =3D=3D self.config.os_driver_for_dp= dk > > + dpdk_driver =3D self.config.os_driver_for_dpdk > > + > > + if "TG" in self.node.name: > > + return self.current_driver =3D=3D dpdk_driver and dpdk_dri= ver > !=3D self.config.os_driver > > The `node.name` is an arbitrary name that is chosen by the user. > Unfortunately this is not a reliable approach. > > Another issue is that this logic doesn't really make a lot of sense in > the context of this property. I'd much rather have a `bound_for_kernel` > property, and then fix the checks appropriately where these are called. > A proposed list comprehension without actually creating the bound_for_kernel property: ports_to_bring_up =3D [p for p in ports if (p.current_driver =3D=3D port.config.os_driver and not p.is_link_up)] But yes I think it makes sense to add a bound_for_kernel property. > > > As an aside, I would like to send a patch soon which changes os_driver to kernel_driver and os_driver_for_dpdk to dpdk_driver throughout the DTS codebase. --0000000000000aac46063dfc447a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Sep 2, = 2025 at 12:52=E2=80=AFPM Luca Vizzarro <luca.vizzarro@arm.com> wrote:
Hi Andrew,

Thank you for clarifying. It makes more sense now.

On Thu, Aug 28, 2025 at 08:37:58AM +0000, Andrew Bailey wrote:
> diff --git a/dts/framework/testbed_model/port.py b/dts/framework/testb= ed_model/port.py
> index fc58e2b993..e9ad145f97 100644
> --- a/dts/framework/testbed_model/port.py
> +++ b/dts/framework/testbed_model/port.py
> @@ -126,7 +126,12 @@ def original_driver(self) -> str | None:
>=C2=A0 =C2=A0 =C2=A0 @property
>=C2=A0 =C2=A0 =C2=A0 def bound_for_dpdk(self) -> bool:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 """Is the port bound = to the driver for DPDK?"""
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 return self.current_driver =3D=3D self.co= nfig.os_driver_for_dpdk
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 dpdk_driver =3D self.config.os_driver_for= _dpdk
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if "TG" in self.node.name:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return self.current_driver = =3D=3D dpdk_driver and dpdk_driver !=3D self.config.os_driver

The `node= .name` is an arbitrary name that is chosen by the user.
Unfortunately this is not a reliable approach.

Another issue is that this logic doesn't really make a lot of sense in<= br> the context of this property. I'd much rather have a `bound_for_kernel`=
property, and then fix the checks appropriately where these are called.
=

A proposed list comprehension without actu= ally creating the bound_for_kernel property:

ports= _to_bring_up =3D [p for p in ports if (p.current_driver =3D=3D port.config.= os_driver and not p.is_link_up)]

But yes I think i= t makes sense to add a bound_for_kernel property.
=C2=A0


=C2=A0
As an aside, I would like to send a = patch soon which changes os_driver to kernel_driver and os_driver_for_dpdk = to dpdk_driver throughout the DTS codebase.
--0000000000000aac46063dfc447a--