From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 603942BC7 for ; Tue, 27 Mar 2018 14:41:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2018 05:41:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,367,1517904000"; d="scan'208";a="28814317" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 27 Mar 2018 05:41:11 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Mar 2018 05:41:11 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Mar 2018 05:41:10 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.235]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.108]) with mapi id 14.03.0319.002; Tue, 27 Mar 2018 20:41:08 +0800 From: "Zhang, Qi Z" To: "Wu, Yanglong" , "dev@dpdk.org" CC: "Dai, Wei" , "Xing, Beilei" Thread-Topic: [PATCH v2 1/2] net/i40e: convert to new Rx offloads API Thread-Index: AQHTxaaPeqPqlsh9OU2cSMpqq5QS1KPkBdVg Date: Tue, 27 Mar 2018 12:41:08 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153174AA9@SHSMSX103.ccr.corp.intel.com> References: <20180302082011.62982-1-yanglong.wu@intel.com> <20180327083103.163441-1-yanglong.wu@intel.com> In-Reply-To: <20180327083103.163441-1-yanglong.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/i40e: convert to new Rx offloads API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2018 12:41:13 -0000 > +static int > +i40e_check_rx_queue_offloads(struct rte_eth_dev *dev, uint64_t > +requested) { > + struct rte_eth_dev_info dev_info; > + uint64_t mandatory =3D dev->data->dev_conf.rxmode.offloads; > + uint64_t supported; /* All per port offloads */ > + > + dev->dev_ops->dev_infos_get(dev, &dev_info); > + supported =3D dev_info.rx_offload_capa ^ > dev_info.rx_queue_offload_capa; > + if ((requested & dev_info.rx_queue_offload_capa) !=3D requested) Should be dev_info.rx_offload_capa here but not dev_info.rx_queue_offload_c= apa. > + return 0; > + return !((mandatory ^ requested) & supported); } > +