DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
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
Subject: Re: [PATCH v4 1/5] dts: allow binding only a single port to a different driver
Date: Wed, 25 Sep 2024 10:45:54 +0200	[thread overview]
Message-ID: <4d1583e0-e677-4dce-9814-3037e0b2a3f4@pantheon.tech> (raw)
In-Reply-To: <20240923184235.22582-2-jspewock@iol.unh.edu>



On 23. 9. 2024 20:42, jspewock@iol.unh.edu wrote:
> From: Jeremy Spewock <jspewock@iol.unh.edu>
> 
> 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 <jspewock@iol.unh.edu>
> ---
>   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.


  reply	other threads:[~2024-09-25  8:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 19:15 [RFC PATCH v1 0/5] dts: add VFs to the framework jspewock
2024-08-21 19:15 ` [RFC PATCH v1 1/5] dts: allow binding only a single port to a different driver jspewock
2024-08-21 19:15 ` [RFC PATCH v1 2/5] dts: parameterize what ports the TG sends packets to jspewock
2024-08-21 19:15 ` [RFC PATCH v1 3/5] dts: add class for virtual functions jspewock
2024-08-21 19:15 ` [RFC PATCH v1 4/5] dts: add OS abstractions for creating " jspewock
2024-08-21 19:15 ` [RFC PATCH v1 5/5] dts: add functions for managing VFs to Node jspewock
2024-08-21 19:21 ` [RFC PATCH v2 0/5] dts: add VFs to the framework jspewock
2024-08-21 19:21 ` [RFC PATCH v2 1/5] dts: allow binding only a single port to a different driver jspewock
2024-08-21 19:21 ` [RFC PATCH v2 2/5] dts: parameterize what ports the TG sends packets to jspewock
2024-08-21 19:21 ` [RFC PATCH v2 3/5] dts: add class for virtual functions jspewock
2024-08-21 19:21 ` [RFC PATCH v2 4/5] dts: add OS abstractions for creating " jspewock
2024-08-21 19:21 ` [RFC PATCH v2 5/5] dts: add functions for managing VFs to Node jspewock
2024-08-21 19:38 ` [RFC PATCH v2 0/5] dts: add VFs to the framework jspewock
2024-08-21 19:38   ` [RFC PATCH v2 1/5] dts: allow binding only a single port to a different driver jspewock
2024-08-21 19:38   ` [RFC PATCH v2 2/5] dts: parameterize what ports the TG sends packets to jspewock
2024-08-21 19:38   ` [RFC PATCH v2 3/5] dts: add class for virtual functions jspewock
2024-08-21 19:38   ` [RFC PATCH v2 4/5] dts: add OS abstractions for creating " jspewock
2024-08-21 19:38   ` [RFC PATCH v2 5/5] dts: add functions for managing VFs to Node jspewock
2024-08-21 19:44   ` [RFC PATCH v2 0/5] dts: add VFs to the framework Jeremy Spewock
2024-08-21 21:30 ` [RFC PATCH v3 " jspewock
2024-08-21 21:30   ` [RFC PATCH v3 1/5] dts: allow binding only a single port to a different driver jspewock
2024-08-21 21:30   ` [RFC PATCH v3 2/5] dts: parameterize what ports the TG sends packets to jspewock
2024-08-21 21:30   ` [RFC PATCH v3 3/5] dts: add class for virtual functions jspewock
2024-08-21 21:30   ` [RFC PATCH v3 4/5] dts: add OS abstractions for creating " jspewock
2024-08-21 21:30   ` [RFC PATCH v3 5/5] dts: add functions for managing VFs to Node jspewock
2024-09-23 18:42 ` [PATCH v4 0/5] dts: add VFs to the framework jspewock
2024-09-23 18:42   ` [PATCH v4 1/5] dts: allow binding only a single port to a different driver jspewock
2024-09-25  8:45     ` Juraj Linkeš [this message]
2024-09-23 18:42   ` [PATCH v4 2/5] dts: parameterize what ports the TG sends packets to jspewock
2024-09-25 10:58     ` Juraj Linkeš
2024-09-23 18:42   ` [PATCH v4 3/5] dts: add class for virtual functions jspewock
2024-09-25 11:28     ` Juraj Linkeš
2024-09-23 18:42   ` [PATCH v4 4/5] dts: add OS abstractions for creating " jspewock
2024-09-25 12:05     ` Juraj Linkeš
2024-09-23 18:42   ` [PATCH v4 5/5] dts: add functions for managing VFs to Node jspewock
2024-09-25 13:29     ` Juraj Linkeš
2024-09-25  8:24   ` [PATCH v4 0/5] dts: add VFs to the framework 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=4d1583e0-e677-4dce-9814-3037e0b2a3f4@pantheon.tech \
    --to=juraj.linkes@pantheon.tech \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Luca.Vizzarro@arm.com \
    --cc=alex.chapman@arm.com \
    --cc=dev@dpdk.org \
    --cc=jspewock@iol.unh.edu \
    --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).