[dpdk-dev] [ovs-dev] ovs-dpdk: ofpbuf reinitialization

Pravin Shelar pshelar at nicira.com
Wed Mar 25 20:45:59 CET 2015


On Wed, Mar 25, 2015 at 12:25 PM, Zoltan Kiss <zoltan.kiss at 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.


More information about the dev mailing list