From: Jeremy Spewock <jspewock@iol.unh.edu>
To: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
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
Subject: Re: [PATCH 1/1] dts: add binding to different drivers to TG node
Date: Wed, 18 Sep 2024 14:50:58 -0400 [thread overview]
Message-ID: <CAAA20UTh3pF-3LFvXSn1Wme1v=s3N94r6VyuK2DtOSzq3ftjTQ@mail.gmail.com> (raw)
In-Reply-To: <b6eb30eb-d782-42e0-9f30-c6323e976a85@pantheon.tech>
On Mon, Sep 16, 2024 at 6:04 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
>
>
> On 9. 9. 2024 17:55, Jeremy Spewock wrote:
> > On Mon, Sep 9, 2024 at 8:16 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
> >>
> >>
> >>
> >> On 12. 8. 2024 19:22, jspewock@iol.unh.edu wrote:
> >>> From: Jeremy Spewock <jspewock@iol.unh.edu>
> >>>
> >>> 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?
I figured that the assumption would be that whatever is in the config
file is what the TG needs to be bound to in order to run the testing,
similarly to how we always bind on the SUT assuming that we need to be
using the DPDK driver to test DPDK.
> 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.
That makes sense to me actually considering the traffic generator
being used cannot change throughout the node's lifetime. I will make
that change.
>
> >> 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.
>
Fair enough, I don't see why it would be run outside of the DPDK
directory in most cases. There is one situation where it could happen,
which is the runner target for the Docker container copies only the
DTS directory into the container when it "bakes DTS in." It does so
because it really only needs the .toml file for the poetry install
and, realistically, it seems like you should normally be mounting your
local DPDK directory over the DTS directory, but maybe that isn't
super clear. Out of scope for this patch, but just something to note.
> 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).
Sure, that makes sense to me. I'll make that change.
next prev parent reply other threads:[~2024-09-18 18:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 17:22 [PATCH 0/1] dts: add driver binding on TG jspewock
2024-08-12 17:22 ` [PATCH 1/1] dts: add binding to different drivers to TG node jspewock
2024-08-12 17:49 ` Nicholas Pratte
2024-09-09 12:16 ` Juraj Linkeš
2024-09-09 15:55 ` Jeremy Spewock
2024-09-16 10:04 ` Juraj Linkeš
2024-09-18 18:50 ` Jeremy Spewock [this message]
2024-09-19 9:10 ` Juraj Linkeš
2024-09-12 13:00 ` Patrick Robb
2024-09-19 18:16 ` [PATCH v2 0/1] dts: add driver binding on TG jspewock
2024-09-19 18:16 ` [PATCH v2 1/1] dts: add binding to different drivers to TG node jspewock
2024-09-24 9:12 ` Juraj Linkeš
2024-09-24 13:57 ` Jeremy Spewock
2024-09-24 14:03 ` Juraj Linkeš
2024-09-24 16:28 ` [PATCH v3 0/2] dts: add driver binding on TG jspewock
2024-09-24 16:28 ` [PATCH v3 1/2] dts: add symbolic link to dpdk-devbind script jspewock
2024-09-25 5:48 ` Juraj Linkeš
2024-09-27 11:49 ` Luca Vizzarro
2024-09-24 16:28 ` [PATCH v3 2/2] dts: add binding to different drivers to TG node jspewock
2024-09-25 6:01 ` Juraj Linkeš
2024-09-27 11:50 ` Luca Vizzarro
2024-09-30 13:42 ` [PATCH v3 0/2] dts: add driver binding on TG Juraj Linkeš
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAA20UTh3pF-3LFvXSn1Wme1v=s3N94r6VyuK2DtOSzq3ftjTQ@mail.gmail.com' \
--to=jspewock@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Luca.Vizzarro@arm.com \
--cc=alex.chapman@arm.com \
--cc=dev@dpdk.org \
--cc=juraj.linkes@pantheon.tech \
--cc=npratte@iol.unh.edu \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
--cc=thomas@monjalon.net \
--cc=wathsala.vithanage@arm.com \
--cc=yoan.picchi@foss.arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).