Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1177 from longlimsft/rebase-upstream-v1
mana: Microsoft Azure Network Adapter (MANA) RDMA provider
- Loading branch information
Showing
28 changed files
with
1,549 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
etc/libibverbs.d/ | ||
usr/lib/*/libefa.so.* | ||
usr/lib/*/libibverbs/lib*-rdmav*.so | ||
usr/lib/*/libmana.so* | ||
usr/lib/*/libmlx4.so.* | ||
usr/lib/*/libmlx5.so.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# libefa, libmlx4 and libmlx5 are ibverbs provider that provides more functions. | ||
ibverbs-providers: package-name-doesnt-match-sonames libefa1 libmlx4-1 libmlx5-1 | ||
# libefa, libmana, libmlx4 and libmlx5 are ibverbs provider that provides more functions. | ||
ibverbs-providers: package-name-doesnt-match-sonames libefa1 libmana1 libmlx4-1 libmlx5-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* 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 | ||
|
||
struct mana_ib_create_cq { | ||
__aligned_u64 buf_addr; | ||
}; | ||
|
||
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_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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
rdma_shared_provider(mana libmana.map | ||
1 1.0.${PACKAGE_VERSION} | ||
mana.c | ||
manadv.c | ||
qp.c | ||
wq.c | ||
) | ||
|
||
publish_headers(infiniband | ||
manadv.h | ||
) | ||
|
||
rdma_pkg_config("mana" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* Export symbols should be added below according to | ||
Documentation/versioning.md document. */ | ||
MANA_1.0 { | ||
global: | ||
manadv_set_context_attr; | ||
manadv_init_obj; | ||
local: *; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rdma_man_pages( | ||
manadv.7.md | ||
manadv_init_obj.3.md | ||
manadv_set_context_attr.3.md | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
layout: page | ||
title: MANADV | ||
section: 7 | ||
tagline: Verbs | ||
date: 2022-05-16 | ||
header: "MANA Direct Verbs Manual" | ||
footer: mana | ||
--- | ||
|
||
# NAME | ||
manadv - Direct verbs for mana devices | ||
|
||
This provides low level access to mana devices to perform direct operations, | ||
without general branching performed by libibverbs. | ||
|
||
# DESCRIPTION | ||
The libibverbs API is an abstract one. It is agnostic to any underlying | ||
provider specific implementation. While this abstraction has the advantage | ||
of user applications portability, it has a performance penalty. For some | ||
applications optimizing performance is more important than portability. | ||
|
||
The mana direct verbs API is intended for such applications. | ||
It exposes mana specific low level operations, allowing the application | ||
to bypass the libibverbs API. | ||
|
||
This version of the driver supports one QP type: IBV_QPT_RAW_PACKET. To use | ||
this QP type, the application is required to use manadv_set_context_attr() | ||
to set external buffer allocators for allocating queues, and use | ||
manadv_init_obj() to obtain all the queue information. The application | ||
implements its own queue operations, bypassing libibverbs API for | ||
sending/receiving traffic over the queues. At hardware layer, IBV_QPT_RAW_PACKET | ||
QP shares the same hardware resource as the Ethernet port used in the kernel. | ||
The software checks for exclusive use of the hardware Ethernet port, and will | ||
fail the QP creation if the port is already in use. To create a | ||
IBV_QPT_RAW_PACKET on a specified port, the user needs to configure the system | ||
in such a way that this port is not used by any other software (including the | ||
Kernel). If the port is used, ibv_create_qp() will fail with errno set to EBUSY. | ||
|
||
The direct include of manadv.h together with linkage to mana library will | ||
allow usage of this new interface. | ||
|
||
# SEE ALSO | ||
**verbs**(7) | ||
|
||
# AUTHORS | ||
Long Li <longli@microsoft.com> |
Oops, something went wrong.