Contributors: 6
Author Tokens Token Proportion Commits Commit Proportion
Long Li 125 63.13% 1 11.11%
Konstantin Taranov 58 29.29% 2 22.22%
Moni Shoua 6 3.03% 1 11.11%
Matan Barak 5 2.53% 3 33.33%
Michael Guralnik 2 1.01% 1 11.11%
Avihai Horon 2 1.01% 1 11.11%
Total 198 9

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
/*
 * Copyright (c) 2022, Microsoft Corporation. All rights reserved.
 */

#ifndef MANA_ABI_USER_H
#define MANA_ABI_USER_H

#include <linux/types.h>
#include <rdma/ib_user_ioctl_verbs.h>

/*
 * Increment this value if any changes that break userspace ABI
 * compatibility are made.
 */

#define MANA_IB_UVERBS_ABI_VERSION 1

enum mana_ib_create_cq_flags {
	MANA_IB_CREATE_RNIC_CQ	= 1 << 0,
};

struct mana_ib_create_cq {
	__aligned_u64 buf_addr;
	__u16	flags;
	__u16	reserved0;
	__u32	reserved1;
};

struct mana_ib_create_cq_resp {
	__u32 cqid;
	__u32 reserved;
};

struct mana_ib_create_qp {
	__aligned_u64 sq_buf_addr;
	__u32 sq_buf_size;
	__u32 port;
};

struct mana_ib_create_qp_resp {
	__u32 sqid;
	__u32 cqid;
	__u32 tx_vp_offset;
	__u32 reserved;
};

struct mana_ib_create_rc_qp {
	__aligned_u64 queue_buf[4];
	__u32 queue_size[4];
};

struct mana_ib_create_rc_qp_resp {
	__u32 queue_id[4];
};

struct mana_ib_create_wq {
	__aligned_u64 wq_buf_addr;
	__u32 wq_buf_size;
	__u32 reserved;
};

/* RX Hash function flags */
enum mana_ib_rx_hash_function_flags {
	MANA_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
};

struct mana_ib_create_qp_rss {
	__aligned_u64 rx_hash_fields_mask;
	__u8 rx_hash_function;
	__u8 reserved[7];
	__u32 rx_hash_key_len;
	__u8 rx_hash_key[40];
	__u32 port;
};

struct rss_resp_entry {
	__u32 cqid;
	__u32 wqid;
};

struct mana_ib_create_qp_rss_resp {
	__aligned_u64 num_entries;
	struct rss_resp_entry entries[64];
};

#endif