From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by dpdk.org (Postfix) with ESMTP id 6CA7C593A for ; Thu, 23 Oct 2014 01:35:19 +0200 (CEST) Received: by mail-oi0-f51.google.com with SMTP id h136so3580498oig.38 for ; Wed, 22 Oct 2014 16:43:40 -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=bNeuGE9/NyvwoLZj7p3tZbyl4Sh6xqK/aBf6SwXwCas=; b=XRlSKASfanN368oM+33I38gFsUUjfBD2rEc6AcOlSDOKpIrm/qGKy9zgHjWPp20L9F zibpODKmiYXeVTioCwfF1qAHcA6iEgl72+Sr1+RaMeb1lsMvnzFPmXCKmyJoSQ7EB57e UxEduA5B90MD7i3kWkZAaauwB0+BwmIqFb27xqzWPYKnQ3sLdugBu1QptkAn5nNXBE+z CkbCj12fPfMar7E24V4h3lDVffXepr31obM1VeItQJsmbax6VpgLtm1wbxAOhHhJ6yDd Y4pjb0zsWAki2h5QU3ZZxZd9XEFxJsOd62o7EzjhM/9nFQE/EUT5myftiey5HydOjW0g P3Rw== X-Gm-Message-State: ALoCoQl7UleNJX0zH63BfwssJ/PjJLWvB0lYsTpiTMqHdbRUOAO7jKm0T9QtzlDLKy1qky3dh/qJ MIME-Version: 1.0 X-Received: by 10.202.198.210 with SMTP id w201mr873863oif.45.1414021419884; Wed, 22 Oct 2014 16:43:39 -0700 (PDT) Received: by 10.182.31.111 with HTTP; Wed, 22 Oct 2014 16:43:39 -0700 (PDT) In-Reply-To: <1413975345-24326-2-git-send-email-bruce.richardson@intel.com> References: <1413975345-24326-1-git-send-email-bruce.richardson@intel.com> <1413975345-24326-2-git-send-email-bruce.richardson@intel.com> Date: Thu, 23 Oct 2014 08:43:39 +0900 Message-ID: From: Masaru Oki To: Bruce Richardson Content-Type: text/plain; charset=UTF-8 Cc: "" Subject: Re: [dpdk-dev] [PATCH 1/2] ixgbe: remove static qualifier for thread safety 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, 22 Oct 2014 23:35:20 -0000 Hi, in this code, pointer of local variable (mb_def) is returned by your changes. mb_def should be static for each thread. 2014-10-22 19:55 GMT+09:00 Bruce Richardson : > Remove the "static" prefix to the template mbuf variable in > ixgbe_rxq_vec_setup function. This will then allow different > threads to initialize different RX queues at the same time, > without one overwriting the other's data. > > Signed-off-by: Bruce Richardson > --- > lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c > index a0d3d78..e813e43 100644 > --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c > +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c > @@ -730,7 +730,7 @@ static struct ixgbe_txq_ops vec_txq_ops = { > int > ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq) > { > - static struct rte_mbuf mb_def = { > + struct rte_mbuf mb_def = { > .nb_segs = 1, > .data_off = RTE_PKTMBUF_HEADROOM, > #ifdef RTE_MBUF_REFCNT > -- > 1.9.3 >