<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hi,</div>
<div> </div>
<div>I have noticed there are more and more developers who are interested in Cyborg at PTG, and there are also some valuable outputs after this PTG.</div>
<div>According to the summary at this PTG(<a href="https://etherpad.openstack.org/p/cyborg-nova-ptg-stein"><font color="#0563C1"><u>https://etherpad.openstack.org/p/cyborg-nova-ptg-stein</u></font></a> ), 4 possible solutions about how Nova interact with Cyborg
are proposed, including device profile proposal, device context etc. And the 4<font size="1"><span style="font-size:7.3pt;"><sup>th</sup></span></font> solution(from Jay) is very similar with my draft implementation before PTG, and now I have submitted to upstream.</div>
<div><font face="Times New Roman"> </font></div>
<div>FYI, the original description of 4<font size="1"><span style="font-size:7.3pt;"><sup>th</sup></span></font> solution in etherpad as below: (<a href="https://etherpad.openstack.org/p/cyborg-nova-ptg-stein"><font color="#0563C1"><u>https://etherpad.openstack.org/p/cyborg-nova-ptg-stein</u></font></a>
, L112-L123):</div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>a) CTX_UUID=$(cyborg device-context-create --resources=FPGA_GZIP:1 --requires=SOME_FOO_CAPABILITY --config-data=key1:val1) **or** cyborg device-context-create --device-profile-id=$PROFILE_ID</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>++</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>alex: the different is just create context/profile on the fly?</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>Is $CTX_UUID a profile or a specific instance? If the former, this is #1; if the latter, it is #2</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>(jaypipes) it's neither. It's the equivalent of a port binding request, just for an accelerator or super amazing device thingy. It's not like #1 because the device context is (eventually) bound to
an instance and a specific device/slot identifier. It's not like #2 because it's not pre-creating any device.</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>(efried) oh, okay, so it's kind of like a "dynamic profile" - it only exists as long as this request. It's the equivalent of a Neutron port (bind request) or a Cinder attachment ID. Ight.</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>b) nova boot --device-context-id=$CTX_UUID</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>c) placement finds a compute node that has availability for 1 FPGA_GZIP and has SOME_FOO_CAPABILITY</i></font></div>
<div style="padding-left:36pt;"><font face="Calibri Light"><i>d) nova-conductor sends async call to Cyborg to identify a specific slot on the chosen compute host to start dedicating to the instance. This step could be called "pre_bind()" or something like that?</i></font></div>
<div><font face="Times New Roman"> </font></div>
<div>My current code will work like this: when a new VM request comes in to Nova, the info about the acceleration device is stored in device-context, there will be ‘resources’ field and ‘required traits’ field. After selected a host by invoking placement, nova
should call Cyborg API to allocate one accelerators(binding) on the selected host. The Cyborg’s allocation API[1] will do that. But before that, nova should firstly invoke the parser() function in OS-ACC [2] to parse the device-context to the acceptable parameters
in order to call Cyborg API with them. And OS-ACC also provides the attach() function for PCI device to generate the xml file.</div>
<div><font face="Times New Roman"> </font></div>
<div>Hope my code can help to move faster for this problem, and welcome reviews.</div>
<div><font face="Times New Roman"> </font></div>
<div>Ref.</div>
<div>[1] Cyborg will provide 2 RESTFul APIs to do allocation(binding) and deallocation(unbinding) like described in <a href="https:/review.openstack.org/#/c/596187/"><font color="#0563C1"><u>https:/review.openstack.org/#/c/596187/</u></font></a> and <a href="https://review.openstack.org/#/c/597991/"><font color="#0563C1"><u>https://review.openstack.org/#/c/597991/</u></font></a>
.</div>
<div>[2] The parser in OS-ACC to help parse these parameters into an acceptable format in order to invoke Cyborg API with them when binding or unbinding. The parser’s related patch is the following: <a href="https://review.openstack.org/#/c/606036/"><font color="#0563C1"><u>https://review.openstack.org/#/c/606036/</u></font></a>.</div>
<div><font face="Times New Roman"> </font></div>
<div>Thanks,</div>
<div>Xin-Ran</div>
<div><font face="Times New Roman"> </font></div>
<div><font face="Times New Roman"> </font></div>
<div><font face="Times New Roman"> </font></div>
</span></font>
</body>
</html>