From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id B1EF59AC1 for ; Wed, 25 Mar 2015 20:25:25 +0100 (CET) Received: by wgra20 with SMTP id a20so39183273wgr.3 for ; Wed, 25 Mar 2015 12:25:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=7ceaCkgMo77FHL4LlbatjYI4/9yj+q8uiSLpsuCKsis=; b=j7xhkS0FiCGIU5O7CucF79ESr2ho/CFoQHD7/x3xok4KAqfxmZaYWeV5bpkq97LLK/ 8bNX82QthUGjWJO6RbpObkqSMiXp9R9B9zroDf8xwzk4ybRC/Xq58IaSG7FoCma/Jqtz VDvRagXMv/Id+1pwV5CuUrE6xe1G/f4Cz7qZCXtK6L5s/GFYM7wR5syLDV9arcI6q0K8 urjPzL87vU0Qjggkw/LKuuLo4lJVZgXQJaDgCvJEE4qCWqzjPTPVvpn+qMoOT76JgPrf fU1gqZDQG61+r+fN4mZ1qivYMvcWU3fn3eT+Ls8NOcWjkA1UI6GDDEvIPeYeYvGJWgD2 PXAA== X-Gm-Message-State: ALoCoQmqwfY4SEnfLY+mVlXpORblN3J0ZV7MaQ+Mz4DFIFxF8Ux5pcc0FfGz/cjEtR1KYbacxYNe X-Received: by 10.180.74.47 with SMTP id q15mr39906464wiv.49.1427311525496; Wed, 25 Mar 2015 12:25:25 -0700 (PDT) Received: from [192.168.0.101] ([90.152.119.35]) by mx.google.com with ESMTPSA id ev7sm5020985wjb.47.2015.03.25.12.25.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2015 12:25:24 -0700 (PDT) Message-ID: <55130BA5.4080209@linaro.org> Date: Wed, 25 Mar 2015 19:25:25 +0000 From: Zoltan Kiss User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: dev@dpdk.org, dev@openvswitch.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 25 Mar 2015 23:52:36 +0100 Subject: [dpdk-dev] ovs-dpdk: ofpbuf reinitialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 19:25:25 -0000 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