<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Currently libvirt provides lots of useful information on the HW capabilities of the host and its attached devices. I’m interested in extending the HW capability discovery of libvirt, to a point where it is capable of discovering the HW
 offload capabilities of host PCI devices. Take a NIC for example, this feature would enable libvirt discover the supported NIC offload features, csum, tso, etc.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So where might a feature like this be used. Consider an Openstack deployment, a VM may have a workload that depends on specific NIC HW offload capabilities in order to stay within certain throughput, CPU utilisation or latency thresholds.
 For this scenario, it’s important that the VM is placed on a host with PCI devices that provide the required NIC HW offload capabilities. If libvirt could provide this functionality, this information could be used during the VM scheduling phase when all nodes
 are evaluated for their suitability.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">From what I understand, libvirt currently uses ioctl’s to get the NIC state, MTU, etc. Could the ethtool ioctl framework be used to discover the HW offload features provided by the hosts network controllers.
<o:p></o:p></p>
<p class="MsoNormal">E.g.<o:p></o:p></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt">
<span lang="EN-GB" style="font-size:11.0pt;font-family:Symbol">·</span><span lang="EN-GB" style="font-size:7.0pt">        
</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">ETHTOOL_GRXCSUM
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt">
<span lang="EN-GB" style="font-size:11.0pt;font-family:Symbol">·</span><span lang="EN-GB" style="font-size:7.0pt">        
</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">ETHTOOL_GTXCSUM
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt">
<span lang="EN-GB" style="font-size:11.0pt;font-family:Symbol">·</span><span lang="EN-GB" style="font-size:7.0pt">        
</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">ETHTOOL_GTSO
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt">
<span lang="EN-GB" style="font-size:11.0pt;font-family:Symbol">·</span><span lang="EN-GB" style="font-size:7.0pt">        
</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">ETHTOOL_GFLAGS<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So I’m looking for your opinions on this feature proposal, does it make sense, is it already being worked on<u><span style="color:#1F497D">.</span></u><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">James<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>