-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smc: establish pnet table management
Connection creation with SMC-R starts through an internal TCP-connection. The Ethernet interface for this TCP-connection is not restricted to the Ethernet interface of a RoCE device. Any existing Ethernet interface belonging to the same physical net can be used, as long as there is a defined relation between the Ethernet interface and some RoCE devices. This relation is defined with the help of an identification string called "Physical Net ID" or short "pnet ID". Information about defined pnet IDs and their related Ethernet interfaces and RoCE devices is stored in the SMC-R pnet table. A pnet table entry consists of the identifying pnet ID and the associated network and IB device. This patch adds pnet table configuration support using the generic netlink message interface referring to network and IB device by their names. Commands exist to add, delete, and display pnet table entries, and to flush or display the entire pnet table. There are cross-checks to verify whether the ethernet interfaces or infiniband devices really exist in the system. If either device is not available, the pnet ID entry is not created. Loss of network devices and IB devices is also monitored; a pnet ID entry is removed when an associated network or IB device is removed. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Thomas Richter
authored and
David S. Miller
committed
Jan 9, 2017
1 parent
a4cf044
commit 6812baa
Showing
6 changed files
with
604 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Shared Memory Communications over RDMA (SMC-R) and RoCE | ||
* | ||
* Definitions for generic netlink based configuration of an SMC-R PNET table | ||
* | ||
* Copyright IBM Corp. 2016 | ||
* | ||
* Author(s): Thomas Richter <tmricht@linux.vnet.ibm.com> | ||
*/ | ||
|
||
#ifndef _UAPI_LINUX_SMC_H_ | ||
#define _UAPI_LINUX_SMC_H_ | ||
|
||
/* Netlink SMC_PNETID attributes */ | ||
enum { | ||
SMC_PNETID_UNSPEC, | ||
SMC_PNETID_NAME, | ||
SMC_PNETID_ETHNAME, | ||
SMC_PNETID_IBNAME, | ||
SMC_PNETID_IBPORT, | ||
__SMC_PNETID_MAX, | ||
SMC_PNETID_MAX = __SMC_PNETID_MAX - 1 | ||
}; | ||
|
||
enum { /* SMC PNET Table commands */ | ||
SMC_PNETID_GET = 1, | ||
SMC_PNETID_ADD, | ||
SMC_PNETID_DEL, | ||
SMC_PNETID_FLUSH | ||
}; | ||
|
||
#define SMCR_GENL_FAMILY_NAME "SMC_PNETID" | ||
#define SMCR_GENL_FAMILY_VERSION 1 | ||
|
||
#endif /* _UAPI_LINUX_SMC_H */ |
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 @@ | ||
obj-$(CONFIG_SMC) += smc.o | ||
smc-y := af_smc.o smc_ib.o | ||
smc-y := af_smc.o smc_pnet.o smc_ib.o |
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
Oops, something went wrong.