X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C80489.57E781A1@onstor-exch02.onstor.net>; Mon, 1 Oct 2007 16:15:31 -0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C80489.57E781A1"
Content-class: urn:content-classes:message
Subject: RE: getsocketname()
Date: Mon, 1 Oct 2007 16:15:31 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E030E3868@onstor-exch02.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E05CB7F94@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: getsocketname()
Thread-Index: AcgEg5JzXxphrGTSQGi+mlLeCdw3PwAALcCgAAAtGRAAAF6RMAAAAYuQAABlc6AAAA9RMA==
From: "Mike Lee" <mike.lee@onstor.com>
To: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>,
	"dl-Cougar" <dl-Cougar@onstor.com>

This is a multi-part message in MIME format.

------_=_NextPart_001_01C80489.57E781A1
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Max:
Thanks for the offer, and consistent behavior as the BSD version would
be perferred.
I am assuming that BSD is preserving the other fields and not just
blindly returning 2 in the plane field.
I assume you still prefer want the test utilities to test your change?
-Mike

>  -----Original Message-----
> From: 	Maxim Kozlovsky =20
> Sent:	Monday, October 01, 2007 5:11 PM
> To:	Mike Lee; dl-Cougar
> Subject:	RE: getsocketname()
>=20
> OK I can make it return 2 if that is what you need.
>=20
> _____________________________________________
> From: Mike Lee=20
> Sent: Monday, October 01, 2007 5:02 PM
> To: Maxim Kozlovsky; dl-Cougar
> Subject: RE: getsocketname()
>=20
> Max:
>=20
> When the NDMP daemon on the SSC opens a RMC channel with the FP, the
> NDMP code on the FP uses the incoming address to open another RMC
> channel in the reverse direction (back to SSC).
> As such, the RMC initialized address from the SSC to the FP needs to
> have the the proper plane/slot/cpu specified.
> In BSD bobcat, the cpu and slot are indeed zero, but the plane was 2.
>=20
> -Mike
>=20
> 	 -----Original Message-----
> 	From: 	Maxim Kozlovsky =20
> 	Sent:	Monday, October 01, 2007 4:58 PM
> 	To:	Mike Lee; dl-Cougar
> 	Subject:	RE: getsocketname()
>=20
> 	For SSC, the plane/cpu/slot_id is always zero. Why would your
> application depend on those fields being "preserved"?=20
>=20
> 	_____________________________________________
> 	From: Mike Lee=20
> 	Sent: Monday, October 01, 2007 4:54 PM
> 	To: Maxim Kozlovsky; dl-Cougar
> 	Subject: RE: getsocketname()
>=20
> 	Max:
> 	Thanks. I'll look into it.
>=20
> 	However, as a summary, when we call rmc_internal_socket() from
> rmc_listen_ex(), the rmc session laddr (local address) would have the
> plane, cpu, and slot id fields set already.
> 	Then, inside rmc_interal_socket(), we call getsocketname() to
> set the app field of the EEE address.
> 	While BSD version of getsocketname preserves the other fields
> (plane, cpu, and slot id), the linux version seems to wipe them out.
>=20
> 	I'll keep you posted on the test.
> 	-Mike
>=20
> 		 -----Original Message-----
> 		From: 	Maxim Kozlovsky =20
> 		Sent:	Monday, October 01, 2007 4:41 PM
> 		To:	Mike Lee; dl-Cougar
> 		Subject:	RE: getsocketname()
>=20
> 		If you can write a test that shows the difference and
> add it to code/ssc-tests/anpssctest, I can take a look.
>=20
> 		_____________________________________________
> 		From: Mike Lee=20
> 		Sent: Monday, October 01, 2007 4:38 PM
> 		To: dl-Cougar
> 		Subject: getsocketname()
>=20
> 		Team:
>=20
> 		I'm investigating a RMC misbehavior in the bobcat-linux
> code, and I've narrowed it down to the network function getsockname(),
> which is called by rmc_internal_socket().
>=20
> 		I believe we're calling it to retrieve the kernel
> assigned port number and using it as the EEE app id. =20
>=20
> 		My question is, do we have our own implementation of
> getsocketname() for linux?
>=20
> 		The reason is that the two versions (BSD verus Linux)
> are behaving differently, and causing incorrect RMC routing on my
> filer.
>=20
> 		Thanks.
>=20
> 		-Mike
>=20
>=20

------_=_NextPart_001_01C80489.57E781A1
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7652.24">
<TITLE>RE: getsocketname()</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=3DLTR><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">Max:</FONT></P>

<P DIR=3DLTR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Thanks for =
the offer, and consistent behavior as the BSD version would be =
perferred.</FONT></P>

<P DIR=3DLTR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">I am =
assuming that BSD is preserving the other fields and not just blindly =
returning 2 in the plane field.</FONT></P>

<P DIR=3DLTR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">I assume =
you still prefer want the test utilities to test your change?</FONT></P>

