From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 0DE5511C5 for ; Wed, 4 Mar 2015 09:05:37 +0100 (CET) Received: by wghb13 with SMTP id b13so44854484wgh.0 for ; Wed, 04 Mar 2015 00:05:36 -0800 (PST) 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 :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=UeNC69+b2qtCcLvEZ9jCyEds4c1EfpozFi7fgKsiJRc=; b=TAcEpQLB72CSigv1brGgOq8ceK4o7+9qrhrcB7XDwqbGWcK2mI8H0VrSLoXDKQMGxD swdW1XwD6FTfSNRUAJ8KxtLH8KZhPiimj6hL9+vZZRhXDtz5dVaDI7TnFgaIn7pG5eLL 0kqfhdrxIyxwGAmvEjHEArSsogfE5qhLNZL2Jh4uLbiaiHGJi4vCEUu+PzYgVQBgqiwD 8gQnAG88DTKDXUjmdfRix/ybiwPsgnZcbUzO2p8rr7fd7XGaeAxyi1zrcBlUFe5j9cMP 53C3wyG9V5y0UPq7UHTDV4246UVCxINCZZOyoT083dCLTw3Y7GU+RfHU5Pnv5r91hZkD /Y7w== X-Gm-Message-State: ALoCoQm6chUJU86R+HPZRkrn3xgb1iA0mTBDtSRiBLfvjdySqTAismkKusDCa4m9A44M8D8mRqIC X-Received: by 10.180.7.131 with SMTP id j3mr10279172wia.55.1425456336921; Wed, 04 Mar 2015 00:05:36 -0800 (PST) Received: from avi.cloudius ([212.143.139.214]) by mx.google.com with ESMTPSA id q6sm2964588wix.13.2015.03.04.00.05.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 00:05:36 -0800 (PST) Message-ID: <54F6BCCE.80602@cloudius-systems.com> Date: Wed, 04 Mar 2015 10:05:34 +0200 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Stephen Hemminger , Vlad Zolotarov References: <1425412123-5227-1-git-send-email-vladz@cloudius-systems.com> <1425412123-5227-6-git-send-email-vladz@cloudius-systems.com> <20150303163359.2975c702@urahara> In-Reply-To: <20150303163359.2975c702@urahara> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1 5/5] ixgbe: Add LRO support 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, 04 Mar 2015 08:05:37 -0000 On 03/04/2015 02:33 AM, Stephen Hemminger wrote: > On Tue, 3 Mar 2015 21:48:43 +0200 > Vlad Zolotarov wrote: > >> + * TODO: >> + * - Get rid of "volatile" crap and let the compiler do its >> + * job. >> + * - Use the proper memory barrier (rte_rmb()) to ensure the >> + * memory ordering below. > This comment screams "this is broken". > Why not get proper architecture independent barriers in DPDK first. C11 has arch independent memory barriers, so this can be as simple as -std=gnu11 (default in gcc 5, anyway). Not only do we get the barriers for free, but they are also properly integrated with the compiler, so for example a release barrier won't stop the compiler from hoisting a later accesses to before the store, or cause spurious reloads, due to the memory clobber.