X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C80486.4CECAAE0@onstor-exch02.onstor.net>; Mon, 1 Oct 2007 15:53:44 -0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C80486.4CECAAE0"
Content-class: urn:content-classes:message
Subject: RE: getsocketname()
Date: Mon, 1 Oct 2007 15:53:44 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E030E3866@onstor-exch02.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E05CB7F63@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: getsocketname()
Thread-Index: AcgEg5JzXxphrGTSQGi+mlLeCdw3PwAALcCgAAAtGRA=
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_01C80486.4CECAAE0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Max:
Thanks. I'll look into it.

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.

I'll keep you posted on the test.
-Mike

>  -----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_01C80486.4CECAAE0
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. =
I'll look into it.</FONT></P>

<P DIR=3DLTR><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></P>

<P DIR=3DLTR><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></P>

<P DIR=3DLTR><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></P>

<P DIR=3DLTR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">I'll keep =
you posted on the test.</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 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>
</BODY>
</HTML>
------_=_NextPart_001_01C80486.4CECAAE0--