<P DIR=3DLTR><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">-Mike</FONT></P>
<UL DIR=3DLTR>
<P DIR=3DLTR><FONT FACE=3D"Arial"><SPAN =
LANG=3D"en-us"></SPAN></FONT><SPAN LANG=3D"en-us">&nbsp;<FONT SIZE=3D1 =
FACE=3D"Tahoma">-----Original Message-----</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">From: &nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Maxim Kozlovsky&nbsp; </FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">Sent:&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Monday, October 01, 2007 5:11 PM</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">To:&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Mike Lee; dl-Cougar</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>=
</B> <FONT SIZE=3D1 FACE=3D"Tahoma">RE: =
getsocketname()</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">OK I can make it return 2 if that is what you =
need.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma">_____________________________________________<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">From:</FONT></B><FONT SIZE=3D2 FACE=3D"Tahoma"> Mike =
Lee<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">Sent:</FONT></B><FONT SIZE=3D2 =
FACE=3D"Tahoma"> Monday, October 01, 2007 5:02 PM<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">To:</FONT></B><FONT SIZE=3D2 =
FACE=3D"Tahoma"> Maxim Kozlovsky; dl-Cougar<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">Subject:</FONT></B><FONT =
SIZE=3D2 FACE=3D"Tahoma"> RE: getsocketname()</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">Max:</FONT></SPAN></P>
<BR>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">When the NDMP daemon on the SSC opens a RMC channel with =
the FP, the NDMP code on the FP uses the incoming address to open =
another RMC channel in the reverse direction (back to =
SSC).</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">As such, the RMC initialized address from the SSC to the =
FP needs to have the the proper plane/slot/cpu =
specified.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">In BSD bobcat, the cpu and slot are indeed zero, but the =
plane was 2.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">-Mike</FONT></SPAN></P>
<UL DIR=3DLTR>
<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT =
FACE=3D"Arial"></FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us">&nbsp;<FONT SIZE=3D1 FACE=3D"Tahoma">-----Original =
Message-----</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">From: &nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Maxim Kozlovsky&nbsp; </FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">Sent:&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Monday, October 01, 2007 4:58 PM</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">To:&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Mike Lee; dl-Cougar</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>=
</B> <FONT SIZE=3D1 FACE=3D"Tahoma">RE: =
getsocketname()</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">For SSC, the plane/cpu/slot_id is always zero. Why would =
your application depend on those fields being &#8220;preserved&#8221;? =
</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma">_____________________________________________<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">From:</FONT></B><FONT SIZE=3D2 FACE=3D"Tahoma"> Mike =
Lee<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">Sent:</FONT></B><FONT SIZE=3D2 =
FACE=3D"Tahoma"> Monday, October 01, 2007 4:54 PM<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">To:</FONT></B><FONT SIZE=3D2 =
FACE=3D"Tahoma"> Maxim Kozlovsky; dl-Cougar<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">Subject:</FONT></B><FONT =
SIZE=3D2 FACE=3D"Tahoma"> RE: getsocketname()</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">Max:</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">Thanks. I'll look into it.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">However, as a summary, when we call rmc_internal_socket() =
from rmc_listen_ex(), the rmc session laddr (local address) would have =
the plane, cpu, and slot id fields set already.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">Then, inside rmc_interal_socket(), we call =
getsocketname() to set the app field of the EEE =
address.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">While BSD version of getsocketname preserves the other =
fields (plane, cpu, and slot id), the linux version seems to wipe them =
out.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">I'll keep you posted on the test.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">-Mike</FONT></SPAN></P>
<UL DIR=3DLTR>
<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT =
FACE=3D"Arial"></FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us">&nbsp;<FONT SIZE=3D1 FACE=3D"Tahoma">-----Original =
Message-----</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">From: &nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Maxim Kozlovsky&nbsp; </FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">Sent:&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Monday, October 01, 2007 4:41 PM</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">To:&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 =
FACE=3D"Tahoma">Mike Lee; dl-Cougar</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><B><FONT SIZE=3D1 =
FACE=3D"Tahoma">Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>=
</B> <FONT SIZE=3D1 FACE=3D"Tahoma">RE: =
getsocketname()</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">If you can write a test that shows the difference and add =
it to code/ssc-tests/anpssctest, I can take a look.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma">_____________________________________________<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">From:</FONT></B><FONT SIZE=3D2 FACE=3D"Tahoma"> Mike =
Lee<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">Sent:</FONT></B><FONT SIZE=3D2 =
FACE=3D"Tahoma"> Monday, October 01, 2007 4:38 PM<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">To:</FONT></B><FONT SIZE=3D2 =
FACE=3D"Tahoma"> dl-Cougar<BR>
</FONT><B><FONT SIZE=3D2 FACE=3D"Tahoma">Subject:</FONT></B><FONT =
SIZE=3D2 FACE=3D"Tahoma"> getsocketname()</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">Team:</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">I'm =
investigating a RMC misbehavior in the bobcat-linux code, and I've =
narrowed it down to the network function getsockname(), which is called =
by rmc_internal_socket().</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">I =
believe we're calling it to retrieve the kernel assigned port number and =
using it as the EEE app id.&nbsp; </FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">My =
question is, do we have our own implementation of getsocketname() for =
linux?</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">The =
reason is that the two versions (BSD verus Linux) are behaving =
differently, and causing incorrect RMC routing on my =
filer.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">Thanks.</FONT></SPAN></P>

<P DIR=3DLTR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">-Mike</FONT></SPAN></P>
<BR>
</UL></UL></UL>
</BODY>
</HTML>
------_=_NextPart_001_01C80489.57E781A1--
