xref: /linux/drivers/net/ethernet/cisco/enic/enic_admin.h (revision 91ec2035134982b98fab0609a9fd8480e8217dc1)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright 2025 Cisco Systems, Inc.  All rights reserved. */
3 
4 #ifndef _ENIC_ADMIN_H_
5 #define _ENIC_ADMIN_H_
6 
7 #define ENIC_ADMIN_DESC_COUNT	64
8 #define ENIC_ADMIN_BUF_SIZE	2048
9 
10 struct enic;
11 
12 /* Wrapper for received admin messages queued for deferred processing.
13  * The admin CQ poll work handler enqueues these; a separate work handler
14  * processes them where sleeping (mutex, GFP_KERNEL) is safe.
15  */
16 struct enic_admin_msg {
17 	struct list_head list;
18 	unsigned int len;
19 	u8 data[] __aligned(8);
20 };
21 
22 int enic_admin_channel_open(struct enic *enic);
23 void enic_admin_channel_close(struct enic *enic);
24 unsigned int enic_admin_wq_cq_service(struct enic *enic);
25 unsigned int enic_admin_rq_cq_service(struct enic *enic);
26 
27 #endif /* _ENIC_ADMIN_H_ */
28