From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id B06E32E8E for ; Tue, 31 May 2016 21:11:46 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id z87so507220wmh.0 for ; Tue, 31 May 2016 12:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=2NNc7KOiImNIByZG1fGuywVQQ4Ihk9dSCnWIacC04YE=; b=cFb+YtcPpD1cc4nMzIA5FZVBpUxQoogUjEJx5k5uMOFpPREpjZsdMpdWPzCvPCupuY u1jsgNXQovN8KIFXO/+7ZaU6/tHrCZSOf1/pYZStvvsqG55knOuGB0wKuiNYGCinima+ A+rvGG8GtUoR822ybBFjoiel9/Nl1JZUiHA/R/ly2JpXynthEqzl3Xuic/FnWA26qGja IMB28lJa+UXT54NU1KMCEyEIwrkpVYpx0m2oOdXf6zUfPbvV2FwSwDEdnc+i5JhiI2WX 558SrEeRGwJP8gMY0Bqha6kFkHwENLIOVYjkR2yZUGqEwxOz0cH5fKBZ996dLfm0GdfC A2nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=2NNc7KOiImNIByZG1fGuywVQQ4Ihk9dSCnWIacC04YE=; b=KJAN8AGqOns44/yXtcU6lY7HwyVdR6y0voGvywlzSOF7OOc+gr9bqZeaSYyTbmFTA8 B5UXa2Qigh0bTQylO6qMEDRAOhK4sA458VRLcG+HjXsVKWkvbe0dBRnhmXV8OpCM8o59 H4tjsKeNIOqQeB14/WBfFltUNw1PLPhKQvHOrcLKmIyz7+qtBEXh5nfdJNZAVW1ec2+S tkOgmjh2/XnfUR/T0Bo3U7/Zb4GX+D2EvVnYJ5UAbktAwOZTRVMrOanQxpd+LZ+cJJVa 0YwTppPbrp8kHuz4TVFKzysDiOFUn8pXbdyTxJwFg8D8WWl2l4HOKrpIaMrC+9qGcmu5 im9A== X-Gm-Message-State: ALyK8tK64Q2XVcBtTgZjua4YdESnts6egSyOLWSVX2+6+zMZKAEqGN+PAIg7BdrnncvCdn+Q X-Received: by 10.194.220.230 with SMTP id pz6mr32008554wjc.93.1464721906387; Tue, 31 May 2016 12:11:46 -0700 (PDT) Received: from [192.168.0.16] (85-171-34-230.rev.numericable.fr. [85.171.34.230]) by smtp.gmail.com with ESMTPSA id d86sm30641925wmh.4.2016.05.31.12.11.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 May 2016 12:11:44 -0700 (PDT) To: "Tan, Jianfeng" , "dev@dpdk.org" , "Ananyev, Konstantin" , Yuanhan Liu , "Richardson, Bruce" References: <574C5B9D.4080006@6wind.com> <20160531100851.GK1428@6wind.com> From: Olivier MATZ Message-ID: <574DE1EF.8020504@6wind.com> Date: Tue, 31 May 2016 21:11:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160531100851.GK1428@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] about rx checksum flags 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, 31 May 2016 19:11:46 -0000 Hi, On 05/31/2016 12:08 PM, Adrien Mazarguil wrote: > On Tue, May 31, 2016 at 10:43:29AM +0800, Tan, Jianfeng wrote: >> Why not take care of PKT_RX_IP_CKSUM_BAD? Is it too easy for sw to handle? > > I thought PKT_RX_IP_CKSUM_BAD was to be modified in a similar fashion, but > since you raise the issue, mlx4/mlx5 need this as well. These boards only > report "good" checksums for L3 and L4. Yep, maybe it was not so clear in my initial mail, but I think the L4 example should apply to IP as well. >> For virtio, there's only one bit, VIRTIO_NET_HDR_F_DATA_VALID, to indicate >> that checksum is valid. Shall we differentiate L3 checksum and L4 checksum >> in rte_mbuf.ol_flags? >>From what I understand from the specification, when the driver (virtio-net) receives a packet with the VIRTIO_NET_HDR_F_NEEDS_CSUM flag, it can be assumed that all checksums before hdr->csum_start are valid. Here we would set PKT_RX_IP_CKSUM_GOOD and PKT_RX_L4_CKSUM_NONE. In case of VIRTIO_NET_HDR_F_DATA_VALID, I understand that both L3 and L4 of the outer header is valid. Here we would set PKT_RX_IP_CKSUM_GOOD and PKT_RX_L4_CKSUM_GOOD. Regards, Olivier