Skip to content

Commit

Permalink
[Bug Fix] Update Stats for Outgoing Packets
Browse files Browse the repository at this point in the history
Updates the tx_burst function to properly account for
out stats.

Commit log:

* Update stats for outgoing packets

* Test if perf drop is gone
  • Loading branch information
bdevierno1 authored Jun 25, 2020
1 parent cc2c0bf commit 9f677c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions onvm/onvm_nflib/onvm_pkt_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ onvm_pkt_process_tx_batch(struct queue_mgr *tx_mgr, struct rte_mbuf *pkts[], uin
nf->stats.act_tonf++;
onvm_pkt_enqueue_nf(tx_mgr, meta->destination, pkts[i], nf);
} else if (meta->action == ONVM_NF_ACTION_OUT) {
nf->stats.act_out++;
if (tx_mgr->mgr_type_t == MGR) {
onvm_pkt_enqueue_port(tx_mgr, meta->destination, pkts[i]);
} else {
if (tx_mgr->mgr_type_t != MGR) {
nf->stats.act_out++;
out_buf = tx_mgr->to_tx_buf;
out_buf->buffer[out_buf->count++] = pkts[i];
if (out_buf->count == PACKET_READ_SIZE) {
onvm_pkt_enqueue_tx_thread(out_buf, nf);
}
} else {
onvm_pkt_enqueue_port(tx_mgr, meta->destination, pkts[i]);
}
} else {
printf("ERROR invalid action : this shouldn't happen.\n");
Expand Down

0 comments on commit 9f677c4

Please sign in to comment.