bus/fslmc: define VLAN header length
[dpdk.git] / drivers / bus / fslmc / portal / dpaa2_hw_pvt.h
index 453fc10..4e25803 100644 (file)
 #include <mc/fsl_mc_sys.h>
 #include <fsl_qbman_portal.h>
 
+#ifndef false
+#define false      0
+#endif
+#ifndef true
+#define true       1
+#endif
+
+#ifndef ETH_VLAN_HLEN
+#define ETH_VLAN_HLEN   4 /** < Vlan Header Length */
+#endif
+#define DPAA2_DQRR_RING_SIZE   16
+       /** <Maximum number of slots available in RX ring*/
 
 #define MC_PORTAL_INDEX                0
 #define NUM_DPIO_REGIONS       2
+#define NUM_DQS_PER_QUEUE       2
 
 /* Maximum release/acquire from QBMAN */
 #define DPAA2_MBUF_MAX_ACQ_REL 7
 
 #define MAX_BPID 256
+#define DPAA2_MBUF_HW_ANNOTATION       64
+#define DPAA2_FD_PTA_SIZE              64
+
+#if (DPAA2_MBUF_HW_ANNOTATION + DPAA2_FD_PTA_SIZE) > RTE_PKTMBUF_HEADROOM
+#error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"
+#endif
+
+/* we will re-use the HEADROOM for annotation in RX */
+#define DPAA2_HW_BUF_RESERVE   0
+#define DPAA2_PACKET_LAYOUT_ALIGN      64 /*changing from 256 */
 
 struct dpaa2_dpio_dev {
        TAILQ_ENTRY(dpaa2_dpio_dev) next;
@@ -77,6 +100,23 @@ struct dpaa2_dpbp_dev {
        uint32_t dpbp_id; /*HW ID for DPBP object */
 };
 
+struct queue_storage_info_t {
+       struct qbman_result *dq_storage[NUM_DQS_PER_QUEUE];
+};
+
+struct dpaa2_queue {
+       struct rte_mempool *mb_pool; /**< mbuf pool to populate RX ring. */
+       void *dev;
+       int32_t eventfd;        /*!< Event Fd of this queue */
+       uint32_t fqid;          /*!< Unique ID of this queue */
+       uint8_t tc_index;       /*!< traffic class identifier */
+       uint16_t flow_id;       /*!< To be used by DPAA2 frmework */
+       uint64_t rx_pkts;
+       uint64_t tx_pkts;
+       uint64_t err_pkts;
+       struct queue_storage_info_t *q_storage;
+};
+
 /*! Global MCP list */
 extern void *(*rte_mcp_ptr_list);