From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30063.outbound.protection.outlook.com [40.107.3.63]) by dpdk.org (Postfix) with ESMTP id A469D1B625 for ; Tue, 26 Dec 2017 10:30:46 +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=GqXt6HkCYC3toYpQtX+3IOqhM7mpxMQSfW1dRz2VSvQ=; b=rYyH3HsZolfIDLErcK/Y9ibygsNOTyv4ueM2psgUoE+JqadFyfoIoWHcy/GB7sJxrNBH44+lmsdOmyBig2Na2qhJ9CA3JrmrINpCI054c+eUZkxKobp4jV1ywv76ocwEcklXTpvSVO6uLCMHioNA3xV4lKtou0KzHRCCHoJI608= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) 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 09:30:45 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:33 +0200 Message-Id: <6a91e2e8451eedea1db8a3486c4208b59c225a95.1514280005.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: AM5PR0102CA0023.eurprd01.prod.exchangelabs.com (2603:10a6:206::36) To HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fa211f8d-7753-41cc-9727-08d54c435791 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307)(7153060); SRVR:HE1PR05MB3148; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 3:H4NUwQIuN7TYjZbcMOVVrZJLFY6bVZZb4qaaE2JMl5A5eq2NwxfxrxQxVpZ/j3jo1kRs3OFdRA/EkUl4+8fkeSoENKdhNMEcbyes82lbDmYyVw84hIFWbqBIzb3wvdRLz3Lgekyt1GHNQj4XNklZxgmxZv6gpQpWWv+Z3S6dGZvnmsqzFbD7EfcY9HFSv/BVBre2whBBIUUedXdhPknda7Qfpn7eU266ikqvrTWk5ZSfU2+oPA9GjjjqUg5TnXaI; 25:GdTykdEZd/M/45YSt9gJo0XCDn+dVIbG4KoeCUhjiRbwoCvotHeONxxlK3jQ9oDM/Tn2PVrN+w4bOGeCvFZhdpWaliQ/g0MXFiePDLXlixluOlBwb/iw2e95nlUIuwa6/5DorgcR0EKWIpQN0CPEyaY5t7kfk1qg/a6v+SlzxVa2B1nQbeVDePj9oW0PDKcl9leRlFVI3XovUU4N8A5UH6GqjcOqWN1aBp2qqaBJeIcZzaetnxOKk731jR2+W9cNlSbWcJxEkQm5lTU74mppwJwEDUQp368hdKopp5xMwrf9jX2hWrPq2exMZi65nzyiylwZc6tpVv0qkTYQbON/Vg==; 31:NCe+minzPhRuQkm72QrERwdwGxO4MQDeeL+SuTpi5WTyEgWMRno2+NVf1X7Y+lq+Mzk5Glvr909dIFZc/Nfobiv85jSk6e8h2Hy3ZYRi0vYd9evc4MB5JwKqJIl2/PmZKZIvpgRFSd3KVRHpv9br7bneIv99N2N4WHn5EWKZGD0hPG921vtbD9X5XYvnrEek1FvkoDvomcwHxnXORZLrfBxQH+w9WSjdm1DF8YPPRLQ= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:3R8sQ0GUhj48Y16u0VyDaf1QUxDlKyyfrZyRPRl0N4XDK4UbUT75bob31uLRt3uIBuDuzHKpYxwt2KUJscs/585X/Ph4FHQZU7I4TgE86Z9dOvkg2YIQLY1AKva7F6/mtZs13PxdCJvxA1wqCcOX9cHLBfgf2IDWwu8WBOwgFj33JAwCGxwA2O/JNSTAwkcy4eFAo5nUGznZkNDb5DP2C/4+cdb3Ub11vHgJLS2YixTmwBxPHjU1Ht/DaY9iKci652t0YVmru/fJ+gzsidev9ka8acTHY+/1G5k4irppyoXTcgJyG1XGEPKtwWibypwlL61Lgqjq6N/1PqKRMtwQOsqonhohvy1YhFUei9b9j1EAMuVGgvHwjDNLx/9xsx+VYrnwHl4iOEfE9MQeirLq2Yil/PyzM7DEH0Gg8Q94q27rDSCmW0a6Mk6qpd0T805alu2xJ6FFy4fekrqnhyp/KsWJEDuu42Juc3YT26/WYyjT1DftNaYAgvqtIv5x6vnK; 4:LbhAU8qgiCrttNP0sznQHMyIrjTuji5JeYmNwwBA1DoyiYycR7dp9mf2drqIDz5Csnwn4fVRb1Kp7eO6zgwZsXDHFlilPZwIq6wHMemF6pjQ4X8jODgFyOELd75SwgNO7gUcs8+EAlk8MwVW83mVTnIqbMxbgdou4XjLqpfN/9IEakxFiKby95VOZoAYDXS/XZvHFOSpk9dO160dqZubO/9HWeix7d+p6Ao/d0HuzfJuiR+XGGAPBHBl/uUGOCxwH9tc33FAhFmCucCLvh9KWQ== 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)(93006095)(93001095)(3231023)(944501075)(10201501046)(3002001)(6055026)(6041268)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:HE1PR05MB3148; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR05MB3148; X-Forefront-PRVS: 053315510E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(376002)(346002)(366004)(39860400002)(199004)(189003)(50226002)(118296001)(47776003)(66066001)(21086003)(16526018)(5660300001)(25786009)(2906002)(97736004)(3846002)(81156014)(81166006)(6116002)(8676002)(53936002)(2950100002)(68736007)(6916009)(36756003)(386003)(59450400001)(86362001)(69596002)(106356001)(16586007)(478600001)(48376002)(76176011)(51416003)(7736002)(6666003)(316002)(55016002)(105586002)(33026002)(2351001)(8936002)(50466002)(52116002)(305945005)(2361001)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3148; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR05MB3148; 23:r/WJdCjLA3AI1HljY/k3ywH7dwN1fLrlTMlWCVrS4?= =?us-ascii?Q?GgUpzLET43XgBq2pg9Xj2UbfmLmcjeG2lO3mGzTp1DFcRrrzXWEKFdNWhRnl?= =?us-ascii?Q?I8+vuHiCzUc89lIq290/IjKAXqR5t8bQCSLzK+gTSxxOELAs+GDKxPysfM8N?= =?us-ascii?Q?l6S2241r0dRg72fWRXr/HyIeLeIGsz/f0+E9SRK7bxX6YpxXy1y29vSRLc9o?= =?us-ascii?Q?TJOhClJVx4se1o4Z2uomnB2PfSX72R3UspdypZdZK767UTakiXCmzpNkYXwf?= =?us-ascii?Q?opzrxNzRkqwu7Q67FRl/U3YdGewHkR3S2hIAwnR3amHjMmwlYQBWWupTyWDa?= =?us-ascii?Q?uzInd6lhRWMRp53KmaNZUoI853hrqIuJ6ihIJJJOnBaC1Bro/ZGWEfUOuhk+?= =?us-ascii?Q?bvwQvmeor4QX+I5GA7s79mdcTzFbMHf7qrIGwNWxUOOA19hBTI4sO0oT6aDt?= =?us-ascii?Q?wLY+Bs3sWfEG1KChLKjjGgB145x8v6IBZLlhRp0N7oyHlwTxuIO8SaEa3j/y?= =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X3k9LDqV8i87rDcSRbl+bNI0PW7Rl6xLT7ICJZKoQ/5iJ0IqKD1Ci8E7TGJVs8mH6Cnn2xC4cMwo00n3BwPX7CnB8aQA0dCcbTicm0ZJrpCole3R8lh3tJdI4Bwh53rbC09Zz/mwSj8SxCkiNhs+nApULkdBZZT7zO4=; 5:Q/eLIACopmv8BUVRBcZYqwBb7q9erSYfCyoLqISx3ee3yOUAtfFbf7Qed658bi7IaQlmRgiQ2awlgMvkM5RpwNs53R5xr3QXIZLu+03XhEp4o5vGA0kYQRF+cQXO1d0lgRF0iVkbciWiRCR0KTDGU9QL4fmbXOQdlHqiv+zPdgo=; 24:6yF9YAvaA8zJvAljYe9Z1RlcVLUrdtv6KYRdXtghCdrb95iuZ1T+dd/wtWA2I6coAYruKljrA3P84rA0dX+EpBc+VN1OqkihvGr+THNIoF0=; 7:CMsfeYhI57zG3f1oh1PYcwL6byA0x98rFGtzSiFs0aI/dBrzjfaVZnEoBE4sIR8v+dExMOtaRdrOt6BL7yV+J2UgAA0V2JS4sPhp71aUvomntNhMTSvTgnt+71XS0DoCNV97672TR7BA1Ef4mFpH32tPqWsppXxzblHl791PeFbvG0CbUBIvms1dbHqIlhTQ0lBTw4fAKZgFGUgwwWdS849lr651MGf8zU4kD6Ugdwl0CkceKD+bqFks4QhZulhh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:30:45.5347 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa211f8d-7753-41cc-9727-08d54c435791 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB3148 Subject: [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 09:30:46 -0000 Ethdev offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") This commit support the new API. Signed-off-by: Shahaf Shuler --- examples/flow_filtering/main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.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 = { .rxmode = { .split_hdr_size = 0, - /**< Header Split disabled */ - .header_split = 0, - /**< IP checksum offload disabled */ - .hw_ip_checksum = 0, - /**< VLAN filtering disabled */ - .hw_vlan_filter = 0, - /**< Jumbo Frame Support disabled */ - .jumbo_frame = 0, - /**< CRC stripped by hardware */ - .hw_strip_crc = 1, + .ignore_offload_bitfield = 1, + .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, }; + struct rte_eth_rxconf rxq_conf; + struct rte_eth_dev_info dev_info; printf(":: initializing port: %d\n", port_id); ret = rte_eth_dev_configure(port_id, @@ -160,11 +154,14 @@ init_port(void) ret, port_id); } + rte_eth_dev_info_get(port_id, &dev_info); + rxq_conf = dev_info.default_rxconf; + rxq_conf.offloads = port_conf.rxmode.offloads; /* only set Rx queues: something we care only so far */ for (i = 0; i < nr_queues; i++) { ret = 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