Skip to content

Conversation

slp
Copy link
Collaborator

@slp slp commented Jul 1, 2025

Implement a new backend that allows network interfaces to use a tap device on the host to read/write frames.

@slp slp marked this pull request as draft July 1, 2025 15:13
@slp slp force-pushed the net-tap branch 7 times, most recently from c675d96 to 1c53e25 Compare July 10, 2025 06:56
@slp slp marked this pull request as ready for review July 10, 2025 07:05
@slp slp force-pushed the net-tap branch 3 times, most recently from 0ebad2c to 4e51a43 Compare July 25, 2025 07:31
@slp
Copy link
Collaborator Author

slp commented Jul 25, 2025

Copy link
Collaborator

@mtjhrc mtjhrc left a comment

Choose a reason for hiding this comment

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

Looks good, please fix the cfg! comment.
I'm not sure how we want to handle enabling the features/offload, if we hardcode them then why do we let the user specify the virtio features.

Copy link
Member

@jakecorrenti jakecorrenti left a comment

Choose a reason for hiding this comment

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

Other than the comments that Matej already made, this looks good to me.

Apologies for the delay, this one fell through the cracks.

@slp slp force-pushed the net-tap branch 3 times, most recently from 4e3b406 to b5e6cf9 Compare August 6, 2025 12:01
slp added 2 commits August 6, 2025 14:02
We're going to use it from different modules, so move them upper in the
crate.

Signed-off-by: Sergio Lopez <[email protected]>
We're going to incorporate a new backend that doesn't require us to
write the header on each frame, so move this functionality from the
worker to each backend.

Signed-off-by: Sergio Lopez <[email protected]>
@slp slp force-pushed the net-tap branch 2 times, most recently from 0a09706 to 1ef4f3a Compare August 6, 2025 14:22
slp added 3 commits August 6, 2025 16:26
Implement a new backend that allows network interfaces to use a tap
device on the host to read/write frames.

Signed-off-by: Sergio Lopez <[email protected]>
With the new API, as we're actively participating in opening the
connection to the network proxy, the creation of the virtio-net backend
may fail. Avoid using "unwrap" and fail gracefully on device activation
instead.

Signed-off-by: Sergio Lopez <[email protected]>
We had cfg! checks for net on methods that are only present if net is
enabled, so let's remove them.

Suggested-by: Matej Hrica <[email protected]>
Signed-off-by: Sergio Lopez <[email protected]>
@slp
Copy link
Collaborator Author

slp commented Aug 8, 2025

@mtjhrc PTAL

@slp
Copy link
Collaborator Author

slp commented Aug 26, 2025

@mtjhrc do we need any more changes to this PR?

Copy link
Collaborator

@mtjhrc mtjhrc left a comment

Choose a reason for hiding this comment

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

LGTM now

@slp slp merged commit 4a4e83a into containers:main Aug 26, 2025
12 of 15 checks passed
@slp slp deleted the net-tap branch August 26, 2025 14:14
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