<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Alan,<o:p></o:p></p>
<p class="MsoNormal">I agree that NetworkInterface would probably benefit from FFM, but FFM isn’t finalized yet. So is it even okay to use FFM in a proposed patch?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">More importantly, rewriting NetworkInterface to use FFM would require touching every platform, and I don’t have good ways to test anything other than Windows and Linux. That would also be a much larger effort that I’m not sure I have time
for right now. Still, I think there could be some benefit in overhauling the existing JNI code, without touching anything on the Java side. At a minimum, it would make the native code a lot easier to port to FFM at some later date.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<table class="MsoTableGrid" border="0" cellspacing="0" cellpadding="0" width="672" style="border-collapse:collapse;border:none">
<tbody>
<tr style="height:22.55pt;mso-height-rule:exactly">
<td width="90" rowspan="2" style="width:67.5pt;border:none;border-right:solid #005383 1.0pt;padding:0in 5.4pt 0in 5.4pt;height:22.55pt;mso-height-rule:exactly">
<p class="MsoNormal"><a href="http://www.scientificgames.com/"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:windowtext;text-transform:uppercase;text-decoration:none"><img border="0" width="66" height="60" style="width:.6875in;height:.625in" id="Picture_x0020_12" src="cid:image001.png@01D93B0E.6E500860" alt="Logo
Description automatically generated"></span></a><span style="font-family:"Arial",sans-serif;text-transform:uppercase"><o:p></o:p></span></p>
</td>
<td width="580" style="width:434.7pt;border:none;padding:0in 5.4pt 0in 5.4pt;height:22.55pt;mso-height-rule:exactly">
<p class="MsoNormal" style="margin-left:8.2pt"><b><span style="font-family:"Arial",sans-serif;color:#005383">Rich DiCroce</span></b><span style="font-family:"Arial",sans-serif;color:#005383"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:8.2pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Senior Advanced Solutions Architect<u><span style="text-transform:uppercase"><o:p></o:p></span></u></span></p>
</td>
<td style="border:none;padding:0in 0in 0in 0in" width="2">
<p class="MsoNormal"> </p>
</td>
</tr>
<tr style="height:.5in">
<td width="580" style="width:434.7pt;border:none;padding:0in 5.4pt 0in 5.4pt;height:.5in">
<p class="MsoNormal" style="margin-left:8.2pt"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Scientific Games<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:8.2pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:8.2pt"><u><span style="font-size:9.0pt;font-family:"Arial",sans-serif;text-transform:uppercase"><o:p><span style="text-decoration:none"> </span></o:p></span></u></p>
</td>
<td style="border:none;padding:0in 0in 0in 0in" width="2">
<p class="MsoNormal"> </p>
</td>
</tr>
<tr style="height:22.5pt">
<td width="672" colspan="3" style="width:7.0in;padding:0in 5.4pt 0in 5.4pt;height:22.5pt">
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#005383;text-transform:uppercase">HAVE FUN. DO GOOD.
<b>PLAY HEALTHY.</b></span><span style="font-family:"Arial",sans-serif;text-transform:uppercase"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:18.45pt">
<td width="672" colspan="3" style="width:7.0in;padding:0in 5.4pt 0in 5.4pt;height:18.45pt">
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#A6A6A6">May be privileged. May be confidential. Please delete if not the addressee.</span><u><span style="font-family:"Arial",sans-serif;text-transform:uppercase"><o:p></o:p></span></u></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Alan Bateman <Alan.Bateman@oracle.com> <br>
<b>Sent:</b> Tuesday, February 7, 2023 3:23 PM<br>
<b>To:</b> DiCroce, Richard <Rich.DiCroce@scientificgames.com>; net-dev@openjdk.org<br>
<b>Subject:</b> Re: Performance of NetworkInterface methods on Windows<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#3478AE;padding:0in 3.0pt 0in 3.0pt"></td>
<td style="background:#004B87;padding:0in 11.25pt 0in 11.25pt">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:white">WARNING:</span></b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:white"> This is an external email. Do not click links or open attachments unless you recognize
the sender and know the content is safe. </span><span style="color:#212121"><o:p></o:p></span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 07/02/2023 20:06, DiCroce, Richard wrote:<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">: <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I’d also like to get your thoughts on a possible second patch that would be more extensive and might contain some functional changes. The current code is a little messy and uses some ancient APIs. Some initial experiments suggest that newer
APIs (available since Vista/Server 2008) would be faster. The current code also invents its own interface naming scheme. Windows now has APIs for that (e.g. ConvertInterfaceLuidToNameW), but switching to those would obviously mean that getName() would return
a different value than it does today. getByName() would also need to be adjusted, but I could code it such that it tries the Windows APIs first and then falls back to the existing code, in order to minimize breakage. So, given those caveats, do you think such
a patch would have any chance of being accepted? Or would any breaking changes be a no-go?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</blockquote>
<p class="MsoNormal">I think it would be good to use the Windows interface names. The reason for the netNNN names is that there wasn't any Win32 APIs to get interface names when this code was originally written for JDK 1.4. It should have been re-visited a
long time ago. That said, I think NetworkInterface is a good candidate to re-implement completely in Java using the Panama FFM API so that the existing JNI code can go away. As always, the main issues are getting Reviewer cycles and testing to make sure that
there aren't any regressions in unusual configurations. So I think start with the performance improvement at least.<br>
<br>
-Alan<o:p></o:p></p>
</div>
</div>
</body>
</html>