mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
Drivers: hv: vmbus: Introduce vmbus_request_addr_match()
The function can be used to retrieve and clear/remove a transation ID from a channel requestor, provided the memory address corresponding to the ID equals a specified address. The function, and its 'lockless' variant __vmbus_request_addr_match(), will be used by hv_pci. Refactor vmbus_request_addr() to reuse the 'newly' introduced code. No functional change. Suggested-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20220419122325.10078-5-parri.andrea@gmail.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
committed by
Wei Liu
parent
b03afa57c6
commit
0aadb6a7bb
@@ -788,6 +788,7 @@ struct vmbus_requestor {
|
||||
|
||||
#define VMBUS_NO_RQSTOR U64_MAX
|
||||
#define VMBUS_RQST_ERROR (U64_MAX - 1)
|
||||
#define VMBUS_RQST_ADDR_ANY U64_MAX
|
||||
/* NetVSC-specific */
|
||||
#define VMBUS_RQST_ID_NO_RESPONSE (U64_MAX - 2)
|
||||
/* StorVSC-specific */
|
||||
@@ -1042,6 +1043,10 @@ struct vmbus_channel {
|
||||
};
|
||||
|
||||
u64 vmbus_next_request_id(struct vmbus_channel *channel, u64 rqst_addr);
|
||||
u64 __vmbus_request_addr_match(struct vmbus_channel *channel, u64 trans_id,
|
||||
u64 rqst_addr);
|
||||
u64 vmbus_request_addr_match(struct vmbus_channel *channel, u64 trans_id,
|
||||
u64 rqst_addr);
|
||||
u64 vmbus_request_addr(struct vmbus_channel *channel, u64 trans_id);
|
||||
|
||||
static inline bool is_hvsock_channel(const struct vmbus_channel *c)
|
||||
|
||||
Reference in New Issue
Block a user