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 0333A459AD; Mon, 16 Sep 2024 12:04:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EA894025F; Mon, 16 Sep 2024 12:04:07 +0200 (CEST) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by mails.dpdk.org (Postfix) with ESMTP id 03F3140041 for ; Mon, 16 Sep 2024 12:04:06 +0200 (CEST) Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2f75de9a503so43985511fa.0 for ; Mon, 16 Sep 2024 03:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1726481046; x=1727085846; 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=Foj8EwiaWq1u8wAY+4YryzV+Fwy7em+dMtcqq3Cn37M=; b=jrpmpJTOsDCBzsSr1E0Adjiq5lF8nRs0i7WLXOSlImTU/PMhQKtoSAwlZum8J2Mplk MbCv9FcyodnylQ4Zmsb6wsqt/TCnsLo2CK5FggV1uncKM3hLksxjkMbiF1XZs8e5o8Ct hg2UUlcy9XoDT8JoUwjZqIEwCBD/N0c60az0BL4moTD9Mj2BVaReU1+7JDEJBu6+VEiz xLYJKWYdehkVGM9mnX8bYL/FSD1/HL7/ZeTkZvrUNoHtlPP8L2S403sSpP0vgBn5ZCqg XBKntuP5StxH7ybeUEt6CSD1JOAQjS1WbWFmaNWRSMsAaFbFmNSITii13tlMJSk5IH5Q zt6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726481046; x=1727085846; 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=Foj8EwiaWq1u8wAY+4YryzV+Fwy7em+dMtcqq3Cn37M=; b=ZfFOhF1nVm7E3eQ2NLbNgfmuLlPj2q+mmwLovHVV8tqCL/ET5rNsquAyxYab1du4Et v0JDy1d3tUSmMHrrOXEmC4Y2TyA39AkBiwRO1bKGxXbl/JvBLJa30nqrAFkNKg19c4A6 rlOqnZ+rWlGds6gox2wnFtdZeTAwZKb+XA8meC1yBvBTdv4FIm1+WLuRdiXNum1hwO1P 5Kv3C8KxtHCqiKhZrfo1AM/0IbK431c4X/uZB5gOgectk6DlMC1QYLK9mbI51rqg9jwR IgIG09z60J2hrP9C6b7Y2dZwTN4c8EV9ycdvflKtUELQ/2nC9Df5REO4NS8hg7o+PQgO CWPQ== X-Forwarded-Encrypted: i=1; AJvYcCVAvf5Ykb00HOTDHGO9Z5rx7iw2IXazuKTT58HTY8U1j8Xyx+UKyUV6wmPZ5uolIGcKXjk=@dpdk.org X-Gm-Message-State: AOJu0Yw4932vzQJFo0jdYuEyfMjwHmtYccbKXvHnWKj/s0i5dQZesSM6 8bwyVkNY/mmNkV7gVXlyIcXTdDSpzRsoTRUsTZloKzxnY787iDS7Lnyl5SSqK+U= X-Google-Smtp-Source: AGHT+IGnDXqZUG3lD635p9FdonxNyjKNS4DpyrNno5R88S231vTxZDiUVxtAxfOTPRkgr/jl41965g== X-Received: by 2002:a05:651c:2129:b0:2f7:7ea4:2a1e with SMTP id 38308e7fff4ca-2f787f4460amr74866371fa.28.1726481046037; Mon, 16 Sep 2024 03:04:06 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c42bb563acsm2421624a12.35.2024.09.16.03.04.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Sep 2024 03:04:05 -0700 (PDT) Message-ID: Date: Mon, 16 Sep 2024 12:04:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] dts: add binding to different drivers to TG node To: Jeremy Spewock Cc: alex.chapman@arm.com, Luca.Vizzarro@arm.com, wathsala.vithanage@arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, npratte@iol.unh.edu, thomas@monjalon.net, yoan.picchi@foss.arm.com, probb@iol.unh.edu, dev@dpdk.org References: <20240812172251.41131-1-jspewock@iol.unh.edu> <20240812172251.41131-2-jspewock@iol.unh.edu> 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 9. 9. 2024 17:55, Jeremy Spewock wrote: > On Mon, Sep 9, 2024 at 8:16 AM Juraj Linkeš wrote: >> >> >> >> On 12. 8. 2024 19:22, jspewock@iol.unh.edu wrote: >>> From: Jeremy Spewock >>> >>> The DTS framework in its current state supports binding ports to >>> different drivers on the SUT node but not the TG node. The TG node >>> already has the information that it needs about the different drivers >>> that it has available in the configuration file, but it did not >>> previously have access to the devbind script, so it did not use that >>> information for anything. >>> >>> This patch moves the steps to copy the DPDK tarball into the node class >>> rather than the SUT node class, and calls this function on the TG node >>> as well as the SUT. It also moves the driver binding step into the Node >>> class and triggers the same pattern of binding to ports that existed on >>> the SUT on the TG. >>> >> >> This is a very inefficient way to do this. We'll have to build DPDK >> twice and that's very time consuming. I was thinking in terms of just > > This patch shouldn't be compiling DPDK twice, are you referring to the > process of copying the tarball over and extracting it taking too long? > If so, that makes sense that it takes longer than we need for this one > task. I figured it wouldn't hurt to have the whole DPDK directory > there, and that it could even be potentially useful to have it if the > TG ever needed it. That and it seemed like the most straightforward > way that kept these two set up in a similar way. Extracting the > tarball is obviously pretty quick, so I guess the real question here > is whether it is fine to add the time of one extra SCP of the DPDK > tarball around. > Ah, I didn't look carefully at the split. This is fine, but there some things I noticed. As Patrick mentioned, the docstrings in Node.set_up_build_target() and SutNode.set_up_build_target() would need to be updated. Why are we binding ports on the TG node? This shouldn't really be part of set_up_build_target; set_up_test_run is a better place to put this, as we don't need to copy it for each build target. And, as I realized then thinking about the property (down below), we don't need to do that even per test_run; once per TG node's lifetime is enough. >> copying the script to the TG node and storing its location on the TG >> node. We should have access to the script whether DTS is run from the >> repository or a tarball. > > We should have access to it regardless, but extracting only that one > script would be different based on if it was a tarball or a repository > since, I believe at least, I would have to use the tarfile library to > read and extract only this one file to copy over if it was a tarball. > It would be faster I assume, so if you think it is worth it I could > make the change. Unless you are saying that we wouldn't need to take > the devbind script from the tarball that is passed into the DTS run > and instead assume that we can just go one directory up from `dts/` on > the runner host. That could be an interesting idea which would be > faster, but I wasn't sure if that was something that was fine to do > since (I don't think at least) there is anything that technically ties > you to running from in a DPDK directory other than the docker > container. You can run DTS from any directory, but currently DTS it's always going to be in a DPDK tree (there's no other way to get DTS), so I think it's safe to assume the script is there. We can put a variable pointing to dpdk_root into utils.py and use that. My idea was copying that one file, nothing else (no tarball or anything would be needed). I think we'd only need to move _remote_tmp_dir and _path_to_devbind_script to Node and then implement set_up_test_run() on the TG node to copy just the script (with self.main_session.copy_to()) and set _path_to_devbind_script. And I guess set _path_to_devbind_script in SutNode.tear_down_build_target() and TGNode.tear_down_test_run() since those seems to be missing. But there's actually one more thing we could improve on top of that. _path_to_devbind_script could be a property which would be used the same way in SutNode, but in TGNode, we could copy the script only if it's None and set it back to None only when closing the Node (as we need to copy the script only once per TG node lifespan).