Thread (10 messages) flat view 10 messages, 3 authors, 2012-12-03

Re: [net-next RFC] pktgen: don't wait for the device who doesn't free skb immediately after sent

From: Jason Wang <hidden>
Date: 2012-11-27 06:45:33
Also in: lkml, netdev

On 11/27/2012 01:37 AM, Stephen Hemminger wrote:
On Mon, 26 Nov 2012 15:56:52 +0800
Jason Wang [off-list ref] wrote:
quoted
Some deivces do not free the old tx skbs immediately after it has been sent
(usually in tx interrupt). One such example is virtio-net which optimizes for
virt and only free the possible old tx skbs during the next packet sending. This
would lead the pktgen to wait forever in the refcount of the skb if no other
pakcet will be sent afterwards.

Solving this issue by introducing a new flag IFF_TX_SKB_FREE_DELAY which could
notify the pktgen that the device does not free skb immediately after it has
been sent and let it not to wait for the refcount to be one.

Signed-off-by: Jason Wang <redacted>
Another alternative would be using skb_orphan() and skb->destructor.
There are other cases where skb's are not freed right away.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hi Stephen:

Do you mean registering a skb->destructor for pktgen then set and check 
bits in skb->tx_flag?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help