Skip to content

Commit 2b57ec4

Browse files
committed
refactor l2/l3 code for higher performance
1 parent 1de2d41 commit 2b57ec4

14 files changed

+14
-0
lines changed

ans/ans_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ static inline int ans_send_burst(struct ans_lcore_queue *qconf, uint16_t n, uint
601601
ret = rte_eth_tx_burst(port, queueid, m_table, n);
602602
if (unlikely(ret < n))
603603
{
604+
ans_packet_stats(port, n - ret);
605+
604606
do
605607
{
606608
rte_pktmbuf_free(m_table[ret]);

librte_ans/include/ans_init.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ int ans_register(ans_send_packet_cb send_cb);
9292
*/
9393
int ans_packet_handle(struct rte_mbuf *m, uint8_t portid);
9494

95+
/**
96+
* Handle the received packets by ans stack
97+
*
98+
* @param portid
99+
* port id.
100+
* @param packets_nb
101+
* droped packets number.
102+
*
103+
* @return
104+
*
105+
*/
106+
void ans_packet_stats(uint8_t portid, uint16_t packets_nb);
95107

96108
/**
97109
* Handle ans internal message.

librte_ans/librte_ans_broadwell.a

-564 Bytes
Binary file not shown.

librte_ans/librte_ans_core2.a

-564 Bytes
Binary file not shown.

librte_ans/librte_ans_haswell.a

-564 Bytes
Binary file not shown.

librte_ans/librte_ans_ivybridge.a

-564 Bytes
Binary file not shown.
-564 Bytes
Binary file not shown.

librte_ans/librte_ans_westmere.a

-564 Bytes
Binary file not shown.
8.21 KB
Binary file not shown.
8.21 KB
Binary file not shown.

0 commit comments

Comments
 (0)