Skip to content

Conversation

@Lethe10137
Copy link
Member

Make external veth pair optional

Comment on lines +160 to +165
#[cfg_attr(feature = "serde", serde(default))]
pub left_external_veth: bool,

#[cfg_attr(feature = "serde", serde(default))]
pub right_external_veth: bool,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather it be an enum so that we can extend to more options besides veth. Default to optional. Rename to left_external and right_external. Currently, we can have veth only as an option.

Comment on lines +192 to +193
pub left_pairs: BTreeMap<usize, Arc<VethPair>>,
pub right_pairs: BTreeMap<usize, Arc<VethPair>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this change is necessary

Comment on lines +20 to +21
use rattan_core::metal::io::af_xdp::XDPDriver as RattanPacketDriver;
use rattan_core::metal::io::af_xdp::XDPPacket as RattanPacket;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should still be in one line

Duration::try_from(span)
}

fn add_env(handle: &mut Command, ip_list: Vec<(usize, IpAddr)>) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The env is conflicted with Env conceptually, so we should rename this method, e.g., add_ip_addr_env_var or something else.

Duration::try_from(span)
}

fn add_env(handle: &mut Command, ip_list: Vec<(usize, IpAddr)>) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make it a common function that can be used both by main and main-xdp. Remeber to define it at rattan crate not rattan-core crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants