From 235ac7e70c8d8609baeaf1c9c765dd082259f60d Mon Sep 17 00:00:00 2001 From: Anatoly Yakovenko Date: Sun, 27 May 2018 18:55:00 -0700 Subject: [PATCH 1/2] comment on bad blob usage --- src/packet.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/packet.rs b/src/packet.rs index 610ac38affe799..815504d2ab5a0b 100644 --- a/src/packet.rs +++ b/src/packet.rs @@ -246,6 +246,7 @@ pub fn to_blob( let mut b = blob.write().unwrap(); let v = serialize(&resp)?; let len = v.len(); + //TODO: we are not using .data_mut() method here because the raw bytes are being serialized and sent, this isn't the right interface, and we should create a separate path for sending request responses in the RPU b.data[..len].copy_from_slice(&v); b.meta.size = len; b.meta.set_addr(&rsp_addr); From 172bae771b42e0cd4d678d0dfdbaa5d20a2d9fe4 Mon Sep 17 00:00:00 2001 From: Anatoly Yakovenko Date: Tue, 29 May 2018 16:32:01 -0700 Subject: [PATCH 2/2] breaks --- src/packet.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/packet.rs b/src/packet.rs index 815504d2ab5a0b..5fdcab1acb59c2 100644 --- a/src/packet.rs +++ b/src/packet.rs @@ -246,7 +246,10 @@ pub fn to_blob( let mut b = blob.write().unwrap(); let v = serialize(&resp)?; let len = v.len(); - //TODO: we are not using .data_mut() method here because the raw bytes are being serialized and sent, this isn't the right interface, and we should create a separate path for sending request responses in the RPU + // TODO: we are not using .data_mut() method here because + // the raw bytes are being serialized and sent, this isn't the + // right interface, and we should create a separate path for + // sending request responses in the RPU b.data[..len].copy_from_slice(&v); b.meta.size = len; b.meta.set_addr(&rsp_addr);