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 A85FD45A28; Wed, 25 Sep 2024 10:45:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AC674025D; Wed, 25 Sep 2024 10:45:58 +0200 (CEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by mails.dpdk.org (Postfix) with ESMTP id E1EAA400EF for ; Wed, 25 Sep 2024 10:45:56 +0200 (CEST) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a8d3cde1103so597808466b.2 for ; Wed, 25 Sep 2024 01:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1727253956; x=1727858756; 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=wabdGgFs/8kutfmc+QAl5eZc1GVvX3PZ56jztZKD0zs=; b=WoYvFIAzy40qx9fSYkxnJqWtaM3m/guqVDWEIRB46CDIlpO3KKHYXN+YC4avUxvEl/ mtHnCg/4GiW/qpfXFBUU6Q489D8iEGU8JfE7MjpEewX5Gxuey7IlsjftvIK0cbg2Ipib Dg5c+kUtpGjPyvtSniqn0PHKA+0TDdWaVabayNjyifuniE0vlqIIZxR7g0DZ/tEqNaKa Y+26yE4X4NX7/NwPDTKJmIRClUddFkFup6bpBHilbvauKOiFNQP0sMaDzl7yQ9ZFmHBx 1iMLxgjWDcNIqFdcMRD9Kds+7wl5z9RckUAU906gHH4FjO07Ctn8d8RrlvCYavIEPcng r9dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727253956; x=1727858756; 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=wabdGgFs/8kutfmc+QAl5eZc1GVvX3PZ56jztZKD0zs=; b=DgAxVlW7165x5qYGfV7shrYEIoonUsbN7Qr9x+XvmwQld2M5fTMTuofrvp+Z98K/Ae /yyqvLTKOE07ZCwg55CFGHWEM0PuArfqtSScvPd0r9e0I0UVKSqBYAqqeBXub9cKgm2x jvpyac/ehZTJ56lRcXvnXspivlw4W3filRYPLvefwUCMgrtu+ExugDy1u8xf7Tr2sRwD esms99Cv6YsiinT1tNT5TDHsJmf2vDDOM7VeKIYAHw03bNnlUOMT3jxYg3tHmOmHyoW+ nUlPQbxm3qJBuyWoCMWmTvNDxyj9Qzf4a574iDPk8E8zKLN1xOE2q7ACx2T1uJaqPbvN 5utg== X-Gm-Message-State: AOJu0Yy2KQuJqINVM3333y+Ta4E9wFpd6HhE/MpmZbYvwUtAP8CDVg9m Glp3kKbj9AQhhXRBwRK+va4p0z/JovgVR9HLUm1ueV5yu2zMd1q+RsVQDiZTy+s= X-Google-Smtp-Source: AGHT+IFGG9zUe2Htm/IW1gNsX9buSlFxU9H1OA2o2JWmuh7lEEYYM63P8kb69Ik3vzz7/ZdzIC7tYw== X-Received: by 2002:a17:907:3d8d:b0:a91:158a:a900 with SMTP id a640c23a62f3a-a93a069bf67mr206666866b.58.1727253956424; Wed, 25 Sep 2024 01:45:56 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9393134917sm182142466b.203.2024.09.25.01.45.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Sep 2024 01:45:56 -0700 (PDT) Message-ID: <4d1583e0-e677-4dce-9814-3037e0b2a3f4@pantheon.tech> Date: Wed, 25 Sep 2024 10:45:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/5] dts: allow binding only a single port to a different driver To: jspewock@iol.unh.edu, npratte@iol.unh.edu, yoan.picchi@foss.arm.com, thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu, wathsala.vithanage@arm.com, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, alex.chapman@arm.com Cc: dev@dpdk.org References: <20240821191557.18744-1-jspewock@iol.unh.edu> <20240923184235.22582-1-jspewock@iol.unh.edu> <20240923184235.22582-2-jspewock@iol.unh.edu> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: <20240923184235.22582-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 On 23. 9. 2024 20:42, jspewock@iol.unh.edu wrote: > From: Jeremy Spewock > > Previously the DTS framework only included methods that bind all ports > that the test run was aware of to either the DPDK driver or the OS > driver. There are however some cases, like creating virtual functions, > where you would want some ports bound to the OS driver and others bound > to their DPDK driver. This patch adds the ability to bind individual > ports to their respective drviers to solve this problem. Typo: drviers > > Depends-on: patch-144318 ("dts: add binding to different drivers to TG > node") > > Signed-off-by: Jeremy Spewock > --- > dts/framework/testbed_model/node.py | 21 ++++++++++++--------- > dts/tests/TestSuite_os_udp.py | 4 ++-- > 2 files changed, 14 insertions(+), 11 deletions(-) > > diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py > @@ -266,12 +266,15 @@ def bind_ports_to_driver(self, for_dpdk: bool = True) -> None: > If :data:`False`, binds to os_driver. > """ > for port in self.ports: > - driver = port.os_driver_for_dpdk if for_dpdk else port.os_driver > - self.main_session.send_command( > - f"{self.path_to_devbind_script} -b {driver} --force {port.pci}", > - privileged=True, > - verify=True, > - ) > + self._bind_port_to_driver(port, for_dpdk) > + > + def _bind_port_to_driver(self, port: Port, for_dpdk: bool = True) -> None: > + driver = port.os_driver_for_dpdk if for_dpdk else port.os_driver > + self.main_session.send_command( > + f"{self.path_to_devbind_script} -b {driver} --force {port.pci}", > + privileged=True, > + verify=True, > + ) I noticed we're doing this port by port, but we can bind multiple ports in one devbind run - just pass all ports to it. I think this improvement is well worth it.