From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50085.outbound.protection.outlook.com [40.107.5.85]) by dpdk.org (Postfix) with ESMTP id 5B0441B290 for ; Tue, 26 Dec 2017 14:57:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1EOFRM23FAqMJhQQY+weOcotRd1q1fT9TPQUtV8J0wM=; b=Cmf7isK3Hju7TZF+JIq6u22+Bc2pO8iz4fegmQHT/HDxBEaRNG0rXKWbIwbe4Ay98sa0X6ZgtJWjFZetRxIgm7qdcKhkXjsA2Q+JVkPN9j/zs2BDeTM5RFfKAJL3YBbMzxWQs7uKy/FVFWdQVmeQ6JFY0WdjO1+D4bIRx72WDEk= Received: from AM4PR05MB1476.eurprd05.prod.outlook.com (10.164.79.142) by AM4PR05MB3137.eurprd05.prod.outlook.com (10.171.186.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Tue, 26 Dec 2017 13:57:22 +0000 Received: from AM4PR05MB1476.eurprd05.prod.outlook.com ([fe80::d1dc:f4f0:aba8:5d3f]) by AM4PR05MB1476.eurprd05.prod.outlook.com ([fe80::d1dc:f4f0:aba8:5d3f%14]) with mapi id 15.20.0345.017; Tue, 26 Dec 2017 13:57:22 +0000 From: Ori Kam To: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 34/39] examples/flow_filtering: convert to new ethdev offloads API Thread-Index: AQHTfixTBwBLfiOr+Uaih+b9kXjm36NVpaCw Date: Tue, 26 Dec 2017 13:57:22 +0000 Message-ID: References: <6a91e2e8451eedea1db8a3486c4208b59c225a95.1514280005.git.shahafs@mellanox.com> In-Reply-To: <6a91e2e8451eedea1db8a3486c4208b59c225a95.1514280005.git.shahafs@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3137; 7:sswC+pxQXvhSbMRYvauoLRLf8s9iM+TCrY5RHuFNEU2BiyB4PSv8laKdVw0fMbmdstTiTb/Rx92+n6/bYEhkRumlyiRr82ZpF+EyAEMQ12MqLFXo20o0wb8k6gz69zdY30m8Ns7baHOds9BNR4NFU95uMYTo+fkP0NP0VEAVLFfRB61JfJdNG8QmcVoQw10sdxmrCeriuXGTgV2W8wFX4exwKwjx2cpLODvlFBuXHDH7/9JEupYwfBTardOJxz4o x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-correlation-id: d57bd848-11aa-4650-11ce-08d54c689636 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060); SRVR:AM4PR05MB3137; x-ms-traffictypediagnostic: AM4PR05MB3137: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(944501075)(6055026)(6041268)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:AM4PR05MB3137; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM4PR05MB3137; x-forefront-prvs: 053315510E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39860400002)(39380400002)(366004)(376002)(13464003)(189003)(199004)(110136005)(102836004)(59450400001)(97736004)(53546011)(6506007)(478600001)(9686003)(76176011)(316002)(106356001)(25786009)(33656002)(53936002)(2906002)(7696005)(74316002)(2950100002)(305945005)(7736002)(66066001)(105586002)(14454004)(6246003)(99286004)(2900100001)(81166006)(3280700002)(86362001)(81156014)(8936002)(68736007)(3846002)(3660700001)(229853002)(6116002)(5660300001)(5250100002)(55016002)(2501003)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3137; H:AM4PR05MB1476.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: UrsR1iIKslqTpIuHrpVPERfOW56tLAgu1BNpLhLOfCm6sSNZtWq9emFvt0Vo9VZP898lfrI5K6OUxeovGlf4IQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d57bd848-11aa-4650-11ce-08d54c689636 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Dec 2017 13:57:22.2447 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3137 Subject: Re: [dpdk-dev] [PATCH v3 34/39] examples/flow_filtering: convert to new ethdev 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, 26 Dec 2017 13:57:24 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler > Sent: Tuesday, December 26, 2017 11:24 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v3 34/39] examples/flow_filtering: convert to > new ethdev offloads API >=20 > Ethdev offloads API has changed since: >=20 > commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit > cba7f53b717d ("ethdev: introduce Tx queue offloads API") >=20 > This commit support the new API. >=20 > Signed-off-by: Shahaf Shuler > --- > examples/flow_filtering/main.c | 19 ++++++++----------- > 1 file changed, 8 insertions(+), 11 deletions(-) >=20 > diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/mai= n.c > index 7d739b4ae..f534f0639 100644 > --- a/examples/flow_filtering/main.c > +++ b/examples/flow_filtering/main.c > @@ -138,18 +138,12 @@ init_port(void) > struct rte_eth_conf port_conf =3D { > .rxmode =3D { > .split_hdr_size =3D 0, > - /**< Header Split disabled */ > - .header_split =3D 0, > - /**< IP checksum offload disabled */ > - .hw_ip_checksum =3D 0, > - /**< VLAN filtering disabled */ > - .hw_vlan_filter =3D 0, > - /**< Jumbo Frame Support disabled */ > - .jumbo_frame =3D 0, > - /**< CRC stripped by hardware */ > - .hw_strip_crc =3D 1, > + .ignore_offload_bitfield =3D 1, > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > }, > }; > + struct rte_eth_rxconf rxq_conf; > + struct rte_eth_dev_info dev_info; >=20 > printf(":: initializing port: %d\n", port_id); > ret =3D rte_eth_dev_configure(port_id, > @@ -160,11 +154,14 @@ init_port(void) > 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 */ > for (i =3D 0; i < nr_queues; i++) { > ret =3D rte_eth_rx_queue_setup(port_id, i, 512, > rte_eth_dev_socket_id(port_id), > - NULL, > + &rxq_conf, > mbuf_pool); > if (ret < 0) { > rte_exit(EXIT_FAILURE, > -- > 2.12.0 Acked-by: Ori Kam