From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30081.outbound.protection.outlook.com [40.107.3.81]) by dpdk.org (Postfix) with ESMTP id 358861B631 for ; Tue, 26 Dec 2017 10:30:48 +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=pBa19urnSBMAVwlBFInTGyLfoNgz6a1g6mFtI+wNXiw=; b=WpYvQhiqgUGfrDhZe44GNXgOUN/tAwpcp/aZZwhWNcngE29OEMAm1zUlNBuadfWGQOXvxiosQlf/mu1aH/cG1yJ2V8zAM6vXNRvUZTZ1SNCXWPZcB7jlNhSHIn4blp2YI44miDKEaVmXvpK71R3veZfdk3L7WL0OrkIXOOWl3Us= 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:46 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:34 +0200 Message-Id: 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: bb54a295-57b8-40d7-0316-08d54c435861 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:HkKw9LiAxiKMThNMFIzuZkQvMilGDnF5haPex7LEIqHg1L4Cs9b3rjO7avmha1gR04PiOqxCwX23ryjxVi5XioRFrTeDj2fBH9jStfmELJLcW7BaT2nRYPuSOkU0z5PePdTV13CpDDxAFL6SbdcQP7+Sca7bmNCtB27XKa5aTYCYPvXAuvyJG3SY1AASFl26HqsWvKllA1J46kEFlVjDC4j80OOhA3L74Etlvw+MzvJL7cG0ONSR1h5H9tRtikeg; 25:n8CF7E8nHg8qLJkskysp4FpOepWL3H1Z5sDbA6x8PxxNHRr656FrPM3+EiOa2FEdIMIKyT+ce2jjBHyRz3bHBgrj2BBODPccrqxj2RZraTIOHWSRi/6Fl5m/D6YuHYEUGGGtXUJwm+ISD7eo/koLXKp0CSkRms8Y2u+4l1pXqI0SViXiJLGZI8CEIzQre1eJGIsk4zT47p1VLf8daGNB0EHpWkdzKAaQPTzdauQjNvTkSH6kvTkE5PKTyuWngTL3+hVOKytIDhl9rpCImX/pg0m/IbZ09UyX/0AVY5Tj/BIeyyx0gRoiY38VtrBw6uMJmkt/4pqII5suk7A8/PD5Bg==; 31:2J8/thUALnY6MmeJN+GswiMSOFHJV5t+bFmQi4h8RBEZDLSg/vW3dmcGq6NA/RIIXwUzFusShCdumrCmFduIdrYWUY+5tehhg58/o0UEIi178HJmRQmpX5xsh/Z4P/Sh6QNmfxlbbl5PsAONCPtWEpqY2Caq0JG1TYfViJC99YcgGuBjvYfg8b7BSRTgKLQaj9vFd2tQWC01kng4kYUnIOFikg77ypsDTQkOB0ZuakA= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:H1WFtgkGTMr1ZFWPFSDwOAkTztwWiEEGQjc4ZdzHC0o81LK3cgveWwsOpDv/bgZVNXTUPFFX5KU04oTLzFVYF+rGfLAIkt2zftF+R8RXETa0x7WfpiLnmyuqw3xY959BdezFj37Y+X/9GV8hVLMRzqPZe32H0wsIlx/2h8kiA3vg3um5YiHK6FoQLXZKTpaurPigMYlGtOZcm464NLCB0aAlMx8Ev7e0hFd2AWyGBebgL6JLQHfgEymm4g0K5BcTtbpIfLAvHtUzmwwr9TEDoWTnQ0ksIKJsDb3Pt3dGJMHPfO8Hpav3sgpRrgl+69kjO7dOqrMGx02kbgPVIzt1gec0AtZ6JGpyqr/8uvT9Z6jP32N2qeVD86Bvaw4jdSeCLe4aplWRY9JrpFS+NIZFIX/CA43mThr6Uerpu+DceW0JzBDWjblbVZcH+qHZXmWqRxd1EE6ftTe+zrqcgq14VwI1U1qETsElNpfEva8sa7ExhMQ24mYsYS+TZtFd4C36; 4:Sx6qINaGLqRxrzkftQCmRdh41Ns5i8K+VxW913A2ETm7MJQ4ESHD5rmUG7lYWNHBWoUO2Y7ENSPZWIJnzsGGW0mUk/U0S8avctTV4dT6oqkKHGNn+eTf6aP8O50KYYxPLMidoXNfMZ4lvR9MMXjthwRwrrZ6xDtmJANs6tCiN9zzCCxiSPOTnoAqSNL8ZVYNQSxQl6TFgjSTR0mS+OlrMRt0Oy1vJdTMgD/6o50LQesC/Hh7MNNmsc0sz3eKAFTFmVqgz91KnTcOtwlWEKa35Q== 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)(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:NpqURJX6UjOJxhgpO9E8hDkNFYhfIspuYTvwEcMQU?= =?us-ascii?Q?z/qArL78PxFVDwk/nDSzDw+J3tGnk+fiFocdIvQzCqUJPtDNjg46mEx77FGf?= =?us-ascii?Q?Y/sUi/srChJBFhR2hPqEPcpBLIGJLYxOmnmxEORcmZzjWBroW69oyNIR+g9Q?= =?us-ascii?Q?ucr78mAWNEz4Iz9FB/7X4O/R0umca8BCqd0AsA3creKgVesJeBgD1POnMiJX?= =?us-ascii?Q?Uf+t94BoMMrakRYtskvFpebI/ueB5EtAQVUyWSkAfdFLv5S40y0TUMZLJHxE?= =?us-ascii?Q?gc9SiXNrZZFEYQPzgWLfw59aA551sEpZfEVoDO4T5Cxzgv5DFNtTTX3bBVaU?= =?us-ascii?Q?PJ+Dq1r3uZdaWY+IV8hMKbMsbqJH6PH4WTdn+hrXxId71uMisPXG5aM87wj5?= =?us-ascii?Q?i/c/MvcyOOVEycuQ2AoAv+0umF4hd492XrEYkiAw963vgdgFs8KNz8X3UhzN?= =?us-ascii?Q?xpFRdoncBOm3Occelc1JKO6Dw4UokWqCmrE2fmBa3jorKtlXSHqfpPfwD4Ye?= =?us-ascii?Q?zUtOTIQ+N8eFjh6i7EHU7c0qLOmzIVMOSDW9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5/qFAehPmB2zNZx4aBGJ4+Sus5kJJ0exXeNZa8veg5pfkgu+QSY6FuZ+LiaSljOJDO/0Mi1dbOY6aYq+vP1Fe831RjHLA=; 5:Q9ICKA0oC2i58zIUyQ5tsSWcnOosijbLdYNJz9HHyJo3XHjocriP6DgJMgHM5OWWvax1FGmN6KYal0RazLaCMAV+OnHsRWPIb/Dav48lRFDi1BCZkxpSl2MZOYG7rsNFBivF9iTGWP770M2s5DyBYghllfPbm4jsbSO7lsImFkk=; 24:IY+Px0n8MeeJHu5R6TCXHh2mGuLJkKFJQ2K1oW5Jm5xemJ7O59XCLkhO/5eI11RvjSGhXvsnwadnsSCvaQafeHkUbPx/5/P+fMDWRB8EH9I=; 7:i1JNw3nDLGIRPa8Oo1FxMYWGKOVhwlbojgyZFYFwmL+AvJ7XSLeMfTDhE+ONNvsaznGNFxVtEU6JF3Gd3S+ESxlAsrXgEzuCpviSo8LeJkcezztKWwQASeyHFh7slvqfZAdMuw3FBAvHi+FzSnwOeQSxr1wbQGqm7hX/g/3nS0YgZJaeOs6qitHwzBDOnJIPh9TBli/GWBZ0XmaSk+wzlNAMVREX2DND8rHDZNJ8sv+4cbvZt91CkeoQpfQ6KfA1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:30:46.8940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb54a295-57b8-40d7-0316-08d54c435861 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 35/39] examples/packet_ordering: 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:48 -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/packet_ordering/main.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index 3add7be47..4e52c29e6 100644 --- a/examples/packet_ordering/main.c +++ b/examples/packet_ordering/main.c @@ -64,7 +64,11 @@ volatile uint8_t quit_signal; static struct rte_mempool *mbuf_pool; -static struct rte_eth_conf port_conf_default; +static struct rte_eth_conf port_conf_default = { + .rxmode = { + .ignore_offload_bitfield = 1, + }, +}; struct worker_thread_args { struct rte_ring *ring_in; @@ -293,10 +297,17 @@ configure_eth_port(uint16_t port_id) uint16_t q; uint16_t nb_rxd = RX_DESC_PER_QUEUE; uint16_t nb_txd = TX_DESC_PER_QUEUE; + struct rte_eth_dev_info dev_info; + struct rte_eth_txconf txconf; + struct rte_eth_conf port_conf = port_conf_default; if (port_id > nb_ports) return -1; + rte_eth_dev_info_get(port_id, &dev_info); + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) + port_conf.txmode.offloads |= + DEV_TX_OFFLOAD_MBUF_FAST_FREE; ret = rte_eth_dev_configure(port_id, rxRings, txRings, &port_conf_default); if (ret != 0) return ret; @@ -313,9 +324,12 @@ configure_eth_port(uint16_t port_id) return ret; } + txconf = dev_info.default_txconf; + txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf.offloads = port_conf.txmode.offloads; for (q = 0; q < txRings; q++) { ret = rte_eth_tx_queue_setup(port_id, q, nb_txd, - rte_eth_dev_socket_id(port_id), NULL); + rte_eth_dev_socket_id(port_id), &txconf); if (ret < 0) return ret; } -- 2.12.0