From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30071.outbound.protection.outlook.com [40.107.3.71]) by dpdk.org (Postfix) with ESMTP id 3A9A51B644 for ; Tue, 26 Dec 2017 10:30:49 +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=A/b98kJinBdg/EM64nwJoqNnuBWMpbtvsio8MqT9uJs=; b=TK1hntcvEp+6Yzhj+2o48MAiEWeC12uTz6eQ+ZYZ13YO57WI7CTtasvVeyZKrVy3XjZxGE8JmyDARHlls0Rlzc2wedtm8HO0F9JejA2WxyvGpSuWJcJ40sQLq6YTc5GtSt6ofZsEhmtLKsAqtxIJNjgxkg19JmmyGW1pd5Ue+4Q= 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:48 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:35 +0200 Message-Id: <9bf0d72d460be5678b9793c37b0d5c7006d31204.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: 54387a58-f7a8-4b5d-f9e7-08d54c43591a 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:4BoejZV6BGQEEDCnvu07MweTP20sKUKGoRNFzzV5ycEPNbYoX22Z4/bPQT2IZRr7av6BOFm4F4M0KUnEfgNbMBdbcSnFvRZYnVyJhD474ttDcauinz+Aq7qmqBFJtWBevMIDD2uJbjbBtdEDzp4nL7vt5F0avl1u/7OEvYF0kOVmtC6o7b5w/VSycQI/hzBPut9Cz+b1EsxyWt7vjDq6MnIcJnR232ez2KYoOolRlDfLWQeqgL+tAv+FcRaWDQRT; 25:+BWNsaw7sV3iU8eF+Z7JKr6+gVDH/DXJjij4VqFSC424KG3UwLH1l1EFyHoKU/iInUdMNPa1zBz2do7t2lfd+MqQzdG7Ag4Le0mDRJY1oDmEEolebVIbp2F+5xNU7bEPB/DWDM0aX5tBG6ajf+3WrpeRexk5qJGht/XKRdw4+eb5sY9DtUi90vjfvPVJ6kN337S9YZA9lTG+QlEm41u2LFdFLAndIbjbsA8xHc7xICGkw8pcPwijgwA4Xdzaqj08bRgXRfQnej3KFSfgZjqH1c3Oit8Ph4Yxfa1keOt6MSVNXQyNqG+gJ4CBVZmwprnRiK6pTzmS01sUcUREjsCcSw==; 31:HXUZz3ESvf5bPohVn0evQzFRDlAjNbsUhNZA5S0gi4B0/+CVJiioHIRiXu5iYi7vSAa6mzyAEyWxc01kzsu33m1pNcLMnXj8JCwuSPdftS9+9iKUgo8KbWEWjLfWcl76edIVzbdffkbaRB/Gj3fkBpMdaoZ4VR0q7+WdyjakVr/rjCL0EhCZaE63jD9H6KzQxUh0aAYFbLktdZ5XX+5L8HJJliYwk/rcc9+x3+LFr5I= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:8C0KgdyEC8ZgujcO/jpuj6o7Rtj3/datwSWXmMenMsiVgCEulXZFi8QKi9tFwT6Vkkmz3VH7s/A9+K0B2WpRk6a8ueFtxqZXROrRoPAx9cu+70AJmLwyoQRlghOXy3MBJrDOkMxK3P6WUTW4HO/gbIGQWYYEZUcftCiCIahlMhoVrTeQtRPqOpmXB36uFGEw9Z7juUm5GAndxF+k6hYUm7AOg/+YYx3TkoK5nDG+U/3N+mVW86sl4WG5ES2cikgGT5jUPkb6SnXuhb8urfn+fnwCJ+59BbQdYJRlNOswdi9acHFtPFsyQtljZND94J8j/zadt3Iy7EUvRMq1FnCtAT3oSZJcubyArFLOxMcHCPfggYgXCQ5gyDr3XK/E/4rTX8vMtouT7R4lnKsAxr7OFqClD90Sgiue7NF5v7lQqhowvgdQHtHwsLbUeQSbv9scDPsokcL5uy+EGQimNnenQZL9mbRG1sB6ILdqgIMvrGb3qBv4FiiiE+yz5NeFYkAo; 4:Sy6EiJhqchoiCON3X1eF7ow6uQ+lIIXp5MGp6qPq2npYkHT28EVlJ0Wvrk4kUhUEv8MS0R2ki4WS/p78jPtGAbyJiB87BSDg1rXn4mRC2+56VqH71o1U15MmWLUH9OzQwGZQwTRMS9U6WIwQh9A41KZcaEVIbWNn+1YRR4loz9DbYOH/lY0MqElwqMaV0/os8jjkpTfqpNi/josBqJpELz+rpTIyHABrebUMDW7UormPkbwHrNUxks6g0eLJOpdYOpabxUF+r3CYIZWQ05oMPg== 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)(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); 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:l2E32fvTNmkf6LF8jWJMX5KwXVxt14lct38qQoCgQ?= =?us-ascii?Q?Yd7MVMdb3WM5Nx7w3cVyBSMgDe3DgeFRZNxuIFA5a5A7GvZlxSM4ZTtb58fx?= =?us-ascii?Q?Ps6NPf3OQltIIlIjzepSXyKRSft4wqljOUBBP32UQ8qGtuogRA/fX6zoO2bu?= =?us-ascii?Q?4rPB9EaLph4ZKSt4M9V4kGxxIvgmGMmH7pFzy2FqEqdmArA25q0zK7Y5oRcq?= =?us-ascii?Q?oSnlyh4uAlqHHsQe7ML6tNx+KP9Ko+ddLH/kN7mLW4T/vV/Szlum6m//e790?= =?us-ascii?Q?CPGjFwg2YFRbMe4aNaysaRij3a/93BYYpgGlTyK0iAuz3CK8PICLab5nnWd3?= =?us-ascii?Q?Rvxc567VYWxQn8DWsMQGTF45yYKoXt23NFSt79Y6d2gziPu9nR0YsVDOxAk7?= =?us-ascii?Q?O9jgjJd0F0KkJX9eA18FhsJXNamVlvDiw5RcaGnYBpl1tWsM08q+VqfoAHyj?= =?us-ascii?Q?1dXJEgFHNp+N7D2/OmMREy7tmRcu724dcNU4WqjJAix0bfUmi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4qOvxOY+uXGQHLw0cMrevsGUf2ZK7bYqhXjiT963MtQX6p7RCBJhmNkMzOFPCOyGiLhSDQaC/USUHuqt/i24wcFBAXV5EfOHzfLgEvcA8GLejMtqaVKntKoZ3lCZHHVxdTtBZoGwGb2h1ctaOCgicicW0FoEJlKo=; 5:VnUZvxofKLvqorLFuSeXY7NZg4aIlHZR22h0MvB5VTd8HYOu9vBUARkTUs5LFx9RbVGZ9b/Tf1l4gJ4fVlzJrWGVns+N0sYu991BP1sxGFMhlXf1lMmezDM/CY9aGFp9ocOwEApzRA1krsG3rQgw8lAH9faGki22ormT9fsH1Rc=; 24:d5uJ/Xo8HatdSRjzy0zDpP727C7Ffcv8snolsjKL9k+xgWhX7AXvrTV5a8q0novbKmg7UqLz0eTbX3o+4xHRXMeAD2CLxFjZJjty7wKSHCg=; 7:FxIY+p0k877w7UXyZ3B5fPEju/wlIdqHVc+J4AsnGJdZclkTFUspNY8oxryVLYcpALrporYjhpFBqfCYBlHW2wwf1qNL1n22D95FyPvfQTGeYOZQk3C7ScBQSwFmGAUoaFTyjQWkVt+O2eF6qaHxWDHYNrUO+/uXZy94EsVWpQSCKZU+sh9tCKKkPrOuBFrXcLX9Zw2wbz8NYsX6VKdaAjLEkNQRyCc2THuzvY6AZAm+ifYWOxv30nhBbT1Jlv0m SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:30:48.1284 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 54387a58-f7a8-4b5d-f9e7-08d54c43591a 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 36/39] examples/ptpclient: 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:49 -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/ptpclient/ptpclient.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index c53dad68b..f6d4877bd 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -77,7 +77,10 @@ uint8_t ptp_enabled_port_nb; static uint8_t ptp_enabled_ports[RTE_MAX_ETHPORTS]; static const struct rte_eth_conf port_conf_default = { - .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN } + .rxmode = { + .max_rx_pkt_len = ETHER_MAX_LEN, + .ignore_offload_bitfield = 1, + }, }; static const struct ether_addr ether_multicast = { @@ -216,6 +219,11 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) 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) @@ -239,9 +247,9 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) /* Setup txq_flags */ struct rte_eth_txconf *txconf; - rte_eth_dev_info_get(q, &dev_info); txconf = &dev_info.default_txconf; - txconf->txq_flags = 0; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf->offloads = port_conf.txmode.offloads; retval = rte_eth_tx_queue_setup(port, q, nb_txd, rte_eth_dev_socket_id(port), txconf); -- 2.12.0