/*1* Copyright (c) 2004 Topspin Communications. All rights reserved.2* Copyright (c) 2005 Voltaire, Inc. All rights reserved.3* Copyright (c) 2006 Intel Corporation. All rights reserved.4*5* This software is available to you under a choice of one of two6* licenses. You may choose to be licensed under the terms of the GNU7* General Public License (GPL) Version 2, available from the file8* COPYING in the main directory of this source tree, or the9* OpenIB.org BSD license below:10*11* Redistribution and use in source and binary forms, with or12* without modification, are permitted provided that the following13* conditions are met:14*15* - Redistributions of source code must retain the above16* copyright notice, this list of conditions and the following17* disclaimer.18*19* - Redistributions in binary form must reproduce the above20* copyright notice, this list of conditions and the following21* disclaimer in the documentation and/or other materials22* provided with the distribution.23*24* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,25* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF26* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND27* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS28* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN29* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN30* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE31* SOFTWARE.32*/3334#ifndef SA_H35#define SA_H3637#include <rdma/ib_sa.h>3839static inline void ib_sa_client_get(struct ib_sa_client *client)40{41atomic_inc(&client->users);42}4344static inline void ib_sa_client_put(struct ib_sa_client *client)45{46if (atomic_dec_and_test(&client->users))47complete(&client->comp);48}4950int ib_sa_mcmember_rec_query(struct ib_sa_client *client,51struct ib_device *device, u8 port_num,52u8 method,53struct ib_sa_mcmember_rec *rec,54ib_sa_comp_mask comp_mask,55int timeout_ms, gfp_t gfp_mask,56void (*callback)(int status,57struct ib_sa_mcmember_rec *resp,58void *context),59void *context,60struct ib_sa_query **sa_query);6162int mcast_init(void);63void mcast_cleanup(void);6465#endif /* SA_H */666768