From sacadmin Tue Jul 21 09:37:37 2009
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n6LGbbEs015727;
	Tue, 21 Jul 2009 09:37:37 -0700 (PDT)
Received: (from dr146992@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id n6LGba9X015723;
	Tue, 21 Jul 2009 09:37:37 -0700 (PDT)
Date: Tue, 21 Jul 2009 09:37:37 -0700 (PDT)
From: Darren Reed <dr146992@sac.sfbay.sun.com>
Message-Id: <200907211637.n6LGba9X015723@sac.sfbay.sun.com>
To: PSARC-record@sac.sfbay.sun.com
Subject: kstats for ipnet [PSARC/2009/403 Self Review]
Status: RO
Content-Length: 548


Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 kstats for ipnet
    1.2. Name of Document Author/Supplier:
	 Author:  Darren Reed
    1.3  Date of This Document:
	21 July, 2009
4. Technical Description
    See the case directory for more detail

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


From Darren.Reed@sun.com Tue Jul 21 09:43:38 2009
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 n6LGhbKC015892
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 21 Jul 2009 09:43:38 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n6LGhOsU000789
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 22 Jul 2009 00:43:36 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KN50020N54NOU00@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 10:43:35 -0600 (MDT)
Received: from gmp-eb-inf-1.sun.com ([192.18.6.21])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KN5000EN54KF820@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 21 Jul 2009 10:43:33 -0600 (MDT)
Received: from fe-emea-10.sun.com
 (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged))
	by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n6LGhWUQ000057	for
 <PSARC-ext@sun.com>; Tue, 21 Jul 2009 16:43:32 +0000 (GMT)
Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 id <0KN500B004YEV200@fe-emea-10.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 17:43:09 +0100 (BST)
Received: from [76.191.212.119] ([unknown] [76.191.212.119])
 by fe-emea-10.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 with ESMTPSA id <0KN5005W153W5VB0@fe-emea-10.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 17:43:09 +0100 (BST)
Date: Tue, 21 Jul 2009 09:43:03 -0700
From: Darren Reed <Darren.Reed@sun.com>
Subject: kstats for ipnet [PSARC/2009/403 Self Review]
Sender: Darren.Reed@sun.com
To: PSARC-EXT <PSARC-ext@sun.com>
Message-id: <4A65F017.60609@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
Status: RO
Content-Length: 1456

I'm filing this as self sponsored fast track. This case seeks minor
binding; there are no plans to backport it to an update release.
As the nature of this case is extremely straight forward, it is
being submitted as an automatic, closed, case.

Problem
-------
Looking at ipnet, there is no instrumentation to tell an observer about
how it is functioning. No statistics are available about whether or not
it runs out of buffers, how many packets get accepted vs rejected, etc.

Proposal
--------
This document proposes to add kstats to ipnet to provide statistics
about how the ipnet module is performing. The statistics proposed at
this stage are will be provided per stack instance and will be visible
inside the respective zone.

duplicationFail - packet duplicate prior to dispatch failed
dispatchOk - ddi_dispatch succeeded
dispatchFail - ddi_dispatch failed
dispatchHeaderDrop - ipnet_addheader caused packet to be dropped
dispatchPutDrop - packet dropped: cannot put packet on queue
dispatchDupDrop - packet dropped: copymsg/dupmsg fail in ipnet_dispatch
dispatchDeliver - packet delivered with putnext/putq
acceptOk - accept packet filter function wants the packet
acceptFail - accept packet filter function rejects the packet

The statistics will be local to each zone with its own stack instance.

These kstats will be delivered under module "ipnet", name "ipnet_stats"
and class "misc".

All of the interfaces being introduced are uncommitted.


