From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30048.outbound.protection.outlook.com [40.107.3.48]) by dpdk.org (Postfix) with ESMTP id A398A1B404 for ; Tue, 26 Dec 2017 10:30:41 +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=xQGoLNlc7Urh628zcbT6mfR9s2zypPzEmCpiN9ji3+E=; b=FUXsQXCjnu1T5pzXFeQshKwDkXYZggU7KOglvji0Wm1xIfiKHOT7uosbMv/RSd3rzovaMqa1DoH0Bvly3+Mpi76RTbqZHQO2k/JJ2jHyyvy2J/4OmZ8UbFjhgyyFw9Y5K2VdhFDtPhZZb5k1D36K0Mi3y4gXgw/Ro1N3Y9PcS48= 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:39 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:29 +0200 Message-Id: <1b5b61cbf08e2af964df6d9abc0ac08300135959.1514280005.git.shahafs@mellanox.com> 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: 6f686bb2-a847-4cca-fd3c-08d54c435428 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:UHzlmsFVOBEYrflNbvNiKVZ/Z+tcMSxBqtvuLGbuDP3hYmIMtAtr0Ok6cxsP8xTaKPq/xbKC7hAmmD+o6oJRUhCXddcnND+XlG4iXgN01S3FiHc/dkxc2AWmttvK1f8D2bUYVfTavoiVwH8JEYktFCNbYJi9CKf2qFsxxO3K4hBmZTBUM5V9JJ2oHHreX7YOroAw8979Ud4cAIxEZQ2vJE2vkhHcQVLqGyqd6lFTIAAW2tFsUPmyX8rSsCpfQlZT; 25:S+qFGRU+Gm7+wigea1Ca01Vii6502rg11Gs27OjGvvsLU2YuY5mfkBT1SJkqvxeOGTwMn1GdZ8+1uKwkvCXlTZo8yoar9uV/lL0RHrNe01IgloDojxQ3ctyTmp36EiO7kfpjXaTMD0XM+XZySNo1z/k6Zt62FgSoXIITZiYg6hhsunWHNXDighWmct0fQVq7HEu+waAEVZyfoNr4AGYqucmI3n7845javA5Z8E9RKOU4GMKLA2kRKf5YZIbQP5ppanxnSr5Xs+bqMTPbA3xA8rVqk6+qZtxE6t5+3PvN/ZZ8YwEMfPeSl5Irq93aI8CiPrV+efQZMZ4G89phwfuFDQ==; 31:z+BpI15QLDD7wC4ngzhc6cBT7YokvO3/sA+BGBKFRhLlcvaJHSNEFUTTcHHXwrWbdOP3nU3Mr2gBNrvYKnJctmfzVAGfLGOmA1CtMyXr3Y+YUdP4mX4ICKGq2jJcQXlfxEXHuYp+Uxciz5POR1rCjVjBORiwzWh77zZlibas0eTPYX4fd+fkxQ4CJFl8WacN9p60Z3VLtFq067VmAfUweCe+KMqHDLkbb3shYCNPlW8= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:tPmz51pUQC17GW2JT4AiKZ4tbDrtWMWNQ2QQQzsNn9qQStse9DSwBIHaPEqZ1+QHMo9ENelQTka05GXNZCMIaonkOtYbOfvNzvZNVQ3hUB2paMHKAl6NtgGyFU+TtsmdQf2Xj29aYGm3syT7domEzFJVm7jkR92pPm/PgxBizDIlL5EO8EoO3cPPjj1sNvvIQwYIJupFTP9Y1Vfiv8K+TOGIWn6gpQjmlZa/NYS5V35gjh1KmX/370mrSZo+kHiNlDymei/8zP2+mPUYHANdB1mexC+krf+4gYgWxWgJtoLU+ux8TDsi0KJ0ZWfHo+v7cMq2NznFw8U3nTxm/c+LhWs1ENXnJNrF9VeePQ34Ford0pYMQoOlhlJuMsZT0iLl51wYcJ13nVNGdQxbZtAcAypSoxOEjMRLzCH3Y0RywUYEDFzJ6am+F9hp0/Tz/AP6Wy9dFQpIKPX1TV9/G1KyDnNN2qDbjuVhwwd+lIVOqph4yuUPXz8LhmjkYxDcQtiP; 4:qV/PNHczGHO+vL2eP5CusK4UFYXVEzjxUe2vRvoHMfYYTz2LOOTceCzDQ/jYRgq3LI7Vtd3ELF637lXzFuGfr3SLE0jlaGbQOYWNo2PvRDb0amcWJt9BlPUczml5Z4d6TJNxhaUkUN1jkC1qIabCh7OARKN7JzubBXWi/zki+lim38gxq8cQX4iIeeM5OWprFVspCBnU6LzNeAMgwkPSm/bApQtOfXNPQCoXlmqCMPpXzGx9HQldwPINPoYyn8LZr+F1uNWAoi8BuAy3GSwgIecQA201CXt7VhnAvJSajWwMMgMlSuEfguk/omOJorO5 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)(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)(59450400001)(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:hOQBw81tHPPoVxDW9rgmyHuMTMx/+13sLv+zLe5Or?= =?us-ascii?Q?G6wWLI550RsFJKcBPGosgBfplFZiwjan3zkv1iJUcBxjAjABbdH9gw2giHVd?= =?us-ascii?Q?1/0CnAnpmsjvVI3kLccSqxBFbrYitQD4IGsVgt4h2/6MOx+51N4R1z4p3WBk?= =?us-ascii?Q?ffJ7WyjqDac5yi679AAK6JnqZvb+zPavrKTxvkEUaiXYy2NrfghbmxfYcqIu?= =?us-ascii?Q?Lm4OyjrSTlsj/FKRHXrZIdUyF8T/RA64LwcYipIhAalzmjx2+miTr4F9+jd5?= =?us-ascii?Q?t+UNNAAygdL81xvb2CaC+nIkI0y3PXKmIhGZRBJGA1EpPajqWmyZM93l/0Ej?= =?us-ascii?Q?vnQ8YtNubm2eXMNRbgvtuW71/giU4lt6c63Qrv6cSq8EypJFCWkHYX72wL9M?= =?us-ascii?Q?E5wnudLNVXgPUTY03MZvls1GB8vhi8g05IPp3B6IzcWBsAwupeaZoYyWx++v?= =?us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Au3pefsWYOe0alOfjtB8oR2R9oZL47IiNG1UZ0Np1trzQNbtHqDDB2tBh50sEjDGhX64E77ozpQZU2ZoUFebnNdqiR8EUeVmdkb9Zf2xpRRvANDOeDS8Y5kFC5nnihUo4lDAo9ISqTCsyJVMmNBDYvO03qUvKh/7qhKIxrk5hwB8ozMNtQzMoJc3/sATOU0gOz5qnR9NtPZWH/nsiiL/mq0Img/jGPrsI6gf30QL30HuhJ7tslGDrE=; 5:rrtJt003npDI7JNRF6GYHUmw4SZ2VlUgbuv9i0hGnzoaR1iJ9xKraEGRjIh/xkvQFrTCSdhv25mC+5nYKnijfb/0Day6cmkztvCdtKgdj6aSPVSJ2eVv/5NKxKvo3LW74BmZWFWJDxJ9s4BYX+Q5D6GmYjAMw9OtCyYg+yBeOPA=; 24:DUlxtYbBxSs3hU0YjsEPH9u4xaKcGLYxJ0nRHKVTxmYOfLXHKxFK23TjjiTXCGdyQVrGIV8N6F4M79NMKDpaCEk6SKr1DiLFTQvnIAc6u54=; 7:runEFjre5nmBWuwSeSsFHs6V+DrRQI1GqI4ZICIjakJ0ULn/HvMk8GPMxxJCvNrqtbSF9yuslyAKH26MZxZquZoMcEtb/ywMRDqOWmXpKZ1VHv5KiT6frSOPGHl2U0H/dUIK2BmMxBaFUPipOaVYsy/d2a59F6bhhDXysjg+07HErGvrL6jxp89tbmdTrLPCVmTo6hs19UcaevRnU1XWqA4PH4GpsbNjcpXpyBHC8/4x/tF2rfuJJLu6P7ZVnHLm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:30:39.8160 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6f686bb2-a847-4cca-fd3c-08d54c435428 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 30/39] examples/distributor: 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: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 Acked-by: Bruce Richardson --- examples/distributor/main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/distributor/main.c b/examples/distributor/main.c index 61e6e6b9e..398ed1132 100644 --- a/examples/distributor/main.c +++ b/examples/distributor/main.c @@ -108,6 +108,7 @@ static const struct rte_eth_conf port_conf_default = { .rxmode = { .mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = ETHER_MAX_LEN, + .ignore_offload_bitfield = 1, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, @@ -140,10 +141,17 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) uint16_t q; uint16_t nb_rxd = RX_RING_SIZE; uint16_t nb_txd = TX_RING_SIZE; + 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; + retval = rte_eth_dev_configure(port, rxRings, txRings, &port_conf); if (retval != 0) return retval; @@ -160,10 +168,13 @@ port_init(uint16_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.txmode.offloads; for (q = 0; q < txRings; q++) { retval = rte_eth_tx_queue_setup(port, q, nb_txd, rte_eth_dev_socket_id(port), - NULL); + &txconf); if (retval < 0) return retval; } -- 2.12.0