Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Softnpu jumbo frames #560

Merged
merged 3 commits into from
Oct 31, 2023
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
2 changes: 0 additions & 2 deletions lib/propolis/src/hw/virtio/p9fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ pub trait P9Handler: Sync + Send + 'static {
let len = u32::from_le_bytes(buf[0..4].try_into().unwrap()) as usize;
let typ = MessageType::try_from_primitive(buf[4]).unwrap();

println!("message: {:?}", typ);

match typ {
MessageType::Tversion => {
self.handle_version(&data[..len], &mut chain, &mem)
Expand Down
7 changes: 3 additions & 4 deletions lib/propolis/src/hw/virtio/softnpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ use rand::Rng;
use serde::{Deserialize, Serialize};
use slog::{error, info, warn, Logger};

// TODO make configurable
const MTU: usize = 1600;
// Transit jumbo frames
const MTU: usize = 9216;

const SOFTNPU_CPU_AUX_PORT: u16 = 1000;

Expand Down Expand Up @@ -773,8 +773,7 @@ impl ManagementMessageReader {

fn read(&self) -> ManagementRequest {
loop {
let mut buf = Vec::new();
buf.resize(10240, 0u8);
let mut buf = vec![0; 10240];
let mut i = 0;
let mut in_message = false;
loop {
Expand Down
Loading