From Sebastien.Roy@sun.com Tue Jul 21 11:02:18 2009
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 n6LI2I4M019786
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 21 Jul 2009 11:02:18 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n6LI2034005862
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Tue, 21 Jul 2009 11:02:13 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KN500A198RO4Z00@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 12:02:12 -0600 (MDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KN5000248RNEY80@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 21 Jul 2009 12:02:11 -0600 (MDT)
Received: from fe-amer-09.sun.com ([192.18.109.79])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n6LI2BLm013270	for
 <PSARC-ext@sun.com>; Tue, 21 Jul 2009 18:02:11 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 id <0KN500H007DZHJ00@mail-amer.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 12:02:11 -0600 (MDT)
Received: from [129.148.174.103] ([unknown] [129.148.174.103])
 by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 with ESMTPSA id <0KN5008XQ8RDDS40@mail-amer.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 12:02:02 -0600 (MDT)
Date: Tue, 21 Jul 2009 14:00:32 -0400
From: Sebastien Roy <Sebastien.Roy@sun.com>
Subject: Re: kstats for ipnet [PSARC/2009/403 Self Review]
In-reply-to: <4A65F017.60609@Sun.COM>
Sender: Sebastien.Roy@sun.com
To: Darren Reed <Darren.Reed@sun.com>
Cc: PSARC-EXT <PSARC-ext@sun.com>
Message-id: <1248199232.15481.26.camel@strat>
Organization: Sun Microsystems
MIME-version: 1.0
X-Mailer: Evolution 2.26.2
Content-type: text/plain; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <4A65F017.60609@Sun.COM>
Status: RO
Content-Length: 2152

On Tue, 2009-07-21 at 09:43 -0700, Darren Reed wrote:
> I'm filing this as self sponsored fast track. This case seeks minor
> binding; there are no plans to backport it to an update release.

Regardless, the ipnet case itself (2006/475) has Patch binding, and it
would be silly to backport that without its kstats...  I'd suggest
declaring Patch binding on this case with a case dependency on 2006/475.

> Proposal
> --------
> This document proposes to add kstats to ipnet to provide statistics
> about how the ipnet module is performing. The statistics proposed at
> this stage are will be provided per stack instance and will be visible
> inside the respective zone.
> 
> duplicationFail - packet duplicate prior to dispatch failed
> dispatchOk - ddi_dispatch succeeded
> dispatchFail - ddi_dispatch failed

Do you mean ddi_taskq_dispatch?

> dispatchHeaderDrop - ipnet_addheader caused packet to be dropped
> dispatchPutDrop - packet dropped: cannot put packet on queue
> dispatchDupDrop - packet dropped: copymsg/dupmsg fail in ipnet_dispatch
> dispatchDeliver - packet delivered with putnext/putq

Packets are only delivered using putnext().  putq() is only used for
flow-control in ipnet's read-queue, and those packets are eventually
"devlivered" using putnext() in ipnet_rsrv().  So it would make more
semantic sense to only bump this for packets that are actually delivered
up to a consumer using putnext().

> acceptOk - accept packet filter function wants the packet
> acceptFail - accept packet filter function rejects the packet

You're defining these as Uncommitted Public interfaces, but I don't
think these can be publicly documented as-is (I'm guessing you're
documenting these in the ipnet(7D) man page).  For example, the "accept
packet filter function" is an ipnet.c implementation detail that is not
part of a public interface.  Same with the use of a taskq for various
purposes, which the dispatch* kstats you define are tied to.  If the
internal implementation of ipnet.c changes, these kstats will no longer
make sense.  So they can't be Uncommitted by definition.

I'd suggest either dropping this to Project-Private.

-Seb



From Darren.Reed@sun.com Tue Jul 21 13:43:32 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n6LKhVas028462
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 21 Jul 2009 13:43:31 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n6LKhNG6022313
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Tue, 21 Jul 2009 21:43:30 +0100 (BST)
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 <0KN500K01G8GG200@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 13:43:28 -0700 (PDT)
Received: from gmp-eb-inf-1.sun.com ([192.18.6.21])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KN500A83G8FN350@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 21 Jul 2009 13:43:27 -0700 (PDT)
Received: from fe-emea-10.sun.com
 (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged))
	by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n6LKhQUD013021	for
 <PSARC-ext@sun.com>; Tue, 21 Jul 2009 20:43:26 +0000 (GMT)
Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 id <0KN500800G39CR00@fe-emea-10.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 21:43:06 +0100 (BST)
Received: from [76.191.212.119] ([unknown] [76.191.212.119])
 by fe-emea-10.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 with ESMTPSA id <0KN5000YRG7S4KC0@fe-emea-10.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 21:43:06 +0100 (BST)
Date: Tue, 21 Jul 2009 13:42:59 -0700
From: Darren Reed <Darren.Reed@sun.com>
Subject: Re: kstats for ipnet [PSARC/2009/403 Self Review]
In-reply-to: <1248199232.15481.26.camel@strat>
Sender: Darren.Reed@sun.com
To: Sebastien Roy <Sebastien.Roy@sun.com>
Cc: PSARC-EXT <PSARC-ext@sun.com>
Message-id: <4A662853.3000507@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <4A65F017.60609@Sun.COM> <1248199232.15481.26.camel@strat>
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
Status: RO
Content-Length: 4210

Sebastien Roy wrote:
> On Tue, 2009-07-21 at 09:43 -0700, Darren Reed wrote:
>   
>> I'm filing this as self sponsored fast track. This case seeks minor
>> binding; there are no plans to backport it to an update release.
>>     
>
> Regardless, the ipnet case itself (2006/475) has Patch binding, and it
> would be silly to backport that without its kstats...  I'd suggest
> declaring Patch binding on this case with a case dependency on 2006/475.
>   

Well, the intention is for the changes responsible to go back as part of 
a project
that does not have patch binding... but I suppose that someone might 
want to do
the work to make it happen.

>> Proposal
>> --------
>> This document proposes to add kstats to ipnet to provide statistics
>> about how the ipnet module is performing. The statistics proposed at
>> this stage are will be provided per stack instance and will be visible
>> inside the respective zone.
>>
>> duplicationFail - packet duplicate prior to dispatch failed
>> dispatchOk - ddi_dispatch succeeded
>> dispatchFail - ddi_dispatch failed
>>     
>
> Do you mean ddi_taskq_dispatch?
>   

