From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by dpdk.org (Postfix) with ESMTP id 638525946 for ; Wed, 11 Feb 2015 18:13:37 +0100 (CET) Received: by mail-we0-f169.google.com with SMTP id k48so4861284wev.0 for ; Wed, 11 Feb 2015 09:13:37 -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=z5o8jGWuAxp3cYUILtYWQSp6F2OyXmWq7/LeFolL388=; b=PNSleemNJhYZvyDmuxNDycgMycOweh8zCJ/izDwNspG93PNTDPYugAnLspeTf1kzKg pVwAJ3HP5/nfWJ8Z3oH2RwOTCV3MpemjEyU+Q4udE7gDnpG6PxaAqMd9b+T8+hdVo1J3 WTOz+6ElJfZAAorrqW157xZy2gOwEPFSA8VZa1HTBuPmfAFcrgRBvJMWC/VcW2oqRsgv qhb6OyUxXvRtRaQOekSc4VBUkSjOckOmuy8SIkN4F9ieFx1o4LUEjUqrzbM1dn/ALFx2 moUDGJoicXjk9zOOr9rGROj2EZpO/qjRs7JgXZdRRSEiniyabZXBV9WAFslM/vb5RzTL O/0A== X-Gm-Message-State: ALoCoQnVbOYnFlK9recyJ/pzG7Y3qUs6aChQdS57vTVVONlR0xfenJ4BbWuVQKbX3yyOFow6/mEm X-Received: by 10.194.92.9 with SMTP id ci9mr63871515wjb.142.1423674817147; Wed, 11 Feb 2015 09:13:37 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id g10sm24096675wic.7.2015.02.11.09.13.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 09:13:36 -0800 (PST) Message-ID: <54DB8DC0.500@6wind.com> Date: Wed, 11 Feb 2015 18:13:36 +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> <54DA3AB0.3040500@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: Wed, 11 Feb 2015 17:13:37 -0000 Hi Helin, On 02/11/2015 06:32 AM, Zhang, Helin wrote: >> 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? Maybe you missed this comment. Any thoughts? >>>> + 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. > As 40G is quite sensitive on cpu cycles, we'd better to avoid any performance drop > during our modifying the code for fast path. Performance is what we care about too > much. Based on my experiences, even minor code changes may result in big > performance impact. > It seems that we may need to help you on performance measurement. Thanks, indeed it's helpful if you can check performance non-regression. Regards, Olivier