From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 2990C5B3C for ; Mon, 5 Nov 2018 10:52:02 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2018 01:52:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,467,1534834800"; d="scan'208";a="278393854" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga006.fm.intel.com with ESMTP; 05 Nov 2018 01:52:01 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.114]) by KMSMSX153.gar.corp.intel.com ([169.254.5.169]) with mapi id 14.03.0415.000; Mon, 5 Nov 2018 17:52:00 +0800 From: "Zhao1, Wei" To: Ori Kam CC: "dev@dpdk.org" Thread-Topic: [PATCH 1/2] examples/flow_filtering: fix set offloads based on cap Thread-Index: AQHUdOriZXhjdD3brkariKhuTw3xP6VA8AtQ Date: Mon, 5 Nov 2018 09:51:59 +0000 Message-ID: References: <1541410503-29360-1-git-send-email-orika@mellanox.com> In-Reply-To: <1541410503-29360-1-git-send-email-orika@mellanox.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.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] examples/flow_filtering: fix set offloads based on cap 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: Mon, 05 Nov 2018 09:52:03 -0000 Acked-by: Wei Zhao > -----Original Message----- > From: Ori Kam [mailto:orika@mellanox.com] > Sent: Monday, November 5, 2018 5:35 PM > To: Ori Kam > Cc: dev@dpdk.org; Zhao1, Wei > Subject: [PATCH 1/2] examples/flow_filtering: fix set offloads based on c= ap >=20 > Some of the requested offloads are not supported by all devices. >=20 > This patch fixes this issue by setting only the supported offloads. >=20 > Fixes: feca6c428a5e ("examples/flow_filtering: add Tx queues setup > process") > Cc: wei.zhao1@intel.com >=20 > Signed-off-by: Ori Kam > --- > examples/flow_filtering/main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/mai= n.c > index a73d120..27e287a 100644 > --- a/examples/flow_filtering/main.c > +++ b/examples/flow_filtering/main.c > @@ -136,6 +136,8 @@ > struct rte_eth_rxconf rxq_conf; > struct rte_eth_dev_info dev_info; >=20 > + rte_eth_dev_info_get(port_id, &dev_info); > + port_conf.txmode.offloads &=3D dev_info.rx_offload_capa; > printf(":: initializing port: %d\n", port_id); > ret =3D rte_eth_dev_configure(port_id, > nr_queues, nr_queues, &port_conf); > @@ -145,7 +147,6 @@ > ret, port_id); > } >=20 > - rte_eth_dev_info_get(port_id, &dev_info); > rxq_conf =3D dev_info.default_rxconf; > rxq_conf.offloads =3D port_conf.rxmode.offloads; > /* only set Rx queues: something we care only so far */ > -- > 1.8.3.1