DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pravin Shelar <pshelar@nicira.com>
To: Zoltan Kiss <zoltan.kiss@linaro.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"dev@openvswitch.org" <dev@openvswitch.org>
Subject: Re: [dpdk-dev] [ovs-dev] ovs-dpdk: ofpbuf reinitialization
Date: Wed, 25 Mar 2015 12:45:59 -0700	[thread overview]
Message-ID: <CALnjE+qu4r2d1C33tnUwBvotmCf7H26K2vVrqwteBHjyArF0Lw@mail.gmail.com> (raw)
In-Reply-To: <55130BA5.4080209@linaro.org>

On Wed, Mar 25, 2015 at 12:25 PM, Zoltan Kiss <zoltan.kiss@linaro.org> wrote:
> Hi,
>
> Looking around in the DPDK code I've found that it only initializes the
> packet metadata (whih contains the struct ofpbuf belonging to the packet)
> during setup, as the packet initializer of rte_mempool_create.
> That means that every time a packet buffer is released back by OVS to the
> buffer pool, it retains ofpbuf state, and it doesn't change when the poll
> mode driver use the buffer again to store a new packet. "source" and
> "allocated members of ofpbuf shouldn't change, but frame, l2_pad_size and
> the offsets does at various places. Even though I couldn't establish an
> error scenario yet, I think it's quite dangerous to leave the packet to
> inherit the previous packet's ofpbuf.
> Or am I missing some place where this piece is reinitialized?
>

l2_pad and offsets are initialized during flow extraction. These
fields should not be accessed before this step.

      reply	other threads:[~2015-03-25 19:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 19:25 [dpdk-dev] " Zoltan Kiss
2015-03-25 19:45 ` Pravin Shelar [this message]

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=CALnjE+qu4r2d1C33tnUwBvotmCf7H26K2vVrqwteBHjyArF0Lw@mail.gmail.com \
    --to=pshelar@nicira.com \
    --cc=dev@dpdk.org \
    --cc=dev@openvswitch.org \
    --cc=zoltan.kiss@linaro.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;
as well as URLs for NNTP newsgroup(s).