DLPI: How do I increase my STREAMS high-water mark?

DLPI: How do I increase my STREAMS high-water mark?

Post by Brian Wint » Fri, 13 Oct 1995 04:00:00



Howdy - I've got a DLPI application running on my x86 Solaris 5.4
platform. I open up my ethernet device (/dev/elx) and discover (using
crash) that the stream head read queue's high water mark is set to
about 5K. Is there a way from a user-space application to increase
this number? I looked at strqset() but that unfortunately can only be
used in the kernel. Is there an IOCTL availble?

Thanks for any help y'all can provide!

Brian

 
 
 

DLPI: How do I increase my STREAMS high-water mark?

Post by Scott P. K » Tue, 17 Oct 1995 04:00:00


Hi Brian,

   Always happy to help someone at my alma mater. Use the M_SETOPTS
message to change the stream head parameters. I've run into the 5K
limit before, which is fine for ehternets with an MTU of 1500, but way
too small if you're trying to push lots of data in a single
packet. Also be forewarned the actual STREAMS limit on packet size is
63K bytes and as far as I can tell there is no way to overcome this
limit (with a STREAMS driver that is).

Hope this helps
-Scott

--
*******************************************************************************
                              Scott Kay
                              TASC, Inc.
                        55 Walkers Brook Drive
                             Reading, MA

*******************************************************************************

 
 
 

DLPI: How do I increase my STREAMS high-water mark?

Post by Scott P. K » Wed, 18 Oct 1995 04:00:00


Oh here's the function from my driver to implement this:

/* $Id: h830.c,v 1.14 1995/06/30 21:04:44 skay Exp skay $ */
/*
 *  h830 Driver derived from the psli Solaris Multithreaded STREAMS DLPI Driver
 *
 * Developed by Scott Kay - copyright TASC 1994.
 *
 */

/*******************************************************************************
 *
 ******************************************************************************/
static void h830setStreamHead(struct h830 *h830p)
{
    mblk_t              *mp;
    int                 size;
    struct stroptions   *sopts;
    struct h830str      *slp;

    if (h830debug)
        h830comment("h830setStreamHead called.");

    /* Try this later ****
    freezestr();
    strqset();
    unfreezestr();
    */

    /*
       NOT NEEDED for HIPPI - address is not in data.
    mp->b_rptr += sizeof (struct medium_header);
    */

    /*
     * Allocate an M_PROTO mblk for the DL_UNITDATA_IND.
     */
    size = sizeof(struct stroptions);
    if ((mp = allocb(size, BPRI_LO)) == NULL)
    {
#ifdef KSTAT
        h830p->h830_allocbfail++;
#endif /* KSTAT */
        if (h830debug)
            h830error(h830p->h830_dip, "allocb failed");
        freemsg(mp);
        return;
    }
    DB_TYPE(mp) = M_SETOPTS;
    mp->b_wptr  = mp->b_datap->db_lim;
    mp->b_rptr  = mp->b_wptr - size;

    /*
     * Construct a M_SETOPTS message for stream head.
     */
    sopts = (struct stroptions *) mp->b_rptr;

    sopts->so_flags  = SO_HIWAT | SO_LOWAT;
    sopts->so_hiwat  = 4 * H830MAXPSZ;
    sopts->so_lowat  = 1 * H830MAXPSZ;

    /* Set this on all the open stream heads */
    for (slp = h830strup; slp; slp = slp->sl_nextp)
    {
        putq(slp->sl_rq, mp);
    }

Quote:}

-Scott
--
*******************************************************************************
                              Scott Kay
                              TASC, Inc.
                        55 Walkers Brook Drive
                             Reading, MA

*******************************************************************************
 
 
 

1. Stream high water mark

We are developing a streams based device driver and are trying to
determine if there is some system wide control of the stream's high
water mark(maximum amount of data in transition from application layer
to device driver).

The driver sets a certain value when it initializes the stream but the
stream indicates that it is full(canputnext() fails) before we reach
this value.

Any help would be appreciated.

Ed

2. X and Weitek P9100

3. streams driver high/low water mark

4. RC.FIREWALL enhancement

5. tcpMaxConn == high water mark?

6. Rup command

7. high water mark on incoming socket buffer

8. FREE "commercial" BACKUP/RESTORE software

9. GigE & TCP/UDP High Water Mark

10. udp high water mark

11. Setting Low Water Mark

12. Lower water mark

13. TCP water-mark settings for 100-meg ethernet?