Lines Matching +defs:val +defs:channel
104 static int idn_send_mboxdata(int domid, struct idn *sip, int channel,
106 static int idn_recv_mboxdata(int channel, caddr_t bufp);
120 idn_mainmbox_t *recv_mmp, int channel);
121 static int idn_mainmbox_chan_unregister(ushort_t domset, int channel);
128 static int idn_deactivate_channel_services(int channel,
130 static int idn_activate_channel_services(int channel);
135 static void idn_chan_action(int channel, idn_chanaction_t chanaction,
137 static void idn_chan_addmbox(int channel, ushort_t domset);
138 static void idn_chan_delmbox(int channel, ushort_t domset);
139 static void idn_submit_chanactivate_job(int channel);
4842 int channel;
4863 channel = (int)dst_netaddr.net.chan;
4899 PR_DATA("%s:%d: destination channel = %d\n", proc, dst_domid, channel);
4907 ASSERT((uchar_t)channel == echn);
4936 if (idn.chan_servers[channel].ch_send.c_checkin) {
4944 csp = &idn.chan_servers[channel];
4957 (void) idndl_domain_etheraddr(dst_domid, channel,
5037 * Need to make sure the channel is active and that the
5043 * See if we can activate channel.
5046 not_active = idn_activate_channel(CHANSET(channel),
5051 * able to activate the channel.
5056 * Verify channel still active now that we have the lock.
5063 * activated the channel.
5078 PR_DATA("%s:%d: dest channel %d NOT ACTIVE\n",
5079 proc, dst_domid, channel);
5087 * If we made it here then the channel is active
5093 * If domain is not even registered with this channel
5097 PR_DATA("%s:%d: domain not registered with channel %d\n",
5098 proc, dst_domid, channel);
5115 * it becomes necessary (i.e. remote channel
5228 (void) idn_reclaim_mboxdata(dst_domid, channel,
5393 xrv = idn_send_mboxdata(dst_domid, sip, channel, iobufp);
5405 proc, dst_domid, channel, xrv);
5453 * this channel.
5455 idn_xmit_monitor_kickoff(channel);
5968 cfg_subtype.val = 0;
5999 IDNXDC(domid, &mt, cfg_subtype.val, IDN_SLAB_BUFCOUNT,
6024 IDNXDC(domid, &mt, cfg_subtype.val,
6049 IDNXDC(domid, &mt, cfg_subtype.val,
6072 IDNXDC(domid, &mt, cfg_subtype.val,
6098 IDNXDC(domid, &mt, cfg_subtype.val,
6156 IDNXDC(domid, &mt, cfg_subtype.val,
6208 cfg_subtype.val = 0;
6239 IDNXDC(domid, &mt, cfg_subtype.val,
6252 cfg_subtype.val = 0;
6266 IDNXDC(domid, &mt, cfg_subtype.val,
6276 cfg_subtype.val = 0;
6291 IDNXDC(domid, &mt, cfg_subtype.val,
6301 cfg_subtype.val = 0;
6317 IDNXDC(domid, &mt, cfg_subtype.val,
6397 GET_XARGS(xargs, &cfg_subtype.val, &cfg_arg[0], &cfg_arg[1],
6465 uint_t val;
6468 val = 0;
6470 #define RCVCFG(s, v) { str = (s); val = (v); }
6758 proc, domid, str ? str : "<empty>", val);
7560 "channel %d) SMR CORRUPTED - RELINK",
7583 "channel %d) SMR CORRUPTED - RELINK",
7622 "channel %d) SMR CORRUPTED - RELINK",
7645 "channel %d) SMR CORRUPTED - RELINK",
7993 * due to channel server looping back through STREAMs and attempting
7994 * to acquire domain lock, i.e. channel server will never "stop".
9981 * CC = channel of sub-domain.
9988 * We point all sub-domains in the same channel
9990 * services all domains in the same channel.
10110 * stopall - Indicates to stop all channel services, across the board.
10133 idn_mainmbox_t *recv_mmp, int channel)
10143 ASSERT(recv_mmp->mm_channel == (short)channel);
10144 ASSERT(send_mmp->mm_channel == (short)channel);
10146 recv_mmp->mm_csp = &idn.chan_servers[channel];
10151 send_mmp->mm_csp = &idn.chan_servers[channel];
10161 * channel server's service table.
10162 * Note that the channel may not necessarily be
10167 * Have to get the channel server under
10171 IDN_CHAN_LOCK_GLOBAL(&idn.chan_servers[channel]);
10174 * by the respective channel server.
10176 idn_chan_addmbox(channel, DOMAINSET(domid));
10178 IDN_CHAN_UNLOCK_GLOBAL(&idn.chan_servers[channel]);
10182 * Unregister the given domain from the specified channel(s) for monitoring.
10185 idn_mainmbox_chan_unregister(ushort_t domset, int channel)
10191 PR_CHAN("%s: deactivating main mailboxes (channel %d) "
10192 "for domset 0x%x\n", proc, channel, domset);
10194 if (channel == -1) {
10198 min_chan = max_chan = channel;
10208 * Have to get the channel server under
10215 * monitoring by the respective channel server.
10222 PR_CHAN("%s: deactivated %d channel mboxes for domset 0x%x, chan %d\n",
10223 proc, dd_count, domset, channel);
10228 * Check if the given domain is registered with the given channel(s).
10231 idn_domain_is_registered(int domid, int channel, idn_chanset_t *chansetp)
10245 if (channel == -1) {
10249 min_chan = max_chan = channel;
10275 proc, domid, regcount, chanset, channel);
10474 PR_CHAN("%s: bound net/channel (%d) from cpuid %d to%scpuid %d\n",
10484 * Get access to the respective channel server's synchronization
10488 idn_chan_server_syncheader(int channel)
10496 ASSERT(IDN_CHAN_RECV_IS_LOCKED(&idn.chan_servers[channel]));
10506 mtp = IDN_MBOXTBL_PTR_CHAN(ldp->dmbox.m_tbl, channel);
10511 if (mhp != prev_mhp[channel]) {
10512 prev_mhp[channel] = mhp;
10514 proc, channel, IDN_GET_MBOXHDR_COOKIE(mhp),
10515 IDN_MAKE_MBOXHDR_COOKIE(0, 0, channel));
10517 proc, channel, mhp->mh_svr_active_ptr,
10520 proc, channel, mhp->mh_svr_ready_ptr,
10523 proc, channel, (int)mhp->mh_cksum, (int)mbox_csum);
10530 !VALID_MBOXHDR(mhp, channel, mbox_csum)) {
10533 csp = &idn.chan_servers[channel];
10538 "IDN: 240: (channel %d) SMR CORRUPTED "
10539 "- RELINK", channel);
10541 "IDN: 240: (channel %d) cookie "
10543 channel,
10544 IDN_MAKE_MBOXHDR_COOKIE(0, 0, channel),
10547 "IDN: 240: (channel %d) actv_flg "
10549 channel, mhp->mh_svr_active_ptr,
10552 "IDN: 240: (channel %d) ready_flg "
10554 channel, mhp->mh_svr_ready_ptr,
10562 PR_CHAN("%s: channel(%d) mainhp = 0x%p\n", proc, channel, (void *)mhp);
10609 int channel;
10631 channel = csp->ch_id;
10632 sip = IDN_INST2SIP(channel);
10635 PR_CHAN("%s: CHANNEL SERVER (channel %d) GOING ACTIVE...\n",
10636 proc, channel);
10657 cpuid, channel);
10675 * given channel.
10677 CHANSVR_SYNC_CACHE(csp, mmp, channel);
10681 ? idn_chan_server_syncheader(channel) : NULL;
10724 PR_DATA("%s: (channel %d) %s\n",
10725 proc, channel,
10754 ASSERT(mmp[domid]->mm_channel == (short)channel);
10758 * us down has to formally pause this channel before
10777 if (!VALID_MBOXHDR(&smr_mboxp->mt_header, channel, mbox_csum)) {
10783 "channel %d) SMR CORRUPTED - RELINK",
10784 domid, channel);
10812 PR_DATA("%s: (channel %d) pkt (off 0x%x, "
10814 proc, channel, bufoffset, qi, domid);
10819 ASSERT(netaddr.net.chan == (ushort_t)channel);
10822 if (idn_recv_mboxdata(channel,
10829 "%d, channel %d) SMR "
10831 domid, channel);
10861 PR_DATA("%s: (channel %d) dom=%d, pktcnt=%d\n",
10862 proc, channel, domid, pktcount);
10871 PR_DATA("%s: (channel %d) going SOFT IDLE...\n",
10872 proc, channel);
10900 PR_CHAN("%s: (channel %d) serviced %d "
10901 "packets, drop = %d\n", proc, channel,
10903 PR_CHAN("%s: (channel %d) TERMINATING\n",
10904 proc, channel);
10905 PR_CHAN("%s: (channel %d) ch_morguep = %p\n",
10906 proc, channel, (void *)csp->ch_recv_morguep);
10914 PR_DATA("%s: WARNING (channel %d) "
10916 proc, channel, domid);
10932 PR_CHAN("%s: (channel %d) going to DIE...\n",
10933 proc, channel);
10939 PR_CHAN("%s: (channel %d) going SOFT IDLE "
10941 proc, channel,
10944 PR_CHAN("%s: (channel %d) going "
10945 "HARD IDLE...\n", proc, channel);
10990 CHANSVR_SYNC_CACHE(csp, mmp, channel);
11000 mainhp = idn_chan_server_syncheader(channel);
11024 * queue of a channel because it must be done outside the
11061 * to get the channel server coherent
11064 PR_CHAN("%s: sending FLUSH (%x) to channel %d\n",
11093 idn_chan_action(int channel, idn_chanaction_t chanaction, int wait)
11103 ASSERT((channel >= 0) && (channel < IDN_MAX_NETS));
11106 csp = &idn.chan_servers[channel];
11108 PR_CHAN("%s: requesting %s for channel %d\n",
11109 proc, chanaction_str[(int)chanaction], channel);
11142 if ((sip = IDN_INST2SIP(channel)) != NULL) {
11161 * It's possible the channel server could come
11167 * other than the channel server we're attempting to
11178 if ((sip = IDN_INST2SIP(channel)) != NULL) {
11249 * channel is still alive.
11252 if ((sip = IDN_INST2SIP(channel)) != NULL)
11271 PR_CHAN("%s: action (%s) for channel %d - COMPLETED\n",
11272 proc, chanaction_str[(int)chanaction], channel);
11293 * The channel server itself could come through this
11300 PR_CHAN("%s: action (%s) for channel %d - COMPLETED\n",
11301 proc, chanaction_str[(int)chanaction], channel);
11317 idn_chan_addmbox(int channel, ushort_t domset)
11323 PR_CHAN("%s: adding domset 0x%x main mailboxes to channel %d\n",
11324 proc, domset, channel);
11328 csp = &idn.chan_servers[channel];
11331 * Adding domains to a channel can be
11334 IDN_CHANNEL_SUSPEND(channel, 0);
11338 * for this channel.
11351 PR_CHAN("%s: domain %d (channel %d) RECV (pending) "
11352 "scanset = 0x%lx\n", proc, d, channel,
11354 PR_CHAN("%s: domain %d (channel %d) domset = 0x%x\n",
11355 proc, d, channel, (uint_t)csp->ch_reg_domset);
11363 IDN_CHANNEL_RESUME(channel);
11367 idn_chan_delmbox(int channel, ushort_t domset)
11373 PR_CHAN("%s: deleting domset 0x%x main mailboxes from channel %d\n",
11374 proc, domset, channel);
11378 csp = &idn.chan_servers[channel];
11381 * Here we have to wait for the channel server
11385 IDN_CHANNEL_SUSPEND(channel, 1);
11389 * for this channel.
11399 * This domain has a mailbox hanging on this channel.
11409 PR_CHAN("%s: domain %d (channel %d) RECV (pending) "
11410 "scanset = 0x%lx\n", proc, d, channel,
11412 PR_CHAN("%s: domain %d (channel %d) domset = 0x%x\n",
11413 proc, d, channel, (uint_t)csp->ch_reg_domset);
11422 IDN_CHANNEL_RESUME(channel);
11467 idn_send_mboxdata(int domid, struct idn *sip, int channel, caddr_t bufp)
11486 mmp += channel;
11491 proc, domid, channel);
11500 proc, domid, channel, mbox_csum,
11505 "channel %d) SMR CORRUPTED - RELINK",
11506 domid, channel);
11519 ASSERT(dst.net.chan == (ushort_t)channel);
11623 idn_recv_mboxdata(int channel, caddr_t bufp)
11640 sip = IDN_INST2SIP(channel);
11656 daddr.net.chan = (ushort_t)channel;
11727 idn_reclaim_mboxdata(int domid, int channel, int nbufs)
11743 sip = IDN_INST2SIP(channel);
11778 * This channel is busy, move on.
11849 "(domain %d, channel "
11852 domid, channel);
11921 "IDN: 241: [send] (domain %d, channel %d) SMR "
11922 "CORRUPTED - RELINK", domid, channel);
11950 idn_signal_data_server(int domid, ushort_t channel)
12014 if ((channel != IDN_BROADCAST_ALLCHAN) && (channel >= IDN_MAX_NETS)) {
12018 if (channel == IDN_BROADCAST_ALLCHAN) {
12024 PR_DATA("%s: requested signal to channel %d on domain %d\n",
12025 proc, channel, domid);
12026 min_chan = max_chan = (int)channel;
12032 * We do a quick check for a pending channel.
12116 if (!nacktype || (channel == IDN_BROADCAST_ALLCHAN)) {
12196 idn_open_channel(int channel)
12203 if (channel >= IDN_MAX_NETS) {
12213 csp = &idn.chan_servers[channel];
12218 PR_CHAN("%s: channel %d already open\n", proc, channel);
12226 * this channel.
12229 if (sip->si_dip && (ddi_get_instance(sip->si_dip) == channel)) {
12237 CHANSET_ADD(idn.chanset, channel);
12238 IDN_CHANNEL_ATTACH(channel);
12243 * We increase our window threshold each time a channel
12250 PR_CHAN("%s: channel %d is OPEN (nchannels = %d)\n",
12251 proc, channel, idn.nchannels);
12258 * we're connected. If so, then activate channel.
12266 (void) idn_activate_channel(CHANSET(channel),
12275 idn_close_channel(int channel, idn_chanop_t chanop)
12283 csp = &idn.chan_servers[channel];
12289 PR_CHAN("%s: channel %d already closed\n", proc, channel);
12296 idn_deactivate_channel(CHANSET(channel), chanop);
12302 CHANSET_DEL(idn.chanset, channel);
12304 * We increase our window threshold each time a channel
12314 PR_CHAN("%s: channel %d is (%s) CLOSED (nchannels = %d)\n",
12315 proc, channel,
12363 "lock for channel %d\n",
12370 PR_CHAN("%s: channel %d NOT open\n", proc, c);
12378 PR_CHAN("%s: channel %d already active\n", proc, c);
12391 PR_CHAN("%s: ACTIVATING channel %d\n", proc, c);
12394 PR_CHAN("%s: Setting channel %d ACTIVE\n",
12401 PR_CHAN("%s: Setting channel %d PENDING\n", proc, c);
12407 * channel is at least ENABLED. For a DISABLED
12408 * channel, the SMR may be invalid so do NOT
12466 PR_CHAN("%s: channel %d already deactivated\n",
12500 PR_CHAN("%s: DEACTIVATING channel %d (%s)\n", proc, c,
12513 * The priority of the channel server must be less than that
12522 idn_activate_channel_services(int channel)
12528 ASSERT((channel >= 0) && (channel < IDN_MAX_NETS));
12530 csp = &idn.chan_servers[channel];
12541 ASSERT(csp->ch_id == (uchar_t)channel);
12543 proc, channel);
12549 proc, channel, csp->ch_recv.c_state,
12560 csp->ch_id = (uchar_t)channel;
12562 PR_CHAN("%s: init channel %d server\n", proc, channel);
12587 * This routine can handle terminating a set of channel
12596 idn_deactivate_channel_services(int channel, idn_chanop_t chanop)
12608 PR_CHAN("%s: deactivating channel %d services\n", proc, channel);
12612 * Old code allowed us to deactivate multiple channel
12615 chanset = CHANSET(channel);
12632 * No channel server home.
12636 PR_CHAN("%s: no channel server found for chan %d\n",
12766 int not_active, channel;
12769 channel = (int)(uintptr_t)chn;
12776 csp = &idn.chan_servers[channel];
12790 not_active = idn_activate_channel(CHANSET(channel),
12800 * Delayed activation of channel. We don't want to do this within
12805 * of the channel so that we don't have multiple idn_activate_channel's
12806 * attempting to activate the same channel.
12809 idn_submit_chanactivate_job(int channel)
12815 csp = &idn.chan_servers[channel];
12820 (void) timeout(idn_exec_chanactivate, (caddr_t)(uintptr_t)channel, 1);
12910 PR_XMON("%s: QENABLE for channel %d\n", proc, c);