From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr60063.outbound.protection.outlook.com [40.107.6.63]) by dpdk.org (Postfix) with ESMTP id 096A81B3EA for ; Tue, 26 Dec 2017 10:24:30 +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=9bnAnYmkQCZmfsL5JIVZe2+t59vd5aoLBDIbvEtdp14=; b=XKpUyQEijQ1NLjK8NIw7cXJzcQx0iq1XPUfoxu3w2R4t3IEHWvSSAjX0YKF6Te/6/zH5KsiDT1mWOeyJ+ztzbYc+spZukO+VUFiMCXk3wuYJbZ5vtdTknWd74WuOFog7FrQz2YDqK002VX15xjhiOsfeT75b516Ao7NtJcdD+Ls= 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:29 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:13 +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: 42c70953-295e-472f-b3ca-08d54c427787 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)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6E1LjcpMtVgtMkwRkyJ3hikjoyc2pPB0oL+qTNz/X+CK6QgSJwfSa+scRRjLX5K/LOOpc3FoAtQe1sZmXdcpu6m7pW0gJE3Jfz3wSsmZ1v791/B2J63A1bHwUguyFhBj4/jMYQBaNqcKgitzQct4XiaPAXo5XpJZeiFdB+pKpaTEeMXE7YGcIKuzuBjMad5Rd9bB6z/b0puuQiBHOgmF5M2Dj1tQALLIDQ+OGBT026hNDuuGUIO74xVo4K1T6XrOnbX9SchIJjv5syYWk3VZfOX124fTD6QY4mV8sKsb+wygKHgWHbobuKMySF9CrxeFFJS+KoxaH7OVxVWo/qOIV8HztswN0Hvg2WAT7Rwn8X1eyGdxcZR5fW03P0ip2il3SJDokGd8rYLi02n8bdiFOc2FHNLme1x0GjJMLkM9oGjB41xR5; 4:EIIJ5Cd54yy8SBlB1/RcuF1bdzb+FVWl/tP/mkVu0yvUPgrOcXNUG0mnWYNh3QCKLu/bURTH3/QRtQU83FMjNuF5Ums+jUpEaXWT8esP84lYgwzlxjCypjaAJGHEzuQDxbPa6Gfk7MrWN8u7ANlFZEjc2hN2MWar6qK6F0CMaLlvW/+AZuwlkDU43VIhdeREqvSqNsxIu4h8JozMOQpldHvUAYpn49on53snC4sHP8KHXjZxudH7Dlmq28ZznEeXuQMv5taIawqb80+3ePX02A== 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:ddsq26EyFmd38bHihESdfKo8clPnVW4YuZKY6BIYB?= =?us-ascii?Q?vAqgzVBXMUbMQpu6xKpAs+6J0QBYE4O3QPBEKzbRt/vghb9zV1932pYbfRhM?= =?us-ascii?Q?hAMIGzCRkvkR9CVdCiLG7YwpXbTqp1SKXrThFb18yhLTjA1op+IUBV1vzL/r?= =?us-ascii?Q?xe9Fu48BKXPVotFwlTt6+IgpE0kPrqlc7vLxILiLk5FGwsc8m8JgN7PJn7mN?= =?us-ascii?Q?RIWtRDJ10yq7ziEXeyUUQ1SPtPNg3iSWewG3aQjLXvMCZwuF6Has/+CPHqH2?= =?us-ascii?Q?sDrKLchivlp3+AKKUr0gbFEKE1+gBBFB1ybcOuVzsIMqI0CKAcZG2Q3r2eAR?= =?us-ascii?Q?mp6QW+jLwczTUXtgrbkVc5MtiUfKvLHWotZMTx+0eaX8QwhK+Fist11LqEi4?= =?us-ascii?Q?VzEz+8vntvU4bKqXQy1pJraUZB9bmYiMLsjIWIECUa+8s+RPD7KznIPDPJ3W?= =?us-ascii?Q?37vTNL1HynoLlpzgxyyvNMArW6enCTJp9M0nzf5fqEW9R4ZPC0Orznr2CCMD?= =?us-ascii?Q?4MFU/k+3zAD8gE+DBaz+5D99JFp9GctR3jXe3960bW2ftEhqQpkYA+su3PRb?= =?us-ascii?Q?8VMDt8X6vgHIL2dVr4XLFexunayljqgvIQTkg/mqXEAxXO5tQQDcKlDAXtdm?= =?us-ascii?Q?1jyNr/mxwzCHzlmuceqS5e+Vmz0BwaRFI1pdRuoMG3CTlaiAvI0UMqhm2RAs?= =?us-ascii?Q?jrnaWskHnR3NE8KC9hTdmSa6BodL3NCoIQ8W+5KHj3oRAtcZHlxevSKB5zy3?= =?us-ascii?Q?cRnXFr4sFQwfEd9ydGf9BxUYN4TpvS6mnP1lBJ2NRTypRM07DXIYzyK6rEKx?= =?us-ascii?Q?b20jceGHkDHhg09DUf9oLJw6nUERKAwnJlneDBfqgQ3guimdj8P8nqSdivy5?= =?us-ascii?Q?oFbmg6zAIP0S6LcxLT7Lbf49LthA1olaI5hsLzem8aryvs61gh8dV6WPQml/?= =?us-ascii?Q?4LP8bCOx/14NN9UNVIMm+A0qxOa4iQjKXqCTkRCKNFOze0IZilYzOiDcQhqV?= =?us-ascii?Q?5t2qtIq2p00a3GDVNq4+pK9AqHHz2pUmFXr7P/APkWEvAuJ39J3yKZ0KywVS?= =?us-ascii?Q?cR1jOVj5cOQXj1UOroW7SZNugvtH913kbvg5n2SUiRkySoeeKIMYoURI44Fm?= =?us-ascii?Q?vxOMqxLMFtnoeukNEbQE/pdTp7vgMwpt7czPP1IaK1ECZWwAKPEd5hIFP22m?= =?us-ascii?Q?K6D4Lnrw/zEL2I=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 6:5gL9iK1QC+kx741F04Sheg0COMUpgj3S28Ao0K7BDIOml4Qd43Mj8HZogfEwIGXKk0IuaOnw1i4DfekgZllZUPFNuMCX/WHYhxyXzv2HddTM6THt0wSMilZYVjpQD0zg1uIq3dRwaMH47WDCocVRQo+mSinIwZJ3MKLkwuSwjL2Rd17sXxosRln4F6Ej/BrFCRjQgF0PYEpVpsHOFywngkuHBB+R6ZwdqAyleiX8N/vMK7mW6yqQEKC1LH2M87+CnayoyKG0pGwXel8gXYWEF3LYvTxiGqO5qjPbh/TO0DrkAy+RNhpI0mSva1CEf+ST10kBgT8QemDatwLgv5kmwERhcYg59OQOM5qDUrBmVjA=; 5:UHvFZyHmMnrUayBsFSarWMKXYWggEvV1Jmd9QEbIdbCu8/d7A5nOc3k7qWn8LPoYbGIR52lriP6KKKXxB5LnNjsPo8qENqO2UHJN/cs8zvHx2vSMjQk6/cp0tdINvlzEpL40Wlb90a5eH8rGnhDb6MSXjM2tCuZhg8jdr6osM7U=; 24:YJrLfa1gRg5mK1I3Y2yPdYCBVVhNnfms/Cddw68Dcb5Zf2VVBd2nKobxnnep54+VILqr5Xy97eeP1Kv06HM8/6tSZvcc9a1o81sZoD/7NUA=; 7:KXK6neYTRXP2AyXDenmLrtYKtMPpBzHfnBxS2PTQoYNf4uCjAUmf1vi3oNxTwS/q+vpGhIN1kQBu8eP12HwERZI7NKclheF/PhouhPCd9abkLtGZj3v4jrpOeNjZQlqLXWxizeaQ8sEaraPw8ZyYJ00g4IZx+dfXbv07Llj3UADMo2Nd3FPrDxSIInWXjOeAJFbRqCpg4Znp3h5At1zWnhDPVQZSsKpYPLCrWoxIupPYd9ki/4Xd8Nl5eJHMeGtT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:24:29.6602 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 42c70953-295e-472f-b3ca-08d54c427787 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 14/39] examples/ip_reassembly: 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:31 -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_reassembly/main.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 756f90efb..521ec60a7 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -193,11 +193,10 @@ static struct rte_eth_conf port_conf = { .mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE, .split_hdr_size = 0, - .header_split = 0, /**< Header Split disabled */ - .hw_ip_checksum = 1, /**< IP checksum offload enabled */ - .hw_vlan_filter = 0, /**< VLAN filtering disabled */ - .jumbo_frame = 1, /**< Jumbo Frame Support disabled */ - .hw_strip_crc = 1, /**< CRC stripped by hardware */ + .ignore_offload_bitfield = 1, + .offloads = (DEV_RX_OFFLOAD_CHECKSUM | + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_CRC_STRIP), }, .rx_adv_conf = { .rss_conf = { @@ -207,6 +206,8 @@ static struct rte_eth_conf port_conf = { }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, + .offloads = (DEV_TX_OFFLOAD_IPV4_CKSUM | + DEV_TX_OFFLOAD_MULTI_SEGS), }, }; @@ -1052,6 +1053,9 @@ main(int argc, char **argv) /* initialize all ports */ for (portid = 0; portid < nb_ports; portid++) { + struct rte_eth_rxconf rxq_conf; + struct rte_eth_conf local_port_conf = port_conf; + /* skip ports that are not enabled */ if ((enabled_port_mask & (1 << portid)) == 0) { printf("\nSkipping disabled port %d\n", portid); @@ -1062,8 +1066,9 @@ main(int argc, char **argv) /* limit the frame size to the maximum supported by NIC */ rte_eth_dev_info_get(portid, &dev_info); - port_conf.rxmode.max_rx_pkt_len = RTE_MIN( - dev_info.max_rx_pktlen, port_conf.rxmode.max_rx_pkt_len); + local_port_conf.rxmode.max_rx_pkt_len = RTE_MIN( + dev_info.max_rx_pktlen, + local_port_conf.rxmode.max_rx_pkt_len); /* get the lcore_id for this port */ while (rte_lcore_is_enabled(rx_lcore_id) == 0 || @@ -1104,8 +1109,11 @@ main(int argc, char **argv) n_tx_queue = nb_lcores; if (n_tx_queue > MAX_TX_QUEUE_PER_PORT) n_tx_queue = MAX_TX_QUEUE_PER_PORT; + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) + local_port_conf.txmode.offloads |= + DEV_TX_OFFLOAD_MBUF_FAST_FREE; ret = rte_eth_dev_configure(portid, 1, (uint16_t)n_tx_queue, - &port_conf); + &local_port_conf); if (ret < 0) { printf("\n"); rte_exit(EXIT_FAILURE, "Cannot configure device: " @@ -1114,8 +1122,10 @@ main(int argc, char **argv) } /* init one RX queue */ + rxq_conf = dev_info.default_rxconf; + rxq_conf.offloads = local_port_conf.rxmode.offloads; ret = rte_eth_rx_queue_setup(portid, 0, nb_rxd, - socket, NULL, + socket, &rxq_conf, rxq->pool); if (ret < 0) { printf("\n"); @@ -1140,7 +1150,8 @@ main(int argc, char **argv) fflush(stdout); txconf = &dev_info.default_txconf; - txconf->txq_flags = 0; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf->offloads = local_port_conf.txmode.offloads; ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd, socket, txconf); -- 2.12.0