/******************************************************************************
*
-* Copyright (c) 2019 Intel.
+* Copyright (c) 2020 Intel.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
*******************************************************************************/
-
/**
* @brief Definitions and support functions to process XRAN packet
* @file xran_pkt_up.h
#ifndef _XRAN_PKT_UP_H_
#define _XRAN_PKT_UP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "xran_pkt.h"
#define IQ_PAIR_NUM_IN_RB 12
uint32_t sect_id:12; /**< 5.4.5.1 section identifier */
};
}fields;
- } __attribute__((__packed__));
+} __rte_packed;
/*
uint8_t compShift:4;
uint8_t compBitWidth:4;
} uLaw;
- } __attribute__((__packed__));
+} __rte_packed;
/*
{
int16_t i_sample:IQ_BITS; /**< This parameter is the In-phase sample value */
int16_t q_sample:IQ_BITS; /**< This parameter is the Quadrature sample value */
-} __rte_packed;;
+} __rte_packed;
+
+/**
+ ******************************************************************************
+ * @ingroup xran_common_pkt
+ *
+ * @description
+ * Structure holds complete xran u-plane packet header
+ * 3.1.1 Ethernet Encapsulation
+ *****************************************************************************/
+struct xran_up_pkt_hdr
+{
+ struct xran_ecpri_hdr ecpri_hdr; /**< eCPRI Transport Header */
+ struct radio_app_common_hdr app_hdr; /**< eCPRI Transport Header */
+ struct data_section_hdr data_sec_hdr;
+} __rte_packed;
+
+/**
+ ******************************************************************************
+ * @ingroup xran_common_pkt
+ *
+ * @description
+ * Structure holds complete xran u-plane packet header with compression
+ * 3.1.1 Ethernet Encapsulation
+ *****************************************************************************/
+struct xran_up_pkt_hdr_comp
+{
+ struct xran_ecpri_hdr ecpri_hdr; /**< eCPRI Transport Header */
+ struct radio_app_common_hdr app_hdr; /**< eCPRI Transport Header */
+ struct data_section_hdr data_sec_hdr; /**< data section Header */
+ struct data_section_compression_hdr data_comp_hdr; /** Compression Header */
+} __rte_packed;
+
+/**
+ ******************************************************************************
+ * @ingroup xran_common_pkt
+ *
+ * @description
+ * Structure holds complete ethernet and xran u-plane packet header
+ * 3.1.1 Ethernet Encapsulation
+ *****************************************************************************/
+struct eth_xran_up_pkt_hdr
+{
+ struct rte_ether_hdr eth_hdr;
+ struct xran_up_pkt_hdr xran_hdr;
+}__rte_packed;
+
+struct eth_xran_up_pkt_hdr_comp
+{
+ struct rte_ether_hdr eth_hdr;
+ struct xran_up_pkt_hdr_comp xran_hdr;
+}__rte_packed;
+
+
+#ifdef __cplusplus
+}
+#endif
#endif