<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Stefano<br>
</p>
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
> <font size="2"><span style="font-size:11pt;">- Host: assign the same CID of VMs running in different network<br>
> namespaces</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;"><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;">this means two VMs running in different namespace can use the same CID? currently we use
<span class="pl-c">VHOST_VSOCK_SET_GUEST_CID</span> to get a unique context ID, is this going to change?</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;"><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;"><font size="2"><span style="font-size:11pt;">> 1. Is the VMM (e.g. QEMU) running in a network namespace?</span></font><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;"><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;">yes, see <a href="https://github.com/kata-containers/runtime/blob/62cd08044d78912228d9dc800cb1b8bd3de3b971/virtcontainers/sandbox.go#L1024-L1041" class="OWAAutoLink" id="LPlnk593251" previewremoved="true">https://github.com/kata-containers/runtime/blob/62cd08044d78912228d9dc800cb1b8bd3de3b971/virtcontainers/sandbox.go#L1024-L1041</a><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;"><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;"><font size="2"><span style="font-size:11pt;">> 2. Is the host application, that use vsock to communicate with the<br>
> guest, running in the same network namespace?</span></font><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;"><br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:11pt;">afaik, no<br>
</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
> <font size="2"><span style="font-size:11pt;">3. Is the agent in the guest running outside a netns (default init_netns)?</span></font></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
yes<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Stefano Garzarella <sgarzare@redhat.com><br>
<b>Sent:</b> Wednesday, December 4, 2019 4:32 AM<br>
<b>To:</b> kata-dev@lists.katacontainers.io <kata-dev@lists.katacontainers.io><br>
<b>Subject:</b> [kata-dev] vsock & network namespaces in Kata</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi folks,<br>
I'm working on vsock on Linux and I'm adding the network namespace<br>
support on it[1].<br>
<br>
The main changes are the following:<br>
- Guest: can talk with the host packets (send and receive packets) in<br>
the default init_netns (maybe we can make it configurable)<br>
- Host: can talk with the guest only in the same netns where the VMM is<br>
running (e.g. if we start qemu from ns1, all packets are received only<br>
in ns1)<br>
- Host: assign the same CID of VMs running in different network<br>
namespaces<br>
- Nested VMs (available from Linux 5.5): isolate host applications from<br>
guest applications<br>
<br>
IIUC you have a runtime running in the host that communicates using<br>
vsock with an agent in the guest.<br>
I have few questions:<br>
1. Is the VMM (e.g. QEMU) running in a network namespace?<br>
2. Is the host application, that use vsock to communicate with the<br>
guest, running in the same network namespace?<br>
3. Is the agent in the guest running outside a netns (default init_netns)?<br>
<br>
<br>
If you have any other suggestions, I'd be happy to hear them.<br>
<br>
Thanks,<br>
Stefano<br>
<br>
<br>
_______________________________________________<br>
kata-dev mailing list<br>
kata-dev@lists.katacontainers.io<br>
<a href="http://lists.katacontainers.io/cgi-bin/mailman/listinfo/kata-dev" id="LPlnk24889" class="OWAAutoLink" previewremoved="true">http://lists.katacontainers.io/cgi-bin/mailman/listinfo/kata-dev</a><br>
</div>
</span></font></div>
</div>
</div>
</div>
</body>
</html>