From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <yuanhan.liu@linux.intel.com> Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id ADCA272FA for <dev@dpdk.org>; Wed, 12 Oct 2016 15:01:45 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 12 Oct 2016 06:01:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,482,1473145200"; d="scan'208";a="179079971" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga004.fm.intel.com with ESMTP; 12 Oct 2016 06:01:42 -0700 Date: Wed, 12 Oct 2016 21:02:37 +0800 From: Yuanhan Liu <yuanhan.liu@linux.intel.com> To: Maxime Coquelin <maxime.coquelin@redhat.com> Cc: Olivier Matz <olivier.matz@6wind.com>, 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 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> <e96537d6-b99a-2668-e8bf-3a64529f0d55@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <e96537d6-b99a-2668-e8bf-3a64529f0d55@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> X-List-Received-Date: Wed, 12 Oct 2016 13:01:46 -0000 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