ovs-dpdk: ofpbuf reinitialization
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?
Regards,
Zoltan Kiss
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Zoltan Kiss
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_sizeand 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.