Print this page

        

@@ -22,11 +22,10 @@
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
- * Copyright 2015 Joyent, Inc.
  */
 
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/signal.h>

@@ -2290,13 +2289,13 @@
         error = 0;
         sp = so->so_sockparams;
         fbfunc = sp->sp_smod_info->smod_proto_fallback_func;
 
         /*
-         * Cannot fallback if the socket has active filters or a krecv callback.
+         * Cannot fallback if the socket has active filters
          */
-        if (so->so_filter_active > 0 || so->so_krecv_cb != NULL)
+        if (so->so_filter_active > 0)
                 return (EINVAL);
 
         switch (so->so_family) {
         case AF_INET:
                 devpath = sp->sp_smod_info->smod_fallback_devpath_v4;

@@ -2469,53 +2468,6 @@
                 freemsg(arg.soqa_exdata_mp);
         if (arg.soqa_urgmark_mp != NULL)
                 freemsg(arg.soqa_urgmark_mp);
 
         return (error);
-}
-
-int
-so_krecv_set(sonode_t *so, so_krecv_f cb, void *arg)
-{
-        int ret;
-
-        if (cb == NULL && arg != NULL)
-                return (EINVAL);
-
-        SO_BLOCK_FALLBACK(so, so_krecv_set(so, cb, arg));
-
-        mutex_enter(&so->so_lock);
-        if (so->so_state & SS_FALLBACK_COMP) {
-                mutex_exit(&so->so_lock);
-                SO_UNBLOCK_FALLBACK(so);
-                return (ENOTSUP);
-        }
-
-        ret = so_lock_read(so, 0);
-        VERIFY(ret == 0);
-        /*
-         * Other consumers may actually care about getting extant data delivered
-         * to them, when they come along, they should figure out the best API
-         * for that.
-         */
-        so_rcv_flush(so);
-
-        so->so_krecv_cb = cb;
-        so->so_krecv_arg = arg;
-
-        so_unlock_read(so);
-        mutex_exit(&so->so_lock);
-        SO_UNBLOCK_FALLBACK(so);
-
-        return (0);
-}
-
-void
-so_krecv_unblock(sonode_t *so)
-{
-        mutex_enter(&so->so_lock);
-        VERIFY(so->so_krecv_cb != NULL);
-
-        so->so_rcv_queued = 0;
-        (void) so_check_flow_control(so);
-        mutex_exit(&so->so_lock);
 }