Skip to content

Don't free null packets#23

Open
gz wants to merge 107 commits intoiMasaruOki:masterfrom
gz:patch-1
Open

Don't free null packets#23
gz wants to merge 107 commits intoiMasaruOki:masterfrom
gz:patch-1

Conversation

@gz
Copy link
Copy Markdown

@gz gz commented Jul 6, 2018

This example crashed for me. Steps to reproduce were run this on one host, run fping -a -g 192.168.0.0/24 -c 1 on another host.
I think what happened is that in some cases a pkt with length 0 was freed which probably should not happen.

Masaru OKI and others added 28 commits November 16, 2017 07:30
This reverts commit c331624.
- sync changed enum conversion rule since bindgen 0.31.
…en-0.32

Rust-DPDK 0.3.0.  Build with bindgen 0.32.
Tested only x86_64.
This example crashed for me I think what happened is that the line accidentally tried to free null packets (i.e. when nb_rx is 0)?
@iMasaruOki
Copy link
Copy Markdown
Owner

Thank you for pull request and sorry for late comment.
I read implementation of rte_eth_tx_buffer APIs.
If error in rte_eth_tx_buffer_flush(), call rte_pktmbuf_free() by drop callback.
Don't need "if sent < 0" in my code. It causes double free mbufs.
I will make fix code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants