From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na3sys009aog131.obsmtp.com (na3sys009aog131.obsmtp.com [74.125.149.247]) by dpdk.org (Postfix) with SMTP id 080539AA2 for ; Wed, 25 Mar 2015 20:46:00 +0100 (CET) Received: from mail-ie0-f179.google.com ([209.85.223.179]) (using TLSv1) by na3sys009aob131.postini.com ([74.125.148.12]) with SMTP ID DSNKVRMQeOtlUtJwz2Aue7Ew9ku4GHKLkNa+@postini.com; Wed, 25 Mar 2015 12:46:01 PDT Received: by mail-ie0-f179.google.com with SMTP id vj10so30519132iec.0 for ; Wed, 25 Mar 2015 12:46:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=vvJx1L/7jh8t7qlJs3gg56JxxfG6X25YEYa7qS1CpwU=; b=RCGFs6+gdAVNr5/R0lz7SpTfcurBPwnfjaYuT1LT9l/JgPeIMTv7FgDtSI/zRwVHW1 dbF8IUNGLz6q3F8Y2bCJz52D98WNlAejYwHChJtTAj2F2LINXzKGtW+2Zr6f7N3aFpfd 2D+P+boe3fHZUClByaJN2EnWvHiW+ZpfFVZtrnWOu9eAcRq8eiZv3XydQQjVdeOxvYOp igNKNfMEvjNILnGgS2/7YuXiBpMKH9A8uTaGBwqlvd9ATJ+8hs55Q50nyRAspsjFosdK ZjTUNUWK4ttUTlsHPKL+VQlUcZc02QOXpMXZ3eC2x+9YBxn/AkPR5d6f1OoT423I5YUM 6oJg== X-Gm-Message-State: ALoCoQno0dbzAIreWyBE6knA5nQpvgh9LPfSaUtnYtF6B/3T99kfb5SgQtxXiEuNGfLS4Iqkt32Un32uB27AvOHubPHlBDxAkUyyGMSaNl8kPvu0pXWpScIXj/vKHGyCAUkKKmwxSnZLPMmccGnjmx/UXHLUmPG0VQ== X-Received: by 10.42.193.69 with SMTP id dt5mr1558979icb.42.1427312760021; Wed, 25 Mar 2015 12:46:00 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.42.193.69 with SMTP id dt5mr1558968icb.42.1427312759922; Wed, 25 Mar 2015 12:45:59 -0700 (PDT) Received: by 10.107.136.31 with HTTP; Wed, 25 Mar 2015 12:45:59 -0700 (PDT) In-Reply-To: <55130BA5.4080209@linaro.org> References: <55130BA5.4080209@linaro.org> Date: Wed, 25 Mar 2015 12:45:59 -0700 Message-ID: From: Pravin Shelar To: Zoltan Kiss Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" , "dev@openvswitch.org" Subject: Re: [dpdk-dev] [ovs-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:46:01 -0000 On Wed, Mar 25, 2015 at 12:25 PM, Zoltan Kiss 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.