linux/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_config.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Marvell Octeon EP (EndPoint) VF Ethernet Driver
 *
 * Copyright (C) 2020 Marvell.
 *
 */

#ifndef _OCTEP_VF_CONFIG_H_
#define _OCTEP_VF_CONFIG_H_

/* Tx instruction types by length */
#define OCTEP_VF_32BYTE_INSTR
#define OCTEP_VF_64BYTE_INSTR

/* Tx Queue: maximum descriptors per ring */
#define OCTEP_VF_IQ_MAX_DESCRIPTORS
/* Minimum input (Tx) requests to be enqueued to ring doorbell */
#define OCTEP_VF_DB_MIN
/* Packet threshold for Tx queue interrupt */
#define OCTEP_VF_IQ_INTR_THRESHOLD

/* Minimum watermark for backpressure */
#define OCTEP_VF_OQ_WMARK_MIN

/* Rx Queue: maximum descriptors per ring */
#define OCTEP_VF_OQ_MAX_DESCRIPTORS

/* Rx buffer size: Use page size buffers.
 * Build skb from allocated page buffer once the packet is received.
 * When a gathered packet is received, make head page as skb head and
 * page buffers in consecutive Rx descriptors as fragments.
 */
#define OCTEP_VF_OQ_BUF_SIZE
#define OCTEP_VF_OQ_PKTS_PER_INTR
#define OCTEP_VF_OQ_REFILL_THRESHOLD

#define OCTEP_VF_OQ_INTR_PKT_THRESHOLD
#define OCTEP_VF_OQ_INTR_TIME_THRESHOLD

#define OCTEP_VF_MSIX_NAME_SIZE

/* Tx Queue wake threshold
 * wakeup a stopped Tx queue if minimum 2 descriptors are available.
 * Even a skb with fragments consume only one Tx queue descriptor entry.
 */
#define OCTEP_VF_WAKE_QUEUE_THRESHOLD

/* Minimum MTU supported by Octeon network interface */
#define OCTEP_VF_MIN_MTU
/* Maximum MTU supported by Octeon interface*/
#define OCTEP_VF_MAX_MTU
/* Default MTU */
#define OCTEP_VF_DEFAULT_MTU

/* Macros to get octeon config params */
#define CFG_GET_IQ_CFG(cfg)
#define CFG_GET_IQ_NUM_DESC(cfg)
#define CFG_GET_IQ_INSTR_TYPE(cfg)
#define CFG_GET_IQ_INSTR_SIZE(cfg)
#define CFG_GET_IQ_DB_MIN(cfg)
#define CFG_GET_IQ_INTR_THRESHOLD(cfg)

#define CFG_GET_OQ_NUM_DESC(cfg)
#define CFG_GET_OQ_BUF_SIZE(cfg)
#define CFG_GET_OQ_REFILL_THRESHOLD(cfg)
#define CFG_GET_OQ_INTR_PKT(cfg)
#define CFG_GET_OQ_INTR_TIME(cfg)
#define CFG_GET_OQ_WMARK(cfg)

#define CFG_GET_PORTS_ACTIVE_IO_RINGS(cfg)
#define CFG_GET_PORTS_MAX_IO_RINGS(cfg)

#define CFG_GET_CORE_TICS_PER_US(cfg)
#define CFG_GET_COPROC_TICS_PER_US(cfg)

#define CFG_GET_IOQ_MSIX(cfg)

/* Hardware Tx Queue configuration. */
struct octep_vf_iq_config {};

/* Hardware Rx Queue configuration. */
struct octep_vf_oq_config {};

/* Tx/Rx configuration */
struct octep_vf_ring_config {};

/* Octeon MSI-x config. */
struct octep_vf_msix_config {};

/* Data Structure to hold configuration limits and active config */
struct octep_vf_config {};
#endif /* _OCTEP_VF_CONFIG_H_ */