On Tue, Apr 28, 2020 at 04:13:22PM +0800, Jason Wang wrote:
On 2020/4/27 äå10:25, Stefano Garzarella wrote:Thanks Jason!
Hi David, Michael, Stefan,As we've discussed, it should be a netdev probably in either guest or host
I'm restarting to work on this topic since Kata guys are interested to
have that, especially on the guest side.
While working on the v2 I had few doubts, and I'd like to have your
suggestions:
1. netns assigned to the device inside the guest
Currently I assigned this device to 'init_net'. Maybe it is better
if we allow the user to decide which netns assign to the device
or to disable this new feature to have the same behavior as before
(host reachable from any netns).
I think we can handle this in the vsock core and not in the single
transports.
The simplest way that I found, is to add a new
IOCTL_VM_SOCKETS_ASSIGN_G2H_NETNS to /dev/vsock to enable the feature
and assign the device to the same netns of the process that do the
ioctl(), but I'm not sure it is clean enough.
Maybe it is better to add new rtnetlink messages, but I'm not sure if
it is feasible since we don't have a netdev device.
What do you suggest?
side. And it would be much simpler if we want do implement namespace then.
No new API is needed.
It would be cool, but I don't have much experience on netdev.
Do you see any particular obstacles?
I'll take a look to understand how to do it, surely in the guest would
be very useful to have the vsock device as a netdev and maybe also in the host.
Stefano