From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id B093158E8 for ; Tue, 10 Feb 2015 18:06:57 +0100 (CET) Received: by mail-wg0-f49.google.com with SMTP id l18so1841114wgh.8 for ; Tue, 10 Feb 2015 09:06:57 -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=dTOUeva5XnQDJXFj3DD4TQ0PCQ9I4LFsYYx90nnRhGw=; b=AGHQdePcDTTBZ56T6XonblPTLWOw4tZfhaRwrdfq0/DIc+jU82RHIK345v4NXUuPES K181w/PmJap2YioJeXOHC2bA1YyF/KnRdOiPoo84s9MXnWRRubSEv2Zap4TeZHbStlmk k2EUcmMiJkVVq6yqtlZK2cZP4/4pXye6bpxdYCqtv9a7kf2HT8I6Yl+H74MAfi02jUma UViyOZAuMxLooKpe0G5bjmeJWcheWFoUC55QM562U+620oDXmtqB5HunC/K9DOBlwtUw 9v1kyKCsco7f5wy52Xz7yeYIW1kQmXVDtPiOS8rsIhT3mspbbKp2hCtSwSNS0G6AS2iy u+Qg== X-Gm-Message-State: ALoCoQkTOJnsuxbc+ROUHUi2umSKDorgWFrE4mGArWt7ngxa8LAU9wdgluv4ovQsu1EhHh8MREVE X-Received: by 10.180.85.5 with SMTP id d5mr36898116wiz.53.1423588017588; Tue, 10 Feb 2015 09:06:57 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id dj5sm21204461wjb.28.2015.02.10.09.06.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Feb 2015 09:06:57 -0800 (PST) Message-ID: <54DA3AB0.3040500@6wind.com> Date: Tue, 10 Feb 2015 18:06:56 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: "Zhang, Helin" , "dev@dpdk.org" References: <1422623775-8050-1-git-send-email-olivier.matz@6wind.com> <1423041925-26956-1-git-send-email-olivier.matz@6wind.com> <1423041925-26956-4-git-send-email-olivier.matz@6wind.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 03/20] i40e: call i40e_txd_enable_checksum only for offloaded packets 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: Tue, 10 Feb 2015 17:06:57 -0000 Hi Helin, On 02/10/2015 07:03 AM, Zhang, Helin wrote: >> /* Enable checksum offloading */ >> cd_tunneling_params = 0; >> - i40e_txd_enable_checksum(ol_flags, &td_cmd, &td_offset, >> - l2_len, l3_len, outer_l2_len, >> - outer_l3_len, >> - &cd_tunneling_params); >> + if (ol_flags & I40E_TX_CKSUM_OFFLOAD_MASK) { > likely should be added. I would say unlikely() instead. I think the non-offload case should be the default one. What do you think? >> + i40e_txd_enable_checksum(ol_flags, &td_cmd, &td_offset, >> + l2_len, l3_len, outer_l2_len, >> + outer_l3_len, >> + &cd_tunneling_params); >> + } > As this code changes are in fast path, performance regression test is needed. I would > like to see the performance difference with or without this patch set. Hopefully nothing > different. If you need any helps, just let me know. I'm sorry, I won't have the needed resources to bench this as I would have to setup a performance platform with i40e devices. But I'm pretty sure that the code in non-offload case would be faster with this patch as it will avoid many operations in i40e_txd_enable_checksum(). For the offload case, as we also removed the if (l2_len == 0) and if (l3_len == 0), I think there are also less tests than before my patch series. So in my opinion, adding this test does not really justify to check the performance. Regards, Olivier