mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
7e86845a03
Commit e87a911fed07 ("nvme-rdma: use ib_client API to detect device removal") explains the benefits of handling device removal outside of the CM event handler. Sketch in an IB device removal notification mechanism that can be used by both the client and server side RPC-over-RDMA transport implementations. Suggested-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
28 lines
709 B
C
28 lines
709 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* * Copyright (c) 2024, Oracle and/or its affiliates.
|
|
*/
|
|
|
|
#ifndef _LINUX_SUNRPC_RDMA_RN_H
|
|
#define _LINUX_SUNRPC_RDMA_RN_H
|
|
|
|
#include <rdma/ib_verbs.h>
|
|
|
|
/**
|
|
* rpcrdma_notification - request removal notification
|
|
*/
|
|
struct rpcrdma_notification {
|
|
void (*rn_done)(struct rpcrdma_notification *rn);
|
|
u32 rn_index;
|
|
};
|
|
|
|
int rpcrdma_rn_register(struct ib_device *device,
|
|
struct rpcrdma_notification *rn,
|
|
void (*done)(struct rpcrdma_notification *rn));
|
|
void rpcrdma_rn_unregister(struct ib_device *device,
|
|
struct rpcrdma_notification *rn);
|
|
int rpcrdma_ib_client_register(void);
|
|
void rpcrdma_ib_client_unregister(void);
|
|
|
|
#endif /* _LINUX_SUNRPC_RDMA_RN_H */
|