Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cmd/manifest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,30 @@ fn manifestcmd(context: &mut ExecutionContext) -> Result<()> {
}
}

if !manifest.sockets.is_empty() {
println!(
"{:>12} => {} socket{}",
"sockets",
manifest.sockets.len(),
if manifest.sockets.len() != 1 { "s" } else { "" }
);
println!(
" {:20} {:5} {:>6} {:>7} {}",
"NAME", "KIND", "PORT", "RXSIZE", "OWNER"
);

for socket in &manifest.sockets {
println!(
" {:20} {:5} {:>6} {:>7} {}",
socket.name,
socket.kind,
socket.port,
socket.rx.bytes,
socket.owner.name,
);
}
}

Ok(())
}

Expand Down
9 changes: 5 additions & 4 deletions cmd/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ pub struct RpcClient<'a> {
hubris: &'a HubrisArchive,
socket: UdpSocket,
rpc_reply_type: &'a HubrisEnum,
buf: [u8; 1024], // matches buffer size in `task-udprpc`
buf: Vec<u8>, // sized to match socket buffer size
}

impl<'a> RpcClient<'a> {
Expand All @@ -373,8 +373,8 @@ impl<'a> RpcClient<'a> {
ip: ScopedV6Addr,
timeout: Duration,
) -> Result<Self> {
// Hard-coded socket address, based on Hubris configuration
let target = format!("[{ip}]:998");
let udprpc = hubris.manifest.get_socket_by_task("udprpc")?;
let target = format!("[{ip}]:{}", udprpc.port);

let dest = target.to_socket_addrs()?.collect::<Vec<_>>();
let socket = UdpSocket::bind("[::]:0")?;
Expand All @@ -393,7 +393,8 @@ impl<'a> RpcClient<'a> {
.lookup_enum_byname(hubris, "RpcReply")?
.ok_or_else(|| anyhow!("can't find RpcReply"))?;

Ok(Self { hubris, socket, rpc_reply_type, buf: [0; 1024] })
let buf = vec![0u8; udprpc.tx.bytes];
Ok(Self { hubris, socket, rpc_reply_type, buf })
}

pub fn call(
Expand Down
3 changes: 3 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.chilly.0.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,6 @@
74 DIMM_G1 i2c id=39 temp
75 DIMM_H0 i2c id=40 temp
76 DIMM_H1 i2c id=41 temp
sockets => 1 socket
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,10 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 5 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.counters.0.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,9 @@
74 DIMM_G1 i2c id=61 temp
75 DIMM_H0 i2c id=62 temp
76 DIMM_H1 i2c id=63 temp
sockets => 4 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
mgmt_gateway udp 11111 2048 mgmt_gateway
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,10 @@
130 DIMM_G1 i2c id=74 temp
131 DIMM_H0 i2c id=75 temp
132 DIMM_H1 i2c id=76 temp
sockets => 5 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,7 @@
74 DIMM_G1 i2c id=39 temp
75 DIMM_H0 i2c id=40 temp
76 DIMM_H1 i2c id=41 temp
sockets => 2 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,10 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 5 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
rpc udp 998 1024 udprpc
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.host-panic.0.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.host-panic.1.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.host-panic.2.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.host-panic.3.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.host-panic.4.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,10 @@
130 DIMM_G1 i2c id=74 temp
131 DIMM_H0 i2c id=75 temp
132 DIMM_H1 i2c id=76 temp
sockets => 5 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
6 changes: 6 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.igor.0.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,9 @@
130 DIMM_G1 i2c id=73 temp
131 DIMM_H0 i2c id=74 temp
132 DIMM_H1 i2c id=75 temp
sockets => 4 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,7 @@
74 DIMM_G1 i2c id=39 temp
75 DIMM_H0 i2c id=40 temp
76 DIMM_H1 i2c id=41 temp
sockets => 2 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.ipc-counts.0.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
i2c buses => 1 controller, 1 bus
C PORT MODE NAME DESCRIPTION
2 F init - -
sockets => 1 socket
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,9 @@
130 DIMM_G1 i2c id=73 temp
131 DIMM_H0 i2c id=74 temp
132 DIMM_H1 i2c id=75 temp
sockets => 4 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
3 changes: 3 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.kiowa.26.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
i2c buses => 1 controller, 1 bus
C PORT MODE NAME DESCRIPTION
2 F init - -
sockets => 1 socket
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
7 changes: 7 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.new-ringbuf.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,10 @@
60 V1P8_SYS i2c id=25 current
61 V1P8_SYS i2c id=25 voltage
62 vsc7448 i2c id=26 temp
sockets => 5 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
transceivers udp 11112 2048 transceivers
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,9 @@
130 DIMM_G1 i2c id=73 temp
131 DIMM_H0 i2c id=74 temp
132 DIMM_H1 i2c id=75 temp
sockets => 4 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
6 changes: 6 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.panic-on-boot.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,9 @@
130 DIMM_G1 i2c id=73 temp
131 DIMM_H0 i2c id=74 temp
132 DIMM_H1 i2c id=75 temp
sockets => 4 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,11 @@
94 xcvr29 qsfp temp
95 xcvr30 qsfp temp
96 xcvr31 qsfp temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
transceivers udp 11112 2048 transceivers
3 changes: 3 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.spoopy.0.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,6 @@
58 V12_SYS_A2 i2c id=25 power
59 V12_SYS_A2 i2c id=25 current
60 V12_SYS_A2 i2c id=25 voltage
sockets => 1 socket
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
6 changes: 6 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.sprot_status.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,9 @@
130 DIMM_G1 i2c id=73 temp
131 DIMM_H0 i2c id=74 temp
132 DIMM_H1 i2c id=75 temp
sockets => 4 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
2 F init - -
3 C init - -
4 F init - -
sockets => 1 socket
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
2 F init - -
3 C init - -
4 F init - -
sockets => 1 socket
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
6 changes: 6 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.task.net.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,9 @@
130 DIMM_G1 i2c id=74 temp
131 DIMM_H0 i2c id=75 temp
132 DIMM_H1 i2c id=76 temp
sockets => 4 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
rpc udp 998 1024 udprpc
control_plane_agent udp 11111 2048 control_plane_agent
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.task.power.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
8 changes: 8 additions & 0 deletions humility-bin/tests/cmd/manifest/manifest.u16-ringbuf.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@
130 DIMM_H1 i2c id=74 temp
131 M2_A i2c id=75 temp
132 M2_B i2c id=76 temp
sockets => 6 sockets
NAME KIND PORT RXSIZE OWNER
echo udp 7 1024 udpecho
broadcast udp 997 1024 udpbroadcast
control_plane_agent udp 11111 2048 control_plane_agent
dump_agent udp 11113 1024 dump_agent
inspector udp 23547 512 gimlet_inspector
rpc udp 998 1024 udprpc
Loading
Loading