From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00068.outbound.protection.outlook.com [40.107.0.68]) by dpdk.org (Postfix) with ESMTP id 990681B19D for ; Tue, 12 Dec 2017 13:27:40 +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=i9nO7JRMlhPpkPLe6Vd6G7hoyEyj1CFFr75Q8f07oNk=; b=PPl5y4G8/9yf29AxMztf9PmhCtzYpQDfyFHd9AS3XM+Pr2+dbF8MfntakbdVz4azXqvG0M44UjeIYzP9CXkiLoRXc3lJc2tYt0LkVf2iayJNe7yut7Lpho7qNsY0JOJwX7MblySKXEafFPlXwmTGGkTg02fnV5c44/scCZcJtHI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3149.eurprd05.prod.outlook.com (2603:10a6:802:1b::14) 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:27:38 +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:26:30 +0200 Message-Id: <78c606bebc97a32c60cdace6e7574ef2c24f5d4c.1513081087.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: HE1P191CA0010.EURP191.PROD.OUTLOOK.COM (2603:10a6:3:cf::20) To VI1PR05MB3149.eurprd05.prod.outlook.com (2603:10a6:802:1b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f50c247-ecfe-4ed4-a193-08d5415bbc04 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:VI1PR05MB3149; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 3:EhnEKwkf4wUBDfyf9EfUrk7OaaAWTv+82diP/rw4T5WTvpkvraWYWy2LSWk7SNDjxAgC73agh6tJO9LDcDQ8Gips3RtWFDLIFxT6zlDXXO28rxwPgMcHn0kcvGu48n3UuqXzyt5YpiXUtMDEUI34KVBdOzIGv5ZLhU8bGTIGL+PEex/78+FCuRCMiLFtOc6lOH03IxiH74+PkQA1D9vlFY6g6+B2uNNCJ1eAdbjtG2g/JnqBkL2VHx8eFFDAWamA; 25:Jr6SWPcvJn9OqhkWu2uBAnLxKpUL0yBmhLE0r0tsdC46RSMDTJHLf2bd0DJYOFCyWYenpgUXOfcsTj6rQYWbCD9vWmWZ7nYDcU3wo7oyVrrrWUJi0jlH2GOkKEG208JWFZ0jVwkgvCcKdWSjUT7FIbkWXnufkOkj8hf+ciq1Tu6Hnp1anDp00GmKaMBccZe/lo9wK+f2JIre+fvi446AbaVEicAnno54e0A2j9Vu7nfu2SHo2/IGno3tA4HBAzSc+y4v4F+5L8OBJQqPo6N4lNzOvi6zrk4eE6j4esjrgA9TUMixyt3J98TSq/HwITBcuioYLYHTBE7YmEZ8pQNzaA==; 31:VNFVd5aqIJ6ELyF6sZIKi66LEc4Y3N2XDSLj0TzW7kyui5XfMbaSGgOT5QlzSZ3Cr8ABYqmh6Pd1I1JSLotppdzMvo+29KoX8MyWniX2Bl79wMsMqiE/ffKt0609Z4p95446bkDOKnR3ES5hDon2/ke0d2tjOrjPNltfepHFRVP98bSyxGB2tUEo2+ag1izRR1AAQRQ0Yr+Evoig5iYV8a8VO7CkEnymj2bNiA7yjVI= X-MS-TrafficTypeDiagnostic: VI1PR05MB3149: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 20:iA8UkHk73W0VGwvGQnawc9xOyW0xu4YLkkTzart7xXzrTtgMMTJthdNfbv7vO2WXvpe/yDmwO63PcF9ficJPHp3TBB8FssSBKUf/SkqvDnAYla9VQgkDZ5jTh+uWetJxCOYMJfDuslXEqCAlBIFVNVwr/7HtPw4TSNMpElGzm7l3LF4J1HhMGeWKyhXKnVxNxjaG1Rea5l+lJRst9CUdZneroJtO3mOIe0TyfgLeY7ZmqXFXFmn6pOuXu+3qCvZZMX0oN//Xg88nCHzUivKC4+AY3vYdBLiehzt/dukkqyMpmJeMLvoiWTviCGJy3zu44mhY4QmZeu4o7PX6QiFr2XAjiRfhT06cFTU5UZHGSMfRTIYCH436eMAdc7E1Ms3ssH33ge7+NWTGgIOHi0AKEBgf9xBOdCbDfYVO5QeLqRqkZHAAzW/QaEOUloktZzPbQX1pCwvjV9mNNHzzIkmpxJAxhmvevVe4p6chpaFoPgXggxGoa2umSHeisHO4xM7v; 4:a6CDdY4wNt4SrloiNE7CV7rLI54LTGuRMIIBLxl4KGlb8F/QM5tUE1SAQaWUe7Vv7DzYjEjSoUXh38EoXIcywjyQelYACgxsLX7o2rW68WQDamvaSYI9f2ZHFo9SWzQizSMWgwJUYWXSVnF9iHJ1/b8VUIUqCp8OPa3lVi3ClXkNqMMXDlhClRX1VeKlSzkb4T1JEsZgHfsH8C0555fjfjDG2NfSWk4bWHc2tEr8EPrS2bE64xGV8PYAtYcid2/THmqkLd4kbPKSg72lnWJ0Kg== 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)(10201501046)(93006095)(93001095)(3002001)(3231023)(6055026)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011); SRVR:VI1PR05MB3149; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3149; X-Forefront-PRVS: 051900244E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(39860400002)(366004)(189003)(199004)(7736002)(8936002)(305945005)(66066001)(3846002)(5660300001)(47776003)(6116002)(2906002)(69596002)(68736007)(48376002)(33026002)(2950100002)(50466002)(81166006)(21086003)(81156014)(6666003)(8676002)(106356001)(105586002)(118296001)(97736004)(478600001)(51416003)(25786009)(316002)(52116002)(7696005)(50226002)(86362001)(55016002)(36756003)(59450400001)(76176011)(16586007)(53936002)(16526018); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3149; 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; VI1PR05MB3149; 23:D/b8jHm99i8ECXxSaq/wY9ZRKEbhIY2rlkrvRRGgg?= =?us-ascii?Q?zkAtrJn0HleuO6iltrCD/5kzFdayiVP5YcJmWltIPOxDdIrdUEswbSwb4qdf?= =?us-ascii?Q?rFLt02+ld7/lI2GjA6AO3xX8IGimyDsjSgcLtBZQ8qT9i1AuUrn6zlkpMAfE?= =?us-ascii?Q?/nA0ZGSD2n9hlVIUK9cSRpSuCLfYrMl+TrxsJZ5CLCnuSHoUrsyLvyof0GEj?= =?us-ascii?Q?MB/nHLW1Vd16lhMQJwxsnvzXcG8DTy0U/3Hd9xoOU1Vx40adWUf4McpuTN0e?= =?us-ascii?Q?ZfOLNA+n+RbKhRiOCPi7AzEPnZfvv/FmEMA2BygJvLSc6hXOWHKRvkny/wK/?= =?us-ascii?Q?AtKV/Um4/eLd55D1lZkuwg6cxOWp4NFn9935Z4if/TGMjn49mOMIZB9CzJJR?= =?us-ascii?Q?lPE2dKc597GLOcOZ+qYpXTrIr9HIGQQKO/iP115lSdPQRyC2pPYkm7daNe7L?= =?us-ascii?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DesDKjfxOdkaPXMD660VvSa7ua3A04dN9FTOyMBiMW/RFFYZX8yjttl5YtWaUA2IwcFaz77cpI9I77vCwPmSQXcF7OLJtWIE=; 5:WV5RwGRpdOdaJkUu9UQxyTpnwPTIqtEdedxiPYt872+r/oGu7cI2njtIH6xLrjoRSJajXS8EWL5hlWcBZ5+nLdd+AzEItWaq98XpFMK+/vCop4zMNvXu/IuYenRr/EFvq1n55AHnvwdhWBF9XSdMrq0K1DJFjYpdQYxYH4f9ksU=; 24:C6kLgHuMG2zUAPYyTL0v9UOZrvp/evhZaLz6QeG2MPi16hxwZIPS6a3CqqLCP6i9+74Mn9HMr8EBsK+PwCDcQL/1rRxjX7/qKIpsHFwEldk=; 7:pHpgbsG7o2fqYf7ISS8ROih3LYoyBXc+0S081uH+K7c7NowIsC4fBYkBhURoiUUtSghBY4Oh6hqllg6iBFpk4bdZcfo1eFUlYTI61VrfmXU1JogvTt9tKZOPtWqZ3udsKsBa0Dj49o8a8upGPa8bVv5vhV3vuzqCv/1cqZU1aKpmld6IBuYs3hPE3Im+g/R3AkzcmjfPHw2iQRTPMpZ0GKG1WuHC4nXTTdOwq7sFiKivJ+D11tiF8JkTubjXZi8m SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:27:38.6136 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f50c247-ecfe-4ed4-a193-08d5415bbc04 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3149 Subject: [dpdk-dev] [PATCH v2 13/39] examples/ip_pipeline: 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, 12 Dec 2017 12:27:41 -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/ip_pipeline/config_parse.c | 14 ++++---------- examples/ip_pipeline/init.c | 26 ++++++++++++++++++++++---- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/examples/ip_pipeline/config_parse.c b/examples/ip_pipeline/config_parse.c index 3211c6a..a16d1a5 100644 --- a/examples/ip_pipeline/config_parse.c +++ b/examples/ip_pipeline/config_parse.c @@ -97,14 +97,8 @@ .rxmode = { .mq_mode = ETH_MQ_RX_NONE, - .header_split = 0, /* Header split */ - .hw_ip_checksum = 0, /* IP checksum offload */ - .hw_vlan_filter = 0, /* VLAN filtering */ - .hw_vlan_strip = 0, /* VLAN strip */ - .hw_vlan_extend = 0, /* Extended VLAN */ - .jumbo_frame = 0, /* Jumbo frame support */ - .hw_strip_crc = 1, /* CRC strip by HW */ - .enable_scatter = 0, /* Scattered packets RX handler */ + .ignore_offload_bitfield = 1, + .offloads = DEV_RX_OFFLOAD_CRC_STRIP, .max_rx_pkt_len = 9000, /* Jumbo frame max packet len */ .split_hdr_size = 0, /* Header split buffer size */ @@ -118,6 +112,7 @@ }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, + .offloads = DEV_TX_OFFLOAD_MBUF_FAST_FREE, }, .lpbk_mode = 0, }, @@ -158,8 +153,7 @@ }, .tx_rs_thresh = 0, .tx_free_thresh = 0, - .txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | - ETH_TXQ_FLAGS_NOOFFLOADS, + .txq_flags = ETH_TXQ_FLAGS_IGNORE, .tx_deferred_start = 0, } }; diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index e56e404..85eeb2d 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -876,10 +876,10 @@ uint32_t i; if (is_any_swq_frag_or_ras(app)) { - for (i = 0; i < app->n_pktq_hwq_out; i++) { - struct app_pktq_hwq_out_params *p_txq = &app->hwq_out_params[i]; - - p_txq->conf.txq_flags &= ~ETH_TXQ_FLAGS_NOMULTSEGS; + for (i = 0; i < app->n_links; i++) { + struct app_link_params *p_link = &app->link_params[i]; + p_link->conf.txmode.offloads |= + DEV_TX_OFFLOAD_MULTI_SEGS; } } } @@ -962,6 +962,7 @@ for (i = 0; i < app->n_links; i++) { struct app_link_params *p_link = &app->link_params[i]; + struct rte_eth_dev_info dev_info; uint32_t link_id, n_hwq_in, n_hwq_out, j; int status; @@ -978,6 +979,21 @@ n_hwq_out); /* LINK */ + rte_eth_dev_info_get(p_link->pmd_id, &dev_info); + if ((dev_info.rx_offload_capa & p_link->conf.rxmode.offloads) != + p_link->conf.rxmode.offloads) { + printf("Some Rx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + p_link->pmd_id, p_link->conf.rxmode.offloads, + dev_info.rx_offload_capa); + } + if ((dev_info.tx_offload_capa & p_link->conf.txmode.offloads) != + p_link->conf.txmode.offloads) { + printf("Some Tx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + p_link->pmd_id, p_link->conf.txmode.offloads, + dev_info.tx_offload_capa); + } status = rte_eth_dev_configure( p_link->pmd_id, n_hwq_in, @@ -1019,6 +1035,7 @@ p_rxq->name, status); + p_rxq->conf.offloads = p_link->conf.rxmode.offloads; status = rte_eth_rx_queue_setup( p_link->pmd_id, rxq_queue_id, @@ -1060,6 +1077,7 @@ p_txq->name, status); + p_txq->conf.offloads = p_link->conf.txmode.offloads; status = rte_eth_tx_queue_setup( p_link->pmd_id, txq_queue_id, -- 1.8.3.1