2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved. 2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * PURPOSE: implements DTO callbacks from verbs 2N/A * dapl_evd_dto_callback 2N/A * This is invoked for both DTO and MW bind completions. Strictly 2N/A * speaking it is an event callback rather than just a DTO callback. 2N/A "dapl_evd_dto_callback(%p, %p, %p)\n",
2N/A "-- dapl_evd_dto_callback: CQ %p, state %x\n",
2N/A * This function does not dequeue from the CQ; only the consumer 2N/A * can do that. Instead, it wakes up waiters if any exist. 2N/A * It rearms the completion only if completions should always occur 2N/A * (specifically if a CNO is associated with the EVD and the 2N/A * If we could, it would be best to avoid this wakeup 2N/A * waiting for the waiter was its threshold. We don't 2N/A * currently have the ability to determine that without 2N/A * dequeueing the events, and we can't do that for 2N/A * synchronization reasons (racing with the waiter waking 2N/A * up and dequeuing, sparked by other callbacks). 2N/A * We don't need to worry about taking the lock for the 2N/A * wakeup because wakeups are sticky. 2N/A * Re-enable callback, *then* trigger. 2N/A * This guarantees we won't miss any events.