26 #include <rte_config.h> 28 #include <tas_memif.h> 36 rte_prefetch0(dma_pointer(actx->tx_base + actx->tx_head, 1));
45 uint32_t flow_id = -1;
48 if (actx->tx_len == 0)
51 atx = dma_pointer(actx->tx_base + actx->tx_head,
sizeof(*atx));
58 }
else if (type != FLEXTCP_PL_ATX_CONNUPDATE) {
59 fprintf(stderr,
"fast_appctx_poll: unknown type: %u id=%u\n", type,
67 flow_id = atx->msg.connupdate.flow_id;
68 if (flow_id >= FLEXNIC_PL_FLOWST_NUM) {
69 fprintf(stderr,
"fast_appctx_poll: invalid flow id=%u\n", flow_id);
73 void *fs = &fp_state->flowst[flow_id];
75 rte_prefetch0(fs + 64);
77 actx->tx_head +=
sizeof(*atx);
78 if (actx->tx_head >= actx->tx_len)
79 actx->tx_head -= actx->tx_len;
85 struct network_buf_handle *nbh, uint32_t ts)
90 ret = fast_flows_bump(ctx, atx->msg.connupdate.flow_id,
91 atx->msg.connupdate.bump_seq, atx->msg.connupdate.rx_bump,
92 atx->msg.connupdate.tx_bump, atx->msg.connupdate.flags, nbh, ts);
107 rte_prefetch0(dma_pointer(actx->rx_base + actx->rx_head,
119 if (actx->rx_avail == 0) {
124 parx = dma_pointer(actx->rx_base + actx->rx_head,
sizeof(*parx));
126 rxnhead = actx->rx_head +
sizeof(*parx);
127 if (rxnhead >= actx->rx_len) {
128 rxnhead -= actx->rx_len;
130 actx->rx_head = rxnhead;
131 actx->rx_avail -=
sizeof(*parx);
144 if (actx->rx_avail > actx->rx_len / 2) {
148 pos = actx->rx_head + actx->rx_avail;
149 if (pos >= actx->rx_len)
153 while (actx->rx_avail < actx->rx_len && i < 2 * BATCH_SIZE) {
154 parx = dma_pointer(actx->rx_base + pos,
sizeof(*parx));
156 if (parx->type != 0) {
160 actx->rx_avail +=
sizeof(*parx);
161 pos +=
sizeof(*parx);
162 if (pos >= actx->rx_len)