DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: dev-VfR2kkLFssw@public.gmane.org
Cc: Meir Tseitlin <mirots-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: rte_pktmbuf_alloc fails
Date: Mon, 07 Apr 2014 09:26:36 +0200	[thread overview]
Message-ID: <4032649.DyNZWczOjm@platinum> (raw)
In-Reply-To: <CA+Typ9kU8bPfT-9Be9O6uRAK-YWyJYAiMbtoCtbvXy4jQM-nJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Meir,

On Tuesday, April 01, 2014 02:53:47 PM Meir Tseitlin wrote:
> I think I found the problem - it was solved by manually calling
> rte_pktmbuf_free for each packet.
> It seems that rte_pktmbuf_free is not automatically called from
> within rte_eth_tx_burst if packets are sent to pcap device.

By looking at the eth_pcap_tx(pkts, nb_pkts) function, I think it may not work
properly. I think it should return nb_pkts instead of num_tx. Indeed, if
pcap_sendpacket() fails -- I don't know in which case it can occur -- the
function will return a number lower than nb_pkts, causing a caller like
l2fwd_send_burst() to free some mbufs. But all mbufs are already freed
by eth_pcap_tx().

I don't know if it's related to your problem but it may help.

Regards,
Olivier

  parent reply	other threads:[~2014-04-07  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 11:08 rte_pktmbuf_alloc fails Meir Tseitlin
     [not found] ` <CA+Typ9mJRUhSbOME=r3KFADxykKYN8snVAZ1JUEf8ohXbz-W7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-01 11:53   ` Meir Tseitlin
     [not found]     ` <CA+Typ9kU8bPfT-9Be9O6uRAK-YWyJYAiMbtoCtbvXy4jQM-nJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-07  7:26       ` Olivier MATZ [this message]
2014-04-07  8:53         ` Ananyev, Konstantin
     [not found]           ` <2601191342CEEE43887BDE71AB9772580EF94DE9-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-04-17 15:00             ` Thomas Monjalon
2014-05-22 15:47               ` Thomas Monjalon
2014-05-22 15:51                 ` Ananyev, Konstantin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4032649.DyNZWczOjm@platinum \
    --to=olivier.matz-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=mirots-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox