History

RDMA/core: Add RDMA_NLDEV_CMD_NEWLINK/DELLINK support

Add support for new LINK messages to allow adding and deleting rdma interfaces. This will be used initially for soft rdma drivers which instantiate device instances dynamically by the admin specifying a netdev device to use. The rdma_rxe module will be the first user of these messages. The design is modeled after RTNL_NEWLINK/DELLINK: rdma drivers register with the rdma core if they provide link add/delete functions. Each driver registers with a unique "type" string, that is used to dispatch messages coming from user space. A new RDMA_NLDEV_ATTR is defined for the "type" string. User mode will pass 3 attributes in a NEWLINK message: RDMA_NLDEV_ATTR_DEV_NAME for the desired rdma device name to be created, RDMA_NLDEV_ATTR_LINK_TYPE for the "type" of link being added, and RDMA_NLDEV_ATTR_NDEV_NAME for the net_device interface to use for this link. The DELLINK message will contain the RDMA_NLDEV_ATTR_DEV_INDEX of the device to delete.

Steve Wise committed 7 years ago

Commit 3856ec41 parent 5bb3c1e4 files · +144 −2Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/rdma/rdma_netlink.h+8−2
@@ -255,9 +255,11 @@ enum rdma_nldev_command { · 254 unmodified lines
255255 RDMA_NLDEV_CMD_GET, /* can dump */
256256 RDMA_NLDEV_CMD_SET,
257257
258− /* 3 - 4 are free to use */
258+ RDMA_NLDEV_CMD_NEWLINK,
259259
260− RDMA_NLDEV_CMD_PORT_GET = 5, /* can dump */
260+ RDMA_NLDEV_CMD_DELLINK,
261+
262+ RDMA_NLDEV_CMD_PORT_GET, /* can dump */
261263
262264 /* 6 - 8 are free to use */
263265
@@ -465,6 +467,10 @@ enum rdma_nldev_attr { · 201 unmodified lines
465467 RDMA_NLDEV_ATTR_RES_MRN, /* u32 */
466468 RDMA_NLDEV_ATTR_RES_CM_IDN, /* u32 */
467469 RDMA_NLDEV_ATTR_RES_CTXN, /* u32 */
470+ /*
471+ * Identifies the rdma driver. eg: "rxe" or "siw"
472+ */
473+ RDMA_NLDEV_ATTR_LINK_TYPE, /* string */
468474
469475 /*
470476 * Always the end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t