1*777e472cSBartosz Sobczak /*- 2*777e472cSBartosz Sobczak * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB 3*777e472cSBartosz Sobczak * 4*777e472cSBartosz Sobczak * Copyright (C) 2022 Intel Corporation 5*777e472cSBartosz Sobczak * 6*777e472cSBartosz Sobczak * This software is available to you under a choice of one of two 7*777e472cSBartosz Sobczak * licenses. You may choose to be licensed under the terms of the GNU 8*777e472cSBartosz Sobczak * General Public License (GPL) Version 2, available from the file 9*777e472cSBartosz Sobczak * COPYING in the main directory of this source tree, or the 10*777e472cSBartosz Sobczak * OpenFabrics.org BSD license below: 11*777e472cSBartosz Sobczak * 12*777e472cSBartosz Sobczak * Redistribution and use in source and binary forms, with or 13*777e472cSBartosz Sobczak * without modification, are permitted provided that the following 14*777e472cSBartosz Sobczak * conditions are met: 15*777e472cSBartosz Sobczak * 16*777e472cSBartosz Sobczak * - Redistributions of source code must retain the above 17*777e472cSBartosz Sobczak * copyright notice, this list of conditions and the following 18*777e472cSBartosz Sobczak * disclaimer. 19*777e472cSBartosz Sobczak * 20*777e472cSBartosz Sobczak * - Redistributions in binary form must reproduce the above 21*777e472cSBartosz Sobczak * copyright notice, this list of conditions and the following 22*777e472cSBartosz Sobczak * disclaimer in the documentation and/or other materials 23*777e472cSBartosz Sobczak * provided with the distribution. 24*777e472cSBartosz Sobczak * 25*777e472cSBartosz Sobczak * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26*777e472cSBartosz Sobczak * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27*777e472cSBartosz Sobczak * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28*777e472cSBartosz Sobczak * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 29*777e472cSBartosz Sobczak * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 30*777e472cSBartosz Sobczak * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 31*777e472cSBartosz Sobczak * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32*777e472cSBartosz Sobczak * SOFTWARE. 33*777e472cSBartosz Sobczak */ 34*777e472cSBartosz Sobczak 35*777e472cSBartosz Sobczak 36*777e472cSBartosz Sobczak #ifndef IRDMA_UQUERY_H 37*777e472cSBartosz Sobczak #define IRDMA_UQUERY_H 38*777e472cSBartosz Sobczak 39*777e472cSBartosz Sobczak #include <infiniband/verbs.h> 40*777e472cSBartosz Sobczak #include "osdep.h" 41*777e472cSBartosz Sobczak 42*777e472cSBartosz Sobczak struct libirdma_device { 43*777e472cSBartosz Sobczak uint32_t query_ver; 44*777e472cSBartosz Sobczak char lib_ver[32]; 45*777e472cSBartosz Sobczak uint8_t rsvd[128]; 46*777e472cSBartosz Sobczak }; 47*777e472cSBartosz Sobczak 48*777e472cSBartosz Sobczak int libirdma_query_device(struct ibv_context *ctx_in, struct libirdma_device *out); 49*777e472cSBartosz Sobczak #endif /* IRDMA_UQUERY_H */ 50