DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] dts: add sudo to linux link up
@ 2025-01-29 22:08 Patrick Robb
  2025-01-30  8:15 ` Luca Vizzarro
  2025-01-30 13:53 ` Patrick Robb
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Robb @ 2025-01-29 22:08 UTC (permalink / raw)
  To: paul.szczepanek; +Cc: Luca.Vizzarro, dev, Patrick Robb

Fixes: 41d133d6c62f ("dts: automatically bring up link on interfaces")
Cc: probb@iol.unh.edu

Signed-off-by: Patrick Robb <probb@iol.unh.edu>
---
 dts/framework/testbed_model/linux_session.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py
index e77fe9b692..d811d002ca 100644
--- a/dts/framework/testbed_model/linux_session.py
+++ b/dts/framework/testbed_model/linux_session.py
@@ -169,7 +169,7 @@ def update_ports(self, ports: list[Port]) -> None:
     def bring_up_link(self, ports: list[Port]) -> None:
         """Overrides :meth:`~.os_session.OSSession.bring_up_link`."""
         for port in ports:
-            self.send_command(f"ip link set dev {port.logical_name} up")
+            self.send_command(f"sudo ip link set dev {port.logical_name} up", verify=True)
 
     def _get_lshw_info(self) -> list[LshwOutput]:
         output = self.send_command("lshw -quiet -json -C network", verify=True)
-- 
2.48.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dts: add sudo to linux link up
  2025-01-29 22:08 [PATCH] dts: add sudo to linux link up Patrick Robb
@ 2025-01-30  8:15 ` Luca Vizzarro
  2025-01-30 13:53 ` Patrick Robb
  1 sibling, 0 replies; 4+ messages in thread
From: Luca Vizzarro @ 2025-01-30  8:15 UTC (permalink / raw)
  To: Patrick Robb, paul.szczepanek; +Cc: dev

Hi Patrick,

thank you for the prompt fix!

On 29/01/2025 22:08, Patrick Robb wrote:
> Fixes: 41d133d6c62f ("dts: automatically bring up link on interfaces")
> Cc: probb@iol.unh.edu
> 
> Signed-off-by: Patrick Robb <probb@iol.unh.edu>
> ---
>   dts/framework/testbed_model/linux_session.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py
> index e77fe9b692..d811d002ca 100644
> --- a/dts/framework/testbed_model/linux_session.py
> +++ b/dts/framework/testbed_model/linux_session.py
> @@ -169,7 +169,7 @@ def update_ports(self, ports: list[Port]) -> None:
>       def bring_up_link(self, ports: list[Port]) -> None:
>           """Overrides :meth:`~.os_session.OSSession.bring_up_link`."""
>           for port in ports:
> -            self.send_command(f"ip link set dev {port.logical_name} up")
> +            self.send_command(f"sudo ip link set dev {port.logical_name} up", verify=True)

sudo should be performed with `privileged`:

     self.send_command(f"ip link set dev {port.logical_name} up", 
privileged=True, verify=True)

>   
>       def _get_lshw_info(self) -> list[LshwOutput]:
>           output = self.send_command("lshw -quiet -json -C network", verify=True)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] dts: add sudo to linux link up
  2025-01-29 22:08 [PATCH] dts: add sudo to linux link up Patrick Robb
  2025-01-30  8:15 ` Luca Vizzarro
@ 2025-01-30 13:53 ` Patrick Robb
  2025-01-30 14:11   ` Luca Vizzarro
  1 sibling, 1 reply; 4+ messages in thread
From: Patrick Robb @ 2025-01-30 13:53 UTC (permalink / raw)
  To: paul.szczepanek; +Cc: dev, Luca.Vizzarro, Patrick Robb

Fixes: 41d133d6c62f ("dts: automatically bring up link on interfaces")
Cc: probb@iol.unh.edu

Signed-off-by: Patrick Robb <probb@iol.unh.edu>
---
 dts/framework/testbed_model/linux_session.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py
index e77fe9b692..8d568e2466 100644
--- a/dts/framework/testbed_model/linux_session.py
+++ b/dts/framework/testbed_model/linux_session.py
@@ -169,7 +169,7 @@ def update_ports(self, ports: list[Port]) -> None:
     def bring_up_link(self, ports: list[Port]) -> None:
         """Overrides :meth:`~.os_session.OSSession.bring_up_link`."""
         for port in ports:
-            self.send_command(f"ip link set dev {port.logical_name} up")
+            self.send_command(f"ip link set dev {port.logical_name} up", privileged=True, verify=True)
 
     def _get_lshw_info(self) -> list[LshwOutput]:
         output = self.send_command("lshw -quiet -json -C network", verify=True)
-- 
2.48.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dts: add sudo to linux link up
  2025-01-30 13:53 ` Patrick Robb
@ 2025-01-30 14:11   ` Luca Vizzarro
  0 siblings, 0 replies; 4+ messages in thread
From: Luca Vizzarro @ 2025-01-30 14:11 UTC (permalink / raw)
  To: Patrick Robb, paul.szczepanek; +Cc: dev

Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-30 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-29 22:08 [PATCH] dts: add sudo to linux link up Patrick Robb
2025-01-30  8:15 ` Luca Vizzarro
2025-01-30 13:53 ` Patrick Robb
2025-01-30 14:11   ` Luca Vizzarro

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).