Path: blob/main/sys/ofed/drivers/infiniband/core/agent.h
39537 views
/*-1* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.02*3* Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.4* Copyright (c) 2004 Infinicon Corporation. All rights reserved.5* Copyright (c) 2004 Intel Corporation. All rights reserved.6* Copyright (c) 2004 Topspin Corporation. All rights reserved.7* Copyright (c) 2004 Voltaire Corporation. All rights reserved.8*9* This software is available to you under a choice of one of two10* licenses. You may choose to be licensed under the terms of the GNU11* General Public License (GPL) Version 2, available from the file12* COPYING in the main directory of this source tree, or the13* OpenIB.org BSD license below:14*15* Redistribution and use in source and binary forms, with or16* without modification, are permitted provided that the following17* conditions are met:18*19* - Redistributions of source code must retain the above20* copyright notice, this list of conditions and the following21* disclaimer.22*23* - Redistributions in binary form must reproduce the above24* copyright notice, this list of conditions and the following25* disclaimer in the documentation and/or other materials26* provided with the distribution.27*28* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,29* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF30* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND31* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS32* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN33* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN34* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE35* SOFTWARE.36*/3738#ifndef __AGENT_H_39#define __AGENT_H_4041#include <linux/err.h>42#include <rdma/ib_mad.h>4344extern int ib_agent_port_open(struct ib_device *device, int port_num);4546extern int ib_agent_port_close(struct ib_device *device, int port_num);4748extern void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh,49const struct ib_wc *wc, const struct ib_device *device,50int port_num, int qpn, size_t resp_mad_len, bool opa);5152#endif /* __AGENT_H_ */535455