From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr60076.outbound.protection.outlook.com [40.107.6.76]) by dpdk.org (Postfix) with ESMTP id 0CFC61B3EA for ; Tue, 26 Dec 2017 10:24:29 +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=PDDOaw8X5hFjL1DgQcalpZ36pFQAddYbn8/Q24bqIRM=; b=bfBGoO/hZNR/EzJ5q8Qp6yQVQTWY6bKhs3mdkvbF6oiYdb7SV96LWEME246lFP5FNCKotsIMO0EfTByJOXAWfDRaVYD3IZGU6Ra7ODQjuAwQ0kdE0ya2VU8DofoRpB3arJutggafNkSJTE94BTYH6fEc5CNhLachyWluMk/GXI0= 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:24:28 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:12 +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: 1f1881f9-a8d8-444e-9352-08d54c4276e5 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:Bwa3ISom5Ap+hxGFS2eywA5AETKvfIr7hSIibF66AZ4QTFI6axrGyk2OlEZcufUuHueBYYu0r4ajOP/+s8r2tsb/4szX0UFXtQxAQXVpUs6iQnErQUAsN606rAwzFsXgL6Fw5UFLDYTxazLdieWRaLyyz3tJ2X7srb2fGYfubPuRAqRHUZnz8Aa6fk/A9Tane1dd57xXwIeNWEr2H74yQotUm4W9n73x2c4MsoBR4lhp23SuWG5UgTMQnCnj0qGY; 25:tk11JMWkO8PFV/kc+9VooUdaMs1gdq1ImOBi9HNPVGDat3jeN0xLisIhi/NnrJP+LbENHjxqAjeD47ESYDVbepE8m2CdevfzS33sldR3pBfq4Dyxx6skbxyWDMXdWD6PfVixtM7qJQTY+JqXQ9Gtlfq/40l7/Es8Y708sNmcN45POgErj7o4dWSHEaNyi0UiZlxDtDKDTfv4tE09G2St7ij8v6PRwFDFddl4RlYrkckUIc8AyTVLxmrEhQJgeqM6OedWSKtdwcB13N7JgH9gu0fsbAdRqkKQx3GXEVgVGLabQS0hDuE9po4H08ylwMvqb3454WBoFB5qRHFEAHN9nA==; 31:p0JtHrz0aIZw/ghoygV5sQQPM619Zfo4Q5iSyN4RFfpqD0qb4beUYej8ynlcO0O+zWP4Qu27Rq2sT7VIT7On2UfN+elcL6JPK7xjR8Qza6rNdsaSnZh8gZQItbOkO/aYtowMCcbiP0afH4mqdWensNJ4dcq+M+CrxndzxW6Z/8zcEJL539YwldrGhNMvnbgkI790e1dH+kvWBM0clUEd4SuMmmKlH2r6yHLnclC7bQg= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:7pobMNmQQsfrEB5wt7utzFnmAOA9p/4UOf7EbNR1cXy0YyFzAhaYyv3aysR6zZS8kXX7hc2jhtSfija8gCYIsVFHOYzg8Ow5tw/wRgDDA36YlQddJSgmWEXpFy4koBSLEM25A9Ih2qdN+ye3wzvxdwc9SNJh/1JGyxfkBvXkVbd9lC5NqGmphp3c45JV8K+pMWWmgozOEw6zjOweJcMwx/4Hs37G6l7qcJWHSZZTDo0vCiPYkPzW02VBTV+3TQzKMWmXBPyU1xAeHp94hqWn63X9m2m5NwCnGKcBjaCK1GYDUV3gfQmYY7hhSmFpwhh76pcXtKyRtSwaOhnCDbCNjoLW4YN/XLmJdNSpUrYfkUNTZspjAq4O5NU8qN2RpanpH0W/2q67ezE6BB/sgbQ1tQ/VgMBOUbEC414uZk0/OUq57o6TkWtdX5cBD5LCwuXWoXu+rBpTsIm4j62th89sBgSCmbNhV+fheoAhBMeRE+rI5r/xF4iIviHeVd5cAU7z; 4:wVA64nl/LrbSZu3s/xfFAtIPOraMCVlfIA7G34FeUixDRaP7UO7J/mnxCXx0znvBOrKSPcBXrSscRkfbJLHChyDQTj0VSMFrJFrl8e2owcs66Nuti+9X/EkUzcTFCURVoxS5F9U7F92UCh5RQzBinG8tgE4PN1jSoMItsIpNPFFFRcecoiNe7ab8ccdMltXDYmSkmwnHsDVqvJsfJiiln6ps3i4H8IJ/JZnaXo++akYWDC2KhWiVm32/FVQxhfT9GkuSkqBqv7PeMHmUbYcXtw== 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)(346002)(366004)(39860400002)(39380400002)(376002)(396003)(189003)(199004)(316002)(6666003)(55016002)(105586002)(478600001)(106356001)(69596002)(16586007)(51416003)(7736002)(48376002)(76176011)(52116002)(305945005)(50466002)(7696005)(2361001)(2351001)(33026002)(8936002)(25786009)(5660300001)(50226002)(118296001)(66066001)(47776003)(21086003)(16526018)(36756003)(6916009)(86362001)(386003)(59450400001)(2906002)(97736004)(53936002)(68736007)(2950100002)(81156014)(81166006)(3846002)(6116002)(8676002); 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:8VLGDk+NiRuIA6H9m4srID0P6cUP/U3pe/7uuCnLe?= =?us-ascii?Q?ZaxnoOF4FicidwCsQAcNaRcnfZa4ipf8gbjenkivJFTa3tohMPddUjBvZFV2?= =?us-ascii?Q?PRVSyQnrcwJYPVSSk6yvVpPXv5DngMGAayokfgQ4AvXKvuMm/p/IpdFHhd/A?= =?us-ascii?Q?DRVgbp4afWEGyuam38NK19G7Tkqt/Q+12pR53LIaFH4vbk3ujSH8/6IZQHSF?= =?us-ascii?Q?OaLlQwMJcKtO6JV5ui5dtKYmdNN+PpAX2N4jkyxE6hYWhqvGeifL39Rfr1pc?= =?us-ascii?Q?WL/wsMFClXyFBFI5ra/77wdxPfEZAcAm57a3pQ9sLgnmjWj0hUpynN3tyWna?= =?us-ascii?Q?o4PuSkZZjjcoeBA/GLUs6gfDQpJH3FRORwUcKg5yvGNp/NrFmMBokV/+HjWT?= =?us-ascii?Q?NOgwfQUfjFDMDk4jWPUY/Cnjsvtkr68fP0ppWX+bpanmIB1r7EzDlg4Om1PD?= =?us-ascii?Q?uxFLPJ3XZdE5YRMvIj5YDgk7XTw6cYVgNwSPzV7AwuFr98e6eVPhFUQ+2TpR?= =?us-ascii?Q?sa3xeOk27BE8TH7MWYZW/wuc1AWUuIQ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IwlldK3e226Bf5c0f4z+vj4xQlR3URsQKUJDe4bX1AphBChHn6Tu4ESe3D0tdlfwIM+l52EvmFIcdEDc7j+Rd5lB62gvVNq7H9RPd6hzNpOjc4Ro5mRhAUGzpi/agI=; 5:Rci/o9TcsWKA8Use/tbK8G4j3edlf3sMThtEFen/pMwwh9S9uHAm3HMJogPKz3cQM7grb83IkcF38x9/HeJ6bx3BVBsnLWhzlZ/4703eF/EPAf45JK1e9DeeRmmxt0yostkip5EmzaVriLtdYt8O6ZJskbmj6o6UImwEUpeqkuU=; 24:OrSk/FOJBPLyxmblvTvkZUZJzF2hYVDZAwjzjUA9jjTO0uMef5WvGEMB3BdRQfs/1PkBNsIgFjZ3k8kXAHDgLL8prPw+pB4x9YGFn0rASBA=; 7:SNVbbrgdnN6iZIa8Zg1h1InvgxZchYX4ChGBqsRLcLhuvZiD5zEXRsdTEMBaqcFj5CNjkp+dCJbTumUEEJmVeGm/eTDpilezBf7WjzXFyb1WXURBpxeU99QGtc5sIqBH5iN8h6ZOMeEBz1dMhdLnkx0Y/YXdOHxhDg7MfUJ6aiCmsxZCGgVuZ9e25KDmqAKnI+gu212+bb+28fH0otbpgb94UIHDU7qlH7JNxPFcduBtOV9a6Aw1lFl/oATIrP9G SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:24:28.5977 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f1881f9-a8d8-444e-9352-08d54c4276e5 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 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, 26 Dec 2017 09:24:30 -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 | 13 +++---------- examples/ip_pipeline/init.c | 15 +++++++++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/ip_pipeline/config_parse.c b/examples/ip_pipeline/config_parse.c index 3211c6ab7..835541229 100644 --- a/examples/ip_pipeline/config_parse.c +++ b/examples/ip_pipeline/config_parse.c @@ -97,14 +97,8 @@ static const struct app_link_params link_params_default = { .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 */ @@ -158,8 +152,7 @@ static const struct app_pktq_hwq_out_params default_hwq_out_params = { }, .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 e56e40482..84017ddf9 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -876,10 +876,10 @@ app_init_link_frag_ras(struct app_params *app) 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 @@ app_init_link(struct app_params *app) 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,10 @@ app_init_link(struct app_params *app) n_hwq_out); /* LINK */ + rte_eth_dev_info_get(p_link->pmd_id, &dev_info); + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) + p_link->conf.txmode.offloads |= + DEV_TX_OFFLOAD_MBUF_FAST_FREE; status = rte_eth_dev_configure( p_link->pmd_id, n_hwq_in, @@ -1019,6 +1024,7 @@ app_init_link(struct app_params *app) 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 +1066,7 @@ app_init_link(struct app_params *app) 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, -- 2.12.0