Print this page
OS-3752 Increase IOV_MAX to at least 1024


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.

  24  */
  25 
  26 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  27 /*        All Rights Reserved   */
  28 
  29 
  30 #ifndef _SYS_STREAM_H
  31 #define _SYS_STREAM_H
  32 
  33 /*
  34  * For source compatibility
  35  */
  36 #include <sys/isa_defs.h>
  37 #ifdef _KERNEL
  38 #include <sys/kmem.h>
  39 #include <sys/uio.h>
  40 #endif
  41 #include <sys/poll.h>
  42 #include <sys/strmdep.h>
  43 #include <sys/cred.h>


 611 #define SO_MREADOFF     0x0080  /* set read notification OFF */
 612 #define SO_NDELON       0x0100  /* old TTY semantics for NDELAY reads/writes */
 613 #define SO_NDELOFF      0x0200  /* STREAMS semantics for NDELAY reads/writes */
 614 #define SO_ISTTY        0x0400  /* the stream is acting as a terminal */
 615 #define SO_ISNTTY       0x0800  /* the stream is not acting as a terminal */
 616 #define SO_TOSTOP       0x1000  /* stop on background writes to this stream */
 617 #define SO_TONSTOP      0x2000  /* do not stop on background writes to stream */
 618 #define SO_BAND         0x4000  /* water marks affect band */
 619 #define SO_DELIM        0x8000  /* messages are delimited */
 620 #define SO_NODELIM      0x010000        /* turn off delimiters */
 621 #define SO_STRHOLD      0x020000        /* No longer implemented */
 622 #define SO_ERROPT       0x040000        /* set error option */
 623 #define SO_COPYOPT      0x080000        /* copy option(s) present */
 624 #define SO_MAXBLK       0x100000        /* set maximum message block size */
 625 #define SO_TAIL         0x200000        /* set the extra allocated space */
 626 
 627 #ifdef _KERNEL
 628 /*
 629  * Structure for rw (read/write) procedure calls. A pointer
 630  * to a struiod_t is passed as a parameter to the rwnext() call.
 631  *
 632  * Note: DEF_IOV_MAX is defined and used as it is in "fs/vncalls.c"
 633  *       as there isn't a formal definition of IOV_MAX ???
 634  */
 635 #define DEF_IOV_MAX     16
 636 
 637 typedef struct struiod {
 638         mblk_t          *d_mp;          /* pointer to mblk (chain) */
 639         uio_t           d_uio;          /* uio info */
 640         iovec_t d_iov[DEF_IOV_MAX];     /* iov referenced by uio */
 641 } struiod_t;
 642 
 643 /*
 644  * Structure for information procedure calls.
 645  */
 646 typedef struct infod {
 647         unsigned char   d_cmd;          /* info info request command */
 648         unsigned char   d_res;          /* info info command results */
 649         int             d_bytes;        /* mblk(s) byte count */
 650         int             d_count;        /* count of mblk(s) */
 651         uio_t           *d_uiop;        /* pointer to uio struct */
 652 } infod_t;
 653 /*
 654  * Values for d_cmd & d_res.
 655  */
 656 #define INFOD_FIRSTBYTES        0x02    /* return msgbsize() of first mblk */
 657 #define INFOD_BYTES             0x04    /* return msgbsize() of all mblk(s) */
 658 #define INFOD_COUNT             0x08    /* return count of mblk(s) */
 659 #define INFOD_COPYOUT           0x10    /* copyout any M_DATA mblk(s) */
 660 




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  * Copyright 2015 Joyent, Inc.  All rights reserved.
  25  */
  26 
  27 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 
  31 #ifndef _SYS_STREAM_H
  32 #define _SYS_STREAM_H
  33 
  34 /*
  35  * For source compatibility
  36  */
  37 #include <sys/isa_defs.h>
  38 #ifdef _KERNEL
  39 #include <sys/kmem.h>
  40 #include <sys/uio.h>
  41 #endif
  42 #include <sys/poll.h>
  43 #include <sys/strmdep.h>
  44 #include <sys/cred.h>


 612 #define SO_MREADOFF     0x0080  /* set read notification OFF */
 613 #define SO_NDELON       0x0100  /* old TTY semantics for NDELAY reads/writes */
 614 #define SO_NDELOFF      0x0200  /* STREAMS semantics for NDELAY reads/writes */
 615 #define SO_ISTTY        0x0400  /* the stream is acting as a terminal */
 616 #define SO_ISNTTY       0x0800  /* the stream is not acting as a terminal */
 617 #define SO_TOSTOP       0x1000  /* stop on background writes to this stream */
 618 #define SO_TONSTOP      0x2000  /* do not stop on background writes to stream */
 619 #define SO_BAND         0x4000  /* water marks affect band */
 620 #define SO_DELIM        0x8000  /* messages are delimited */
 621 #define SO_NODELIM      0x010000        /* turn off delimiters */
 622 #define SO_STRHOLD      0x020000        /* No longer implemented */
 623 #define SO_ERROPT       0x040000        /* set error option */
 624 #define SO_COPYOPT      0x080000        /* copy option(s) present */
 625 #define SO_MAXBLK       0x100000        /* set maximum message block size */
 626 #define SO_TAIL         0x200000        /* set the extra allocated space */
 627 
 628 #ifdef _KERNEL
 629 /*
 630  * Structure for rw (read/write) procedure calls. A pointer
 631  * to a struiod_t is passed as a parameter to the rwnext() call.



 632  */


 633 typedef struct struiod {
 634         mblk_t          *d_mp;          /* pointer to mblk (chain) */
 635         uio_t           d_uio;          /* uio info */
 636         iovec_t         *d_iov;         /* iov referenced by uio */
 637 } struiod_t;
 638 
 639 /*
 640  * Structure for information procedure calls.
 641  */
 642 typedef struct infod {
 643         unsigned char   d_cmd;          /* info info request command */
 644         unsigned char   d_res;          /* info info command results */
 645         int             d_bytes;        /* mblk(s) byte count */
 646         int             d_count;        /* count of mblk(s) */
 647         uio_t           *d_uiop;        /* pointer to uio struct */
 648 } infod_t;
 649 /*
 650  * Values for d_cmd & d_res.
 651  */
 652 #define INFOD_FIRSTBYTES        0x02    /* return msgbsize() of first mblk */
 653 #define INFOD_BYTES             0x04    /* return msgbsize() of all mblk(s) */
 654 #define INFOD_COUNT             0x08    /* return count of mblk(s) */
 655 #define INFOD_COPYOUT           0x10    /* copyout any M_DATA mblk(s) */
 656