From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v2 09/12] virtio: add Rx checksum offload support Date: Wed, 12 Oct 2016 21:02:37 +0800 Message-ID: <20161012130237.GM16751@yliu-dev.sh.intel.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Olivier Matz , 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 To: Maxime Coquelin Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id ADCA272FA for ; Wed, 12 Oct 2016 15:01:45 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. --yliu