Merged latest develop to nfapi

This commit is contained in:
Mahesh
2020-11-19 22:33:39 +05:30
424 changed files with 26528 additions and 12403 deletions
@@ -207,7 +207,11 @@ next:
uint16_t *in;
uint16_t *out;
in = (uint16_t *)s->buffers.prach[*subframe];
<<<<<<< HEAD
out = (uint16_t *)ru->prach_rxsigF[antenna];
=======
out = (uint16_t *)ru->prach_rxsigF[0][antenna];
>>>>>>> fork_develop_new
for (i = 0; i < 840*2; i++)
out[i] = ntohs(in[i]);
s->buffers.prach_busy[*subframe] = 0;
@@ -86,10 +86,16 @@ static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
<<<<<<< HEAD
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
.offloads = DEV_RX_OFFLOAD_JUMBO_FRAME,
.split_hdr_size = 0,
.max_rx_pkt_len = 9500,
=======
.offloads = DEV_RX_OFFLOAD_JUMBO_FRAME,
.split_hdr_size = 0,
.max_rx_pkt_len = 9500,
>>>>>>> fork_develop_new
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -215,7 +215,11 @@ next:
uint16_t *in;
uint16_t *out;
in = (uint16_t *)s->buffers.prach[*slot];
<<<<<<< HEAD
out = (uint16_t *)ru->prach_rxsigF[antenna];
=======
out = (uint16_t *)ru->prach_rxsigF[0][antenna];
>>>>>>> fork_develop_new
for (i = 0; i < 839*2; i++)
out[i] = ntohs(in[i]);
s->buffers.prach_busy[*slot] = 0;
@@ -275,6 +279,10 @@ void benetel_fh_if4p5_south_out(RU_t *ru,
int slot,
uint64_t timestamp)
{
<<<<<<< HEAD
=======
>>>>>>> fork_develop_new
//printf("XXX benetel_fh_if4p5_south_out %d %d %ld\n", frame, slot, timestamp);
benetel_eth_state_t *s = ru->ifdevice.priv;
NR_DL_FRAME_PARMS *fp;
@@ -86,10 +86,16 @@ static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.split_hdr_size = 0,
<<<<<<< HEAD
.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
.offloads = DEV_RX_OFFLOAD_JUMBO_FRAME,
.split_hdr_size = 0,
.max_rx_pkt_len = 9500,
=======
.offloads = DEV_RX_OFFLOAD_JUMBO_FRAME,
.split_hdr_size = 0,
.max_rx_pkt_len = 9500,
>>>>>>> fork_develop_new
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -234,7 +240,11 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
}
// Trigger start send DL packets
<<<<<<< HEAD
if(PAYLOAD_1 == 0x13 && PAYLOAD_2 == 0xe4 && SYMBOL == 0x46 && ANT_NUM == 0x00 && SUBFRAME == 0x00 && dl_start == 0){
=======
if(PAYLOAD_1 == 0x13 && PAYLOAD_2 == 0xe4 && SYMBOL == 0x44 && ANT_NUM == 0x00 && SUBFRAME == 0x00 && dl_start == 0){
>>>>>>> fork_develop_new
printf("\nU-Plane Started\n");
printf("\n====================================================\n");
@@ -253,7 +263,11 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
p.antenna = 0;
memcpy(p.iq, IQ_ptr, 5088);
store_ul(bs, &p);
<<<<<<< HEAD
//if (p.symbol==0) printf("store ul f.sl.sy %d.%d.%d\n", p.frame, p.slot, p.symbol);
=======
// if (p.symbol==0) printf("store ul f.sl.sy %d.%d.%d\n", p.frame, p.slot, p.symbol);
>>>>>>> fork_develop_new
}
// U-PLANE UL ANT_0 PROCESSING
@@ -268,7 +282,11 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
int tx_frame = frame;
int tx_subframe = subframe;
int tx_slot = slot;
<<<<<<< HEAD
int tx_symbol = symbol + 8;
=======
int tx_symbol = symbol + 10;
>>>>>>> fork_develop_new
if (tx_symbol > 13) {
tx_symbol -= 14;
@@ -286,7 +304,11 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
ANT_NUM = 0x00;
// Mask the symbol bits from UL packet received and apply the shift.
<<<<<<< HEAD
SYMBOL = ((SYMBOL & 0b00111111) + 8) % 14;
=======
SYMBOL = ((SYMBOL & 0b00111111) + 10) % 14;
>>>>>>> fork_develop_new
ANT_NUM = 0x00;
SUBFRAME = sf;
@@ -307,6 +329,10 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
memcpy(IQ_ptr, bs->buffers->dl[oai_slot] + tx_symbol * 1272*4,
1272*4);
}
<<<<<<< HEAD
=======
//printf("DL buffer f sf slot symbol %d %d %d %d (sf %d)\n", tx_frame, tx_subframe, tx_slot, tx_symbol, (int)sf);
>>>>>>> fork_develop_new
bs->buffers->dl_busy[oai_slot] &= ~(1 << tx_symbol);
unlock_dl_buffer(bs->buffers, oai_slot);
@@ -319,7 +345,11 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
{
// Mask the symbol bits from UL packet received and apply the shift.
<<<<<<< HEAD
SYMBOL = ((SYMBOL & 0b00111111) + 8) % 14;
=======
SYMBOL = ((SYMBOL & 0b00111111) +10) % 14;
>>>>>>> fork_develop_new
ANT_NUM = 0x01;
SUBFRAME = sf;
@@ -348,10 +378,17 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
else if(PAYLOAD_1 == 0x0d && PAYLOAD_2 == 0x28){
if (ANT_NUM == 0) {
int subframe = SUBFRAME >> 4;
<<<<<<< HEAD
int slot = ((SUBFRAME & 0x0f) << 2) | ((SYMBOL >> 6) & 0x03);
if (subframe==9) {
//printf("store prach f.sf.sl %d.%d.%d %d\n", FRAME, subframe, slot, subframe * 2 + slot);
store_prach(bs, FRAME, slot /*subframe * 2 + slot*/, IQ_ptr);
=======
//int slot = ((SUBFRAME & 0x0f) << 2) | ((SYMBOL >> 6) & 0x03);
if (subframe==9) {
//printf("store prach f.sf.sl %d.%d.%d %d\n", FRAME, subframe, slot, subframe * 2 + slot);
store_prach(bs, FRAME, subframe * 2 + 1, IQ_ptr);
>>>>>>> fork_develop_new
}
}
rte_pktmbuf_free(m);
+44
View File
@@ -27,17 +27,61 @@
void store_ul(benetel_t *bs, ul_packet_t *ul)
{
<<<<<<< HEAD
=======
#if 0
struct timespec t;
static struct timespec old;
clock_gettime(CLOCK_REALTIME, &t);
printf("store_ul %d.%ld (%ld)\n", (int)(t.tv_sec % 60), t.tv_nsec, t.tv_nsec - old.tv_nsec);
old = t;
#endif
>>>>>>> fork_develop_new
/* only antenna 0 for the moment */
if (ul->antenna != 0)
return;
if (ul->slot != bs->next_slot ||
ul->symbol != bs->next_symbol) {
<<<<<<< HEAD
printf("%s: fatal, expected frame.sl.symbol %d.%d.%d, got %d.%d.%d\n",
__FUNCTION__,
bs->expected_benetel_frame, bs->next_slot, bs->next_symbol,
ul->frame, ul->slot, ul->symbol);
exit(1);
=======
printf("%s: error, expected frame.sl.symbol %d.%d.%d, got %d.%d.%d\n",
__FUNCTION__,
bs->expected_benetel_frame, bs->next_slot, bs->next_symbol,
ul->frame, ul->slot, ul->symbol);
}
/* fill missing data with 0s */
while (ul->slot != bs->next_slot ||
ul->symbol != bs->next_symbol) {
lock_ul_buffer(bs->buffers, bs->next_slot);
if (bs->buffers->ul_busy[bs->next_slot] & (1 << bs->next_symbol)) {
printf("%s: warning, UL overflow (sl.symbol %d.%d)\n", __FUNCTION__,
bs->next_slot, bs->next_symbol);
}
memset(bs->buffers->ul[bs->next_slot] + bs->next_symbol * 1272*4,
0, 1272*4);
bs->buffers->ul_busy[bs->next_slot] |= (1 << bs->next_symbol);
signal_ul_buffer(bs->buffers, bs->next_slot);
unlock_ul_buffer(bs->buffers, bs->next_slot);
bs->next_symbol++;
if (bs->next_symbol == 14) {
bs->next_symbol = 0;
bs->next_slot = (bs->next_slot + 1) % 20;
if (bs->next_slot == 0) {
bs->expected_benetel_frame++;
bs->expected_benetel_frame &= 255;
}
}
>>>>>>> fork_develop_new
}
lock_ul_buffer(bs->buffers, bs->next_slot);