From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30040.outbound.protection.outlook.com [40.107.3.40]) by dpdk.org (Postfix) with ESMTP id 286CC1B625 for ; Tue, 26 Dec 2017 10:30:44 +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=1P/fpVAd7XsDn+HL+y8D+XP8j+aezI0ZHNXGd/Ci+3c=; b=EqbVOaxy2geTTwd0uviVKkuO8f1mQd2mF/FHsj3/xbwAelUo49N6UHzDV21jqQa8EAuuGiuAT1QuuUYpCHqGU3s3AfFWw1nOsdbQw3CT+d/6LIAFof/R6lJ/VgwjB/wHDttovpVqEJXqQgGpd8zKYEYy3YVHE+zWvsekOmoF7Ek= 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:42 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:31 +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: 2a05562b-cb6a-4168-ab0e-08d54c4355fe 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:8ScejNzfrCb+ZU5vPb/qovzYBhoLQ6Zw5jAnyUyThJVzuoUX5glUAwrYKFVcUd6Epz7FCPEWeIV1PJHQwDzI8mDsZi4tNZr13/y4ZMZ9TEMWt37U09uFRw1TY8UJ1PuRgmnId3EVKUsaq004v8jH0tQyvWdu3UdwkKKpWfZHqShuhE8XKfCDX2sKqXNwHPfIT+zDGukg2c3FyLM1do06mxuKCixQ4mAy42cEJAfQm1WiZwXVYHbd8mDwPfqrQw8n; 25:5Gdz4cCpchh6i9ivuWf2Gs13Zhvc4cSdE0DVBDPGNQGeh9k/DNGtkFlr44TyxqYQ5aH15s+rODcAL9B9xNmU5w6PD9EqsDUqTzqtCA+y29OizBBKequ7VaYJdStXIRRvEaiNvUEuozgUSaVg58CCcYVr3xUyln/FlqYm9e+vcaIzbhxYD8rlvqrIzj5u0Cs2ECu2joT0IFZB2fKoZ5XauYDlswsVqBKtIPD1HACL7soAPauvap4V8vWdm76vCUce+j+8Az5vNHHnRkPoA7Wnd5FxLEoqBwciZPN/3LqeIu1jiu+nBvv/13OdtJ9nE05WoejOVlG7Sx2eSE//CVW7fA==; 31:ZTh0VXBt6IfQdB7qC3jBqzOKICjsulcH8qjKjcXNWP8vpOBEqj7XutmcVRlAg6+FUd1d5IMjm9cKCKnL9u2GLttK/Jp0p9hmpFEKL9O95ybt7K8RY2sp030wGtcxnoAZODrbYVJthgPaW7kBUVyzfNNhgLUtCKD3iKc6i/yoET3VYO36mLVOvKffWBb4CwnxbHyA24F02l8t97qOfWG8YWF5lXyFIPP7lxWyG1Me2gM= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:ZdGGLvkWS52uAfWhKY6obPj6ptfCVgL88XX6byoIfd9Ixtyz+wrse706sXgB6Qc/ipy+Cv5tbGiFO+f/0nmHCo9bHcy7MSaZjl5G5WlG3X5P+9Fbkv4iEyrCx2slIQz5zX4aV1XY8qfLifn+hq1ZZDjdTKOy06jLRE/is7UFgyARKfC1tioxMPNwA3OKn4wDXnzQly/GtKQE+hrJdr6l7cKbi7Zqt5colIxXOf5oBwMZsSNO7XH25bA8vC6etTRKUJX3TjNTd3aRrHe/Q9pdB3rBogYNfJIcLJonrPzDmp6F4ZlmCBkJdsYTdmxJ7oafl4USCDDbUrYcgZKvg6Ts3iw1oSqoK4drmz1ciVxDfZaGsHZWHl3cdnLunF6lx0a08MBgWv7GtE+fSwBQzVx2/QiqgKNCZYjNDellq2uc8jBbAHp5U2sdb2fiOodmV8jsJOHeT/OOxfXMwCv6Zi29CI1TROLIxBMrL9IGTouAC0w0fxokRC7RyHY2Xxdh/qvK; 4:1OlzEP+LPdyfwjQYcFOSOjXkozaxstTssItesazDobDLqa92Xb37ggxelLz9imk90I5iaMr63XcoKVvxgK6jzUTDOvUYEbRMbt1ooYtElfHA0X8Hvy7O+VExNhbSVkjVRXOOpzaL0ZxkyXL0NPKbKJrj+0QppuWii4UrKgb9AaHTn23nEHPwy/4q2lAz5Rsoan7R4j1FihchteGUNggBUx81KiD66k0abp10pWqrlIrlvoPcFeQ+LOK1Ptf+qI0JFvNRf/do/R/W4YrhxFG2NElCTf3+45xXbBdOU8Y4wxInopbMoF4m3saD9VQjMtI8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); 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)(979002)(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)(969003)(989001)(999001)(1009001)(1019001); 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:zlyK3mfMNYkeq98r75ZPQjKNJVlrhD6PF7YSBAub2?= =?us-ascii?Q?KMvk9n2Ds3R+XWWR7daNMyb3ynQHFB/Tzx3xUPThn5bs/KZccVwSxF4O/KBf?= =?us-ascii?Q?AKxlWEbIz/KDHSO9SZ7FXXpZruXqGfSsGtZoXwpffROBhqhJ4vGaMGeBhRW3?= =?us-ascii?Q?ncsnhP1519hw8MqGISYGacYVEWgpfQjc5y67FYtGPW69WVOPaamn7PvGWVxG?= =?us-ascii?Q?1nzMjmQLVWtUhmw9wLkA5LcpGZfu0pYWp9U1YNCmd79bSW48Afa38iA0iVWw?= =?us-ascii?Q?iFOSEpiP97XV+I8ajdNSIEpvw67FAL1r9df2l+uGRCelDAU4FVS9hhodU9uL?= =?us-ascii?Q?7usMR+emack+Aah0ElDc2M0C6o4QT8ozjWUYU4BvNM9NlKiUb+3YHbdOBwVv?= =?us-ascii?Q?B0bdh7LfV0M54/AtVjDTOCeEGT6Du095fGtxpSQ09wd75xcZPhSlfUxxGLh6?= =?us-ascii?Q?TA0SzpY0gDElvEiLD824zQ5bR60Dw50aTiXqgYEegUHWLdGQbJZOpIuOl0J3?= =?us-ascii?Q?gk5rvO0q0S+WS8EhFMdqFbd5NwjLKNqwNNy/FnbjbQkvhCWvyUjfP/HgqA+G?= =?us-ascii?Q?K6tujNs/2+f7M7gQGSbpUPPtHxlspa7waTal71/XcICQa/uBvaXXemUvq6kt?= =?us-ascii?Q?mBWDjOtw79uwq3TTLzXRhjPe0iD31VFDlM/H7EHaCCGxMAdn35MtXBFsxYpY?= =?us-ascii?Q?RrCB2Rhv5PtJfYRofbbFajXLaP3M5JKIIS7bGNFaul2ru6Iep0LCCEAkmJ26?= =?us-ascii?Q?tiLJtHXvLDYv/coqp5PVHSRsZSGVDfkIX7R8KLMxOmrIjNrQFxka1loFWvPI?= =?us-ascii?Q?PIvOdT3BOcFCs4eYyIT7F1oAilSMGuvoNXR6zAd7BYRIQ0mQSSrldwZsEP0w?= =?us-ascii?Q?2hz7kUxnuX4natjSThxTck3oO+4l/dgQQp651rduLgM435pfEuPQzAkTOP0l?= =?us-ascii?Q?bXt9Epdd9SoRr75ioeXP4fc5UtQjgI0v14yRO1Qr5x2ZuX4dfxmYpiEoFMvI?= =?us-ascii?Q?wtKi6fTQ3siSYLWtHPhuJKZ+mTVx4PGiagscCYYyPM3xk2M/1R1e+wdX1S+H?= =?us-ascii?Q?xCdexM3QOz2cCv8h3GWSCWKUdM1XqOq4DJH1253GxzXQKmOmZBSsnIaNFOLR?= =?us-ascii?Q?luVlgdC9m0lDievL84HhU+Rl+Bmb+ltOGLzDjVpI1d2xrimED/UKIlytmkol?= =?us-ascii?Q?uICM6Jg/ImF61ndFildrwoDe+TTQ6jeSHcdZjc47IS71L9IVDTlFs0mbRF0C?= =?us-ascii?Q?Ree27DCIaTkWkYC1h8=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 6:H7E/cE38lB66LEDfS+ZjBrpzEfcTlnFg0NFXbApm471VKI8pyCIUhDa11BGBYVL3xyfdKRSxl1Axp31IiYGyxC951L+fyCIFOacFcKJ7UaIrEoVPCHDDCXoEENTUyGyQFQAheCYri9bw/JgKv0VxqoWBO02C1j5MgkQuSi7UkQqXtPM+cw6O/32gJA2DCdSriDU0F/crcxhhUSIy/fZgM9MlbqTN/VHZJFKzTuVfh8iXKikDYEwSUdGKpOowXF0vBhAMzO+MMv5+8tyFS0QWqh3ffAFDjN37xbCI6+2QPzU9mCOXTyct5VrSHUO8B8vPq494X9Jpf7V+tthMfYadsysyxvf0RweRaMdnazzetXU=; 5:UtGA4luEg5BS5cpZdduxyuk6bHvbkb/b77gFSRhyc4Ru+hGGvCxks36G0pT1DLqeVA6DmcN6cQtHQj0RR+BCGP3brL+6O4S+jvxE4JSbAJ3EzltWC8e7d2AC6jh5j6S7zW8vU2fOS3squRJIPJHjCu7tco7T9rTZLttjBcywaH8=; 24:5+LjHZth3y3Hu5q8Ag8OyuPIbhJy0Aj8/7nyLZOOTxzNrZ43cJcYpPVjK5CNQgU17OozcFU65hiCMUhLkRtg7OO+o51truIhy9tEpi7lPfE=; 7:yhHZ6bUERXAtAxVtPi++uzleAd2GIRgTo7uU1B82zL9rU3T1QlI6ZR1Wc6eWlXqSskma7vwXn5/KVBc70n5SilB1iiL9yhmUfohSgljngBC3A8E7KILiPM7ux7AdU7yuJl0nqxo4fmYaPyb+Aff13x49WNEzI3IonCyNNViblHhzFbmuLnx1aNt5JHZqd7/bHafQEo2Gp8zW3gUcs7Tzo/B/9Pev3YT3pO8xYgDmJxNRKqxSqw3X9cClBnfmdWCq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:30:42.8941 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a05562b-cb6a-4168-ab0e-08d54c4355fe 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 32/39] examples/eventdev_pipeline: convert to new 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:44 -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 Acked-by: Harry van Haaren --- examples/eventdev_pipeline_sw_pmd/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/examples/eventdev_pipeline_sw_pmd/main.c b/examples/eventdev_pipeline_sw_pmd/main.c index 5f431d87d..eb3adb826 100644 --- a/examples/eventdev_pipeline_sw_pmd/main.c +++ b/examples/eventdev_pipeline_sw_pmd/main.c @@ -563,7 +563,8 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool) static const struct rte_eth_conf port_conf_default = { .rxmode = { .mq_mode = ETH_MQ_RX_RSS, - .max_rx_pkt_len = ETHER_MAX_LEN + .max_rx_pkt_len = ETHER_MAX_LEN, + .ignore_offload_bitfield = 1, }, .rx_adv_conf = { .rss_conf = { @@ -578,10 +579,17 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool) struct rte_eth_conf port_conf = port_conf_default; int retval; uint16_t q; + struct rte_eth_dev_info dev_info; + struct rte_eth_txconf txconf; if (port >= rte_eth_dev_count()) return -1; + rte_eth_dev_info_get(port, &dev_info); + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) + port_conf.txmode.offloads |= + DEV_TX_OFFLOAD_MBUF_FAST_FREE; + /* Configure the Ethernet device. */ retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf); if (retval != 0) @@ -595,10 +603,13 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool) return retval; } + txconf = dev_info.default_txconf; + txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf.offloads = port_conf_default.txmode.offloads; /* Allocate and set up 1 TX queue per Ethernet port. */ for (q = 0; q < tx_rings; q++) { retval = rte_eth_tx_queue_setup(port, q, tx_ring_size, - rte_eth_dev_socket_id(port), NULL); + rte_eth_dev_socket_id(port), &txconf); if (retval < 0) return retval; } -- 2.12.0