Yes

>> dispatchHeaderDrop - ipnet_addheader caused packet to be dropped
>> dispatchPutDrop - packet dropped: cannot put packet on queue
>> dispatchDupDrop - packet dropped: copymsg/dupmsg fail in ipnet_dispatch
>> dispatchDeliver - packet delivered with putnext/putq
>>     
>
> Packets are only delivered using putnext().  putq() is only used for
> flow-control in ipnet's read-queue, and those packets are eventually
> "devlivered" using putnext() in ipnet_rsrv().  So it would make more
> semantic sense to only bump this for packets that are actually delivered
> up to a consumer using putnext().
>   

And "dispatchPutDrop" needs to be removed.
Comment updated for dispatchDeliver.

>> acceptOk - accept packet filter function wants the packet
>> acceptFail - accept packet filter function rejects the packet
>>     
>
> You're defining these as Uncommitted Public interfaces, but I don't
> think these can be publicly documented as-is (I'm guessing you're
> documenting these in the ipnet(7D) man page).

There's currently no intention to document them.

> For example, the "accept
> packet filter function" is an ipnet.c implementation detail that is not
> part of a public interface.  Same with the use of a taskq for various
> purposes, which the dispatch* kstats you define are tied to.  If the
> internal implementation of ipnet.c changes, these kstats will no longer
> make sense.  So they can't be Uncommitted by definition.
>
> I'd suggest either dropping this to Project-Private.
>   

That's fine.

Updated text below.

Darren


I'm filing this as self sponsored fast track. This case seeks patch
binding. Although there are no plans to backport this an update release,
should someone seek to backport ipnet (PSARC/2006/475), which has patch
binding, it is reasonable to assume they may wish to backport these
kstats. As the nature of this case is extremely straight forward, it is
being submitted as an automatic, closed, case.

Problem
-------
Looking at ipnet, there is no instrumentation to tell an observer about
how it is functioning. No statistics are available about whether or not
it runs out of buffers, how many packets get accepted vs rejected, etc.

Proposal
--------
This document proposes to add kstats to ipnet to provide statistics
about how the ipnet module is performing. The statistics proposed at
this stage are will be provided per stack instance and will be visible
inside the respective zone.

duplicationFail - packet duplicate prior to dispatch failed
dispatchOk - ddi_dispatch succeeded
dispatchFail - ddi_dispatch failed
dispatchHeaderDrop - ipnet_addheader caused packet to be dropped
dispatchDupDrop - packet dropped: copymsg/dupmsg fail in ipnet_dispatch
dispatchDeliver - packet delivered with putnext
acceptOk - accept packet filter function wants the packet
acceptFail - accept packet filter function rejects the packet

The statistics will be local to each zone with its own stack instance.

These kstats will be delivered under module "ipnet", name "ipnet_stats"
and class "misc".

All of the interfaces being introduced are project private.



From Sebastien.Roy@sun.com Tue Jul 21 13:47:54 2009
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 n6LKlrOH028597
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 21 Jul 2009 13:47:54 -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 n6LKlqbq014408
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 22 Jul 2009 04:47:53 +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 <0KN500L0DGFRBT00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 13:47:51 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KN500A7UGFPN560@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 21 Jul 2009 13:47:50 -0700 (PDT)
Received: from fe-amer-10.sun.com ([192.18.109.80])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n6LKlnAB025698	for
 <PSARC-ext@sun.com>; Tue, 21 Jul 2009 20:47:49 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 id <0KN500800EV27F00@mail-amer.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 14:47:49 -0600 (MDT)
Received: from [129.148.174.103] ([unknown] [129.148.174.103])
 by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 with ESMTPSA id <0KN5006UXGESTTC0@mail-amer.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 21 Jul 2009 14:47:16 -0600 (MDT)
Date: Tue, 21 Jul 2009 16:45:46 -0400
From: Sebastien Roy <Sebastien.Roy@sun.com>
Subject: Re: kstats for ipnet [PSARC/2009/403 Self Review]
In-reply-to: <4A662853.3000507@Sun.COM>
Sender: Sebastien.Roy@sun.com
To: Darren Reed <Darren.Reed@sun.com>
Cc: PSARC-EXT <PSARC-ext@sun.com>
Message-id: <1248209146.15481.30.camel@strat>
Organization: Sun Microsystems
MIME-version: 1.0
X-Mailer: Evolution 2.26.2
Content-type: text/plain; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <4A65F017.60609@Sun.COM> <1248199232.15481.26.camel@strat>
 <4A662853.3000507@Sun.COM>
Status: RO
Content-Length: 92


On Tue, 2009-07-21 at 13:42 -0700, Darren Reed wrote:
> Updated text below.
> 

+1

-Seb



