mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Moves wq related function to enic_wq.c. Prepares for a cleaup of enic wq code path. Co-developed-by: Nelson Escobar <neescoba@cisco.com> Signed-off-by: Nelson Escobar <neescoba@cisco.com> Co-developed-by: John Daley <johndale@cisco.com> Signed-off-by: John Daley <johndale@cisco.com> Signed-off-by: Satish Kharat <satishkh@cisco.com> Link: https://patch.msgid.link/20250304-enic_cleanup_and_ext_cq-v2-6-85804263dad8@cisco.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright 2008-2010 Cisco Systems, Inc. All rights reserved.
|
|
* Copyright 2007 Nuova Systems, Inc. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _CQ_DESC_H_
|
|
#define _CQ_DESC_H_
|
|
|
|
/*
|
|
* Completion queue descriptor types
|
|
*/
|
|
enum cq_desc_types {
|
|
CQ_DESC_TYPE_WQ_ENET = 0,
|
|
CQ_DESC_TYPE_DESC_COPY = 1,
|
|
CQ_DESC_TYPE_WQ_EXCH = 2,
|
|
CQ_DESC_TYPE_RQ_ENET = 3,
|
|
CQ_DESC_TYPE_RQ_FCP = 4,
|
|
};
|
|
|
|
/* Completion queue descriptor: 16B
|
|
*
|
|
* All completion queues have this basic layout. The
|
|
* type_specfic area is unique for each completion
|
|
* queue type.
|
|
*/
|
|
struct cq_desc {
|
|
__le16 completed_index;
|
|
__le16 q_number;
|
|
u8 type_specfic[11];
|
|
u8 type_color;
|
|
};
|
|
|
|
#define CQ_DESC_TYPE_BITS 4
|
|
#define CQ_DESC_TYPE_MASK ((1 << CQ_DESC_TYPE_BITS) - 1)
|
|
#define CQ_DESC_COLOR_MASK 1
|
|
#define CQ_DESC_COLOR_SHIFT 7
|
|
#define CQ_DESC_Q_NUM_BITS 10
|
|
#define CQ_DESC_Q_NUM_MASK ((1 << CQ_DESC_Q_NUM_BITS) - 1)
|
|
#define CQ_DESC_COMP_NDX_BITS 12
|
|
#define CQ_DESC_COMP_NDX_MASK ((1 << CQ_DESC_COMP_NDX_BITS) - 1)
|
|
|
|
#define CQ_DESC_32_FI_MASK (BIT(0) | BIT(1))
|
|
#define CQ_DESC_64_FI_MASK (BIT(0) | BIT(1))
|
|
|
|
#endif /* _CQ_DESC_H_ */
|