From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 350048D9C for ; Wed, 12 Oct 2016 17:55:19 +0200 (CEST) Received: from [10.16.0.195] (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 59AA6281D5; Wed, 12 Oct 2016 17:55:18 +0200 (CEST) To: Yuanhan Liu , Maxime Coquelin References: <1475485223-30566-1-git-send-email-olivier.matz@6wind.com> <1475485223-30566-10-git-send-email-olivier.matz@6wind.com> <1da0b2c2-931b-3164-d211-4ceee7fd6864@redhat.com> <98db7fbb-42bd-512f-1d40-a1f3304a895e@6wind.com> <20161012130237.GM16751@yliu-dev.sh.intel.com> Cc: dev@dpdk.org, konstantin.ananyev@intel.com, sugesh.chandran@intel.com, bruce.richardson@intel.com, jianfeng.tan@intel.com, helin.zhang@intel.com, adrien.mazarguil@6wind.com, stephen@networkplumber.org, dprovan@bivio.net, xiao.w.wang@intel.com From: Olivier MATZ Message-ID: <57FE5CE1.2080402@6wind.com> Date: Wed, 12 Oct 2016 17:55:13 +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: <20161012130237.GM16751@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload 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, 12 Oct 2016 15:55:19 -0000 On 10/12/2016 03:02 PM, Yuanhan Liu wrote: > On Wed, Oct 05, 2016 at 03:27:47PM +0200, Maxime Coquelin wrote: >>> /* Update offload features */ >>> - if (virtio_rx_offload(rxm, hdr) < 0) { >>> + if ((features & VIRTIO_NET_F_GUEST_CSUM) && >> s/VIRTIO_NET_F_GUEST_CSUM/(1u << VIRTIO_NET_F_GUEST_CSUM)/ > > There is a helper function for that: vtpci_with_feature. Ok, will use it. Thanks, Olivier