From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0077.outbound.protection.outlook.com [104.47.2.77]) by dpdk.org (Postfix) with ESMTP id C0BF8199AF for ; Tue, 12 Dec 2017 13:36:10 +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=DKpxrQJi2CxYXLD200gaZRyoLXGboL+Fcc5Op7EwomM=; b=uTKHMfe/Yqo2RB3MUfjH4xtw4hiK3qkl1WipPAp66Y1nQ4SAO6hQfvJIB/J0YAZTq0mX8DDEHhZ5Po2R2dl9RXcNIdloic/2B4w7NXX4RdCxgb+lqBqWpSjHT75slGlMVZoWEemlr9MtLoKj4dsE/3sUg5RoCoqqB9z+Y8DDyZg= 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.302.9; Tue, 12 Dec 2017 12:36:03 +0000 From: Shahaf Shuler To: dev@dpdk.org, konstantin.ananyev@intel.com, radu.nicolau@intel.com, arybchenko@solarflare.com Date: Tue, 12 Dec 2017 14:35:25 +0200 Message-Id: <1b848c9604c275b50eece53533e7796affdd191e.1513081088.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: <20171123121419.144132-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: HE1PR0102CA0051.eurprd01.prod.exchangelabs.com (2603:10a6:7:7d::28) To HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05f3f526-49dd-4cf0-c9c5-08d5415ce8c2 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:HE1PR05MB3148; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 3:a3SLJwfxzahpUpgh/BqdZ/5pWtzk3OcTFGxZLSZ+SKWTbr+AOImwZqqsPyuoa3YNKc5GQ/Ot68svqao51Idsfm1XF89KMOl/SdySXdT19EuEt1CqCgcaqjAvzuwzBmVFPsJSnwhrJmtcoakdsiQ6f5GQFT9iw625SiUXR9dQbQiIvSsXpdf+AxhwG2S+Lz2IioiyILQwFTZo0Tb4BhVB0Yicl42+wRUzHhBie2LLJsAsZxuXaLfJ0GhltD5Kl/DA; 25:v79KVxc9qreRSfDz+dI+7IphglQ9n5ZcpFSBBo4+lVTYDyOkR2Asf5taW4TE7PKXHi+EnYulRBsUyxbJ7ON6cSbjuyElvNem9B05XnbxvvrmpamG6ImpYFRzQ55aN8Mq5wiIqLNG7/ksffDWgAhHigWtcpTsuS57VJcOqrABMmRQRwlcsa4kV1sRDgAXSSAk5HYK57JlqnK7/fZTy4z8yIawm+Lu03D7fUgmmS7vsqneOhnmwChXJAO14AiPFL4ddxLuVJH42G2gvHc/IsT5vKe8NqplAVUQj1S/D9sk2WoEvmCeW5e6nTiKojLcLIzzW/Zfxze5UI2l0XwrmawiVfviU1R+Lnk07xQIZux0rts=; 31:1+4o5tUF+eM55AZQPJUqQzbIOov5f89nAIf/P8YJABSXDZZKCvqUYa54d2mqRM5FdRIwGI8oMZCsRHxSVDFL+EzMYzjTZ6Xaqrfcu9QxFhVuFl+3doWAQo7n/STOy8ohZGGePpPu/1XuGILYVkk7jMjUJDwSTSRP6FZsFGDtySYbLZFBzAw40bhUB7sUqdb033eh15JKueRSkDYoIGFR5TWO/i1NrplOobaPbQAUj/U= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:U9mrjaQhEOhk+jyYjIqd4AoJvsTBJ+PKCMm/+xII4HB40PyKXEgN5rrxvUkGox1IPyBKTdqffERdECLjIX6Jj3Rck6PqIGECAuuiqzK62++3XXMp5AwwhH6bGQqs0jOVdt81w9QprSOxvQ8h9x5FBURTDHAv+pchRkk7KzWWk5Q2BUzWV3y5lYs5lVuA1OLFsExsMSdl8+yZ3NNkbOib0pZkuWS57yerPrT+TpDEKZY1sf3QPEEtLutnHlq4vzDgsPEJnETJLP3xFImonZ0lQ4rSjX4uE4dscl3LEB2NRf2YAYgFUcRUZjLGf0oWeF7REAZuDmnHCc8fZtqi3YZOs/g0QSWFwF4jUgHwPxcHcwAKLxxR5URvLkIRNhWYWrdzkBqaiMrKNi+VoxNL2waTH2PyAhAE/CjnvM0iyAINSz+kGEPrCg7Ee2IpmImVzkAYRaEn/jULCMjhAtse0PciHlaHKUgtIou6umENzQXvrRBMBrdH2WM4H5kgWaO4AkKX; 4:agbHUmVv85u59XHny0bPeYgA+oSfFNBRxwQWRHNzQ7Q5mlem08pkhuAJVzJNWarilxyHUlN1p5yTpxg5wfQIfDaiEZxKV/rXoTCXL4USXhZN//iQa1/4zYTrF+hZMXMdmq8MtpHLCegg+MhFcn6kHL+++YBQ6a+aBvXu7yk9sWIQ7gUhlyd/Y9jC+sSrJssNTder3WUyXD38CUbqbvbKQFTYUyJNNxr0jNp6EhSnNpGRExA5BSBpHXGEjvRXVr6wHeU84SXwQsFDFbB+c+6JXw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231023)(6055026)(6041248)(20161123560025)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR05MB3148; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR05MB3148; X-Forefront-PRVS: 051900244E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(39860400002)(189003)(199004)(25786009)(7696005)(52116002)(305945005)(316002)(51416003)(97736004)(47776003)(2950100002)(5660300001)(66066001)(7736002)(8936002)(16586007)(68736007)(50466002)(48376002)(16526018)(55016002)(6116002)(3846002)(86362001)(105586002)(21086003)(106356001)(2906002)(53936002)(8676002)(6666003)(50226002)(81166006)(81156014)(33026002)(69596002)(76176011)(36756003)(478600001)(118296001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3148; H:mellanox.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-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR05MB3148; 23:ngPvxqdhKhW1iEKEcbsP+OwLOSWjIE8P9Po9pxp8+?= =?us-ascii?Q?v9BVEl98VBG+MBdwUTMjES00Ht8M0zAWKb9OG+dWnc4eibCatqGZtOPwFUCw?= =?us-ascii?Q?Gfnjb83uzyRbW8A+yJIIVCgEVcV1ebxu8o/yu7c7EIqvhIUaj3f4nzmtj1ZP?= =?us-ascii?Q?8ACWWRhnBcKd/6ulloexK4C6j/z41m+K+lUjgv1AwFOC4ISDtWVZy+Vsrsfg?= =?us-ascii?Q?ZN1SrPPUVkgMvoTrnDIWqGSfGaynqOxLwVXUNt+qpl6eDqVDVSDbKayaQxaa?= =?us-ascii?Q?nSBiMtvaDoeuto4dDhpYxSAoWk1qeeGv0EoVVGXwvZJeNuKMcjdUmMsipLRp?= =?us-ascii?Q?SUeqXcF+4pkWX3Za3/yxyprt2mGx7XZsGgMEZ4dHuZFPYAtJ4D26PzYo7Sfg?= =?us-ascii?Q?cU1dSYtRJO23wMQHVvmIVjidIdfHSaJlUlQzpzchug5m7niXpqOLm7v9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B4eLZN5w6FsQ1aSXDkM66SSPJxrAXz/ToPLr638V0zLpU/6csgnTr4=; 5:URuzi2j7Te/mzGJR1GiIsUuWxw1klkF3S2uXd4peT/rpuLRM5tviKeDj4mzoY2KxK0msji+NAT8XfK0lsWeqlwp39ARU3S4PbVfN7KCc/DdYSMC5vNTfF8IjOq1tibKVW/Djg942M/ye3SMlZC/ui+jvGjS1z0e6AGWJTpWxOXA=; 24:JtQyWB5uOi4WF+XpbtGpimHBtbftNFB/cUz+aJxKk5/OJoJywccCsyzA+t3IpdNBesgB/6Q3xrpKafzBZVlsowXp5oZCcgudottfZUm19Lg=; 7:9kKvVDoLDFksP1joNK2yl0DJ0Z148rbsOz2n2yEdyo9A5TU0O1/xvi2DPxpniS/WiqfHJB5g04qxehg33CW8QxMHQTp2QthsdCsGWRNCfIS8xA8CNV3HgNYqYlYd7c3NHCg0Og9XWt46W9D1kOZzG+xhV7ub0Fm4IMBIQF7phP4q0omy6XvLHmScIXaBaP2/4Xx0Koe0e24kxtKiElUYVM5Qax0FdvNf44U+Z4Ejh7J3byuDeVWWoPz5q1V2NGhM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:36:03.4419 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05f3f526-49dd-4cf0-c9c5-08d5415ce8c2 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 v2 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, 12 Dec 2017 12:36:11 -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/eventdev_pipeline_sw_pmd/main.c | 29 +++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/examples/eventdev_pipeline_sw_pmd/main.c b/examples/eventdev_pipeline_sw_pmd/main.c index 5f431d8..b7d1795 100644 --- a/examples/eventdev_pipeline_sw_pmd/main.c +++ b/examples/eventdev_pipeline_sw_pmd/main.c @@ -563,7 +563,11 @@ static int xdigit2val(unsigned char c) 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, + }, + .txmode = { + .offloads = DEV_TX_OFFLOAD_MBUF_FAST_FREE, }, .rx_adv_conf = { .rss_conf = { @@ -578,10 +582,28 @@ static int xdigit2val(unsigned char c) 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.rx_offload_capa & port_conf.rxmode.offloads) != + port_conf.rxmode.offloads) { + printf("Some Rx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + port, port_conf.rxmode.offloads, + dev_info.rx_offload_capa); + } + if ((dev_info.tx_offload_capa & port_conf.txmode.offloads) != + port_conf.txmode.offloads) { + printf("Some Tx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + port, port_conf.txmode.offloads, + dev_info.tx_offload_capa); + } + /* Configure the Ethernet device. */ retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf); if (retval != 0) @@ -595,10 +617,13 @@ static int xdigit2val(unsigned char c) 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; } -- 1.8.3.1