Print this page
10687 Service routine cast changes need smatch fixes

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/softmac/softmac_fp.c
          +++ new/usr/src/uts/common/io/softmac/softmac_fp.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26   26  /*
       27 + * Copyright 2019, Joyent, Inc.
       28 + */
       29 +
       30 +/*
  27   31   * Softmac data-path switching:
  28   32   *
  29   33   * - Fast-path model
  30   34   *
  31   35   * When the softmac fast-path is used, a dedicated lower-stream
  32   36   * will be opened over the legacy device for each IP/ARP (upper-)stream
  33   37   * over the softMAC, and all DLPI messages (including control messages
  34   38   * and data messages) will be exchanged between the upper-stream and
  35   39   * the corresponding lower-stream directly. Therefore, the data
  36   40   * demultiplexing, filtering and classification processing will be done
↓ open down ↓ 720 lines elided ↑ open up ↑
 757  761                          return;
 758  762                  }
 759  763                  break;
 760  764          }
 761  765  
 762  766          /*
 763  767           * No need to hold lock to check su_mode, since su_mode updating only
 764  768           * operation is is serialized by softmac_wput_nondata_task().
 765  769           */
 766  770          if (sup->su_mode != SOFTMAC_FASTPATH) {
 767      -                dld_wput(sup->su_wq, mp);
      771 +                (void) dld_wput(sup->su_wq, mp);
 768  772                  return;
 769  773          }
 770  774  
 771  775          /*
 772  776           * Fastpath non-data message processing. Most of non-data messages
 773  777           * can be directly passed down to the dedicated-lower-stream, aside
 774  778           * from the following M_PROTO/M_PCPROTO messages.
 775  779           */
 776  780          switch (dbtype) {
 777  781          case M_PROTO:
↓ open down ↓ 201 lines elided ↑ open up ↑
 979  983  
 980  984  void
 981  985  softmac_wput_data(softmac_upper_t *sup, mblk_t *mp)
 982  986  {
 983  987          /*
 984  988           * No lock is required to access the su_mode field since the data
 985  989           * traffic is quiesce by IP when the data-path mode is in the
 986  990           * process of switching.
 987  991           */
 988  992          if (sup->su_mode != SOFTMAC_FASTPATH)
 989      -                dld_wput(sup->su_wq, mp);
      993 +                (void) dld_wput(sup->su_wq, mp);
 990  994          else
 991  995                  (void) softmac_fastpath_wput_data(sup, mp, NULL, 0);
 992  996  }
 993  997  
 994  998  /*ARGSUSED*/
 995  999  static mac_tx_cookie_t
 996 1000  softmac_fastpath_wput_data(softmac_upper_t *sup, mblk_t *mp, uintptr_t f_hint,
 997 1001      uint16_t flag)
 998 1002  {
 999 1003          queue_t         *wq = sup->su_slp->sl_wq;
↓ open down ↓ 295 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX