linux/drivers/net/ethernet/cisco/enic/cq_enet_desc.h

/* 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_ENET_DESC_H_
#define _CQ_ENET_DESC_H_

#include "cq_desc.h"

/* Ethernet completion queue descriptor: 16B */
struct cq_enet_wq_desc {};

static inline void cq_enet_wq_desc_dec(struct cq_enet_wq_desc *desc,
	u8 *type, u8 *color, u16 *q_number, u16 *completed_index)
{}

/* Completion queue descriptor: Ethernet receive queue, 16B */
struct cq_enet_rq_desc {};

#define CQ_ENET_RQ_DESC_FLAGS_INGRESS_PORT
#define CQ_ENET_RQ_DESC_FLAGS_FCOE
#define CQ_ENET_RQ_DESC_FLAGS_EOP
#define CQ_ENET_RQ_DESC_FLAGS_SOP

#define CQ_ENET_RQ_DESC_RSS_TYPE_BITS
#define CQ_ENET_RQ_DESC_RSS_TYPE_MASK
#define CQ_ENET_RQ_DESC_RSS_TYPE_NONE
#define CQ_ENET_RQ_DESC_RSS_TYPE_IPv4
#define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv4
#define CQ_ENET_RQ_DESC_RSS_TYPE_IPv6
#define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv6
#define CQ_ENET_RQ_DESC_RSS_TYPE_IPv6_EX
#define CQ_ENET_RQ_DESC_RSS_TYPE_TCP_IPv6_EX

#define CQ_ENET_RQ_DESC_FLAGS_CSUM_NOT_CALC

#define CQ_ENET_RQ_DESC_BYTES_WRITTEN_BITS
#define CQ_ENET_RQ_DESC_BYTES_WRITTEN_MASK
#define CQ_ENET_RQ_DESC_FLAGS_TRUNCATED
#define CQ_ENET_RQ_DESC_FLAGS_VLAN_STRIPPED

#define CQ_ENET_RQ_DESC_VLAN_TCI_VLAN_BITS
#define CQ_ENET_RQ_DESC_VLAN_TCI_VLAN_MASK
#define CQ_ENET_RQ_DESC_VLAN_TCI_CFI_MASK
#define CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_BITS
#define CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_MASK
#define CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_SHIFT

#define CQ_ENET_RQ_DESC_FCOE_SOF_BITS
#define CQ_ENET_RQ_DESC_FCOE_SOF_MASK
#define CQ_ENET_RQ_DESC_FCOE_EOF_BITS
#define CQ_ENET_RQ_DESC_FCOE_EOF_MASK
#define CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT

#define CQ_ENET_RQ_DESC_FLAGS_TCP_UDP_CSUM_OK
#define CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK
#define CQ_ENET_RQ_DESC_FLAGS_UDP
#define CQ_ENET_RQ_DESC_FCOE_ENC_ERROR
#define CQ_ENET_RQ_DESC_FLAGS_TCP
#define CQ_ENET_RQ_DESC_FLAGS_IPV4_CSUM_OK
#define CQ_ENET_RQ_DESC_FLAGS_IPV6
#define CQ_ENET_RQ_DESC_FLAGS_IPV4
#define CQ_ENET_RQ_DESC_FLAGS_IPV4_FRAGMENT
#define CQ_ENET_RQ_DESC_FLAGS_FCS_OK

static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc,
	u8 *type, u8 *color, u16 *q_number, u16 *completed_index,
	u8 *ingress_port, u8 *fcoe, u8 *eop, u8 *sop, u8 *rss_type,
	u8 *csum_not_calc, u32 *rss_hash, u16 *bytes_written, u8 *packet_error,
	u8 *vlan_stripped, u16 *vlan_tci, u16 *checksum, u8 *fcoe_sof,
	u8 *fcoe_fc_crc_ok, u8 *fcoe_enc_error, u8 *fcoe_eof,
	u8 *tcp_udp_csum_ok, u8 *udp, u8 *tcp, u8 *ipv4_csum_ok,
	u8 *ipv6, u8 *ipv4, u8 *ipv4_fragment, u8 *fcs_ok)
{}

#endif /* _CQ_ENET_DESC_H_ */