From krishna@borg.SFBay.Sun.COM Thu Jul 24 12:11:28 2008
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m6OJBStr014740
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 24 Jul 2008 12:11:28 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m6OJBRuk008047;
	Thu, 24 Jul 2008 12:11:28 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K4I00503YN3LH00@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 24 Jul 2008 12:11:27 -0700 (PDT)
Received: from borg.SFBay.Sun.COM ([10.6.50.138]) by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K4I003D9YN3G110@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 24 Jul 2008 12:11:27 -0700 (PDT)
Received: from borg.SFBay.Sun.COM (localhost [127.0.0.1])
	by borg.SFBay.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m6OJBQ8p014499; Thu,
 24 Jul 2008 12:11:27 -0700 (PDT)
Received: (from krishna@localhost)
	by borg.SFBay.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m6OJBQEi014495; Thu,
 24 Jul 2008 12:11:26 -0700 (PDT)
Date: Thu, 24 Jul 2008 12:11:26 -0700 (PDT)
From: Krishna Yenduri <krishna@borg.SFBay.Sun.COM>
Subject: Add 64-bit htonll() and ntohll() byte order conversion functions
 [PSARC/2008/474 FastTrack timeout 08/01/2008]
To: PSARC-ext@sun.com
Cc: daniel.anderson@sun.com
Message-id: <200807241911.m6OJBQEi014495@borg.SFBay.Sun.COM>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 3871


I am sponsoring this fast track for Dan Anderson. The timer
is set for 08/01/2008. Micro/patch binding is requested.


Template Version: @(#)sac_nextcase 1.66 04/17/08 SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 Add 64-bit htonll() and ntohll() byte order conversion functions
    1.2. Name of Document Author/Supplier:
	 Author:  Dan Anderson
    1.3  Date of This Document:
	24 July, 2008


2. Project Summary
   2.1. Project Description:
	Add 64-bit htonll() and ntohll() byte order conversion functions.  These
	will be implemented in in-line assembly on X86 and are no-ops on SPARC.
	This project combines 3 isolated implementations of this function
	now in Solaris and eases porting 3rd-party software (usually from Linux)
	that uses these functions.

   2.2. Risks and Assumptions:
	htonll() and ntohll() are not in the XPG standard, but are informal
	industry standards.  They must have XPG #if guards in sys/byteorder.h.


4. Technical Description:
    4.1. Details:
	Implement new 64-bit htonll() and ntohll() host/network byte order
	conversion functions, similar to existing htonl() and ntohl() 32-bit
	byte order functions.  These are no-ops on SPARC and in-line assembly
	on i86/amd64.

	Currently, individual command and libraries implement these
	functions separately (in ikeadm, iscsi, and libdhcputil).  This
	project will replace these implementations with a common version.

	htonll() and ntohll() are already implemented in Linux and IBM AIX.
	Third-party source also use these functions (such as Netfilter,
	and Libssh) and have to emulate it on Solaris.  In 2003, a developer
	tried to port OpenNMS to Solaris and posted a question about htnll
	and ntohll missing from Solaris (see reference below).

	The htonll() and ntohll() are not a part of the XPG standard,
	although the 32-bit htonl() and ntohl() are in the standard.

    4.2. Bug/RFE Number(s):
	RFE 5007142 Add ntohll and htonll to sys/byteorder.h
	RFE 6728152 byteorder(3SOCKET) man page changes for ntohll()/htonll()
    
    4.3. In Scope:
	Add htonll and ntohll to Solaris for all processor families (sparc,
	sparcv9, ia32, and amd64).  The sparc and sparcv9 versions are no-ops.

    4.4. Out of Scope:
	Out of scope are BSWAP_*, BE_*, LE_* macros in byteorder.h and
	ddi_swap* functions in the Solaris kernel.
    
    4.5. Interfaces:
	Added these two interfaces to header sys/byteorder.h:
		uint64_t htonll(uint64_t);
		uint64_t ntohll(uint64_t);

	No interfaces imported.

	Stability level is "committed".
	Release binding is Micro/Patch.

    4.6. Doc Impact:
	byteorder(3SOCKET). The diff-marked man page and sys/byteorder.h
        are in the case directory.
   
 
5. Reference Documents:

* Existing ntohl() and htonl() functionality

	* byteorder(3SOCKET) Solaris man page
	* Solaris Header file /usr/include/sys/byteorder.h
	* X/Open Portability Guide (XPG) "System Interfaces and Headers"

* New ntohll() and htonll() functionality

	* Linux 2.6.14+ defines htonll() and ntohll() in /arch/um/drivers/cow.h
	  http://www.koders.com/c/
	     fidE456105223ECDB356A0160C9BC6C65E3D2A7FC20.aspx?s=htonll#L12

	* "htonll Subroutine" and "ntohll Subroutine",
	  IBM AIX "Technical Reference: Communications", volume 2
		http://publib.boulder.ibm.com/infocenter/systems/index.jsp
		   ?topic=/com.ibm.aix.commtechref/doc/commtrf2/htonll.htm
		http://publib.boulder.ibm.com/infocenter/systems/index.jsp
		   ?topic=/com.ibm.aix.commtechref/doc/commtrf2/ntohll.htm

	* Example problem porting an application (OpenNMS) to Solaris without
	htonll/ntohll (2003):
	http://osdir.com/ml/network.opennms.bugs/2003-03/msg00011.html


6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open


From bhargava.yenduri@sun.com Wed Jul 30 10:41:55 2008
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m6UHfsfH023641
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 30 Jul 2008 10:41:55 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id m6UHfmgk022576;
	Thu, 31 Jul 2008 01:41:52 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K4T00C0BYHQC100@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 30 Jul 2008 10:41:50 -0700 (PDT)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.63])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K4T003F9YHQFJ60@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 30 Jul 2008 10:41:50 -0700 (PDT)
Received: from [129.150.12.57]
 (vpn-129-150-12-57.SFBay.Sun.COM [129.150.12.57])	by
 jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3) with ESMTP id m6UHfnkZ119059;
 Wed, 30 Jul 2008 10:41:50 -0700 (PDT)
Date: Wed, 30 Jul 2008 10:41:46 -0700
From: Krishna Yenduri <bhargava.yenduri@sun.com>
Subject: Re: Add 64-bit htonll() and ntohll() byte order conversion functions
 [PSARC/2008/474 FastTrack timeout 08/01/2008]
In-reply-to: <200807241911.m6OJBQEi014495@borg.SFBay.Sun.COM>
To: PSARC-ext@sun.com
Cc: daniel.anderson@sun.com
Message-id: <4890A7DA.2020104@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200807241911.m6OJBQEi014495@borg.SFBay.Sun.COM>
User-Agent: Thunderbird 2.0.0.12 (X11/20080325)
Status: RO
Content-Length: 64

This case was approved during today's PSARC meeting.

-Krishna


