drtio-mgmt: fix len order

This commit is contained in:
occheung 2024-08-23 13:10:20 +08:00
parent f7e2089b5b
commit be1f34bf7b
2 changed files with 5 additions and 5 deletions

View File

@ -351,7 +351,7 @@ mod remote_coremgmt {
let mut buffer = Vec::<u8>::new();
loop {
match reply {
Packet::CoreMgmtConfigReadReply { length, last, value } => {
Packet::CoreMgmtConfigReadReply { last, length, value } => {
buffer.extend(&value[..length as usize]);
if last {
@ -403,8 +403,8 @@ mod remote_coremgmt {
message.get_ref(),
|slice, status, len: usize| Packet::CoreMgmtConfigWriteRequest {
destination: destination,
length: len as u16,
last: status.is_last(),
length: len as u16,
data: *slice,
},
|reply| match reply {

View File

@ -1140,8 +1140,8 @@ fn process_aux_packet(
drtioaux::send(
0,
&drtioaux::Packet::CoreMgmtConfigReadReply {
length: meta.len as u16,
last: meta.status.is_last(),
length: meta.len as u16,
value: value_slice,
},
)
@ -1169,16 +1169,16 @@ fn process_aux_packet(
drtioaux::send(
0,
&drtioaux::Packet::CoreMgmtConfigReadReply {
length: meta.len as u16,
last: meta.status.is_last(),
length: meta.len as u16,
value: value_slice,
},
)
}
drtioaux::Packet::CoreMgmtConfigWriteRequest {
destination: _destination,
length,
last,
length,
data,
} => {
forward!(