From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id BB0196A87 for ; Thu, 11 Dec 2014 13:33:12 +0100 (CET) Received: by mail-wg0-f43.google.com with SMTP id l18so6324273wgh.2 for ; Thu, 11 Dec 2014 04:33:12 -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 :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=OrWFVDVWjz9Myq7K0r8XNOWXnNsdAvbrN1NxOtogmKY=; b=LUCgiLNbKu5J756UTNTpD2DcbPooD4sg5TjGp4M6ermVJlswlYZRrWpLNzg9lV4QpQ pPOzwYb5wy35rBfs1Y9QUGw9aPDZlmCd5PMoLbHXtgp/DVVa6MkWUy8tUYnV1inHZlFz Z5xEyEhkSy0YDVNnq9DB9VqVddWA1nSgD1pkSrNEOYHPxax6j+trLtCyLakKUV8TgZo/ W1fnKRkbf1gKH7cet/tbHzITxTs3A5+zvjEkNq0ihvenLJTvdinUZTKZNrWwEpDgPRjz nqFPEOJIpi9QAjhCP4r2VMO4xsNoRtogXwzCVo7rUpbM0aJwi+hC1YTef3VsP8p9IebJ NHjw== X-Gm-Message-State: ALoCoQkDd7uNeCplMlUJWHlqW0gaACjurd2Q2yzWlHFGTisDUvfnxW1o9QabIkfJuX5jOBGN+XXu X-Received: by 10.180.20.106 with SMTP id m10mr15631384wie.1.1418301192078; Thu, 11 Dec 2014 04:33:12 -0800 (PST) Received: from [10.16.0.195] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id gl11sm1487818wjc.40.2014.12.11.04.33.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Dec 2014 04:33:11 -0800 (PST) Message-ID: <54898F06.2060503@6wind.com> Date: Thu, 11 Dec 2014 13:33:10 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: Konstantin Ananyev , dev@dpdk.org References: <1418298582-6953-1-git-send-email-konstantin.ananyev@intel.com> In-Reply-To: <1418298582-6953-1-git-send-email-konstantin.ananyev@intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] librte_net: fix TX checksum offload problem with IPv6 packet. 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: Thu, 11 Dec 2014 12:33:12 -0000 Hi Konstantin, On 12/11/2014 12:49 PM, Konstantin Ananyev wrote: > For rte_ipv6_phdr_cksum() gcc 4.8.* with "-O3" not always generates > correct code. > Sometimes it 'forgets' to put len and proto fields of psd_header on the stack. > To overcome that problem and speedup things a bit, refactored rte_raw_cksum() > by splitting ipv6 pseudo-header csum calculation into 3 phases: > 1. calc sum for src & dst addresses > 2. add sum for proto & len. > 3. finalise sum > That makes gcc to generate valid code and helps to avoid any copying. > > Signed-off-by: Konstantin Ananyev Acked-by: Olivier Matz