// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
* Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
* Copyright (c) 2015 System Fabric Works, Inc. All rights reserved.
*/
#include <linux/dma-mapping.h>
#include <net/addrconf.h>
#include <rdma/uverbs_ioctl.h>
#include "rxe.h"
#include "rxe_queue.h"
#include "rxe_hw_counters.h"
static int post_one_recv(struct rxe_rq *rq, const struct ib_recv_wr *ibwr);
/* dev */
static int rxe_query_device(struct ib_device *ibdev,
struct ib_device_attr *attr,
struct ib_udata *udata)
{
struct rxe_dev *rxe = to_rdev(ibdev);
int err;
if (udata->inlen || udata->outlen) {
rxe_dbg_dev(rxe, "malformed udata\n");
err = -EINVAL;
goto err_out;
}
memcpy(attr, &rxe->attr, sizeof(*