From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00077.outbound.protection.outlook.com [40.107.0.77]) by dpdk.org (Postfix) with ESMTP id 6FD291B1FB for ; Tue, 12 Dec 2017 13:27:44 +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=Dkp0VrmIckw7ho3MjRvmJoexDNbGibU542IDwPRvJwM=; b=ja1C106eB6eKrEW553q3Lxta5qSyA8Tc19UpBTCYmKYgOoSoFL/NP1fCResVC5yFaux90liXwLU11eHqeJ8SdHA4/O3sV5aDIWJSGhcRtzoPKMmYHgZhlrRg/CVlH5Gt63s7+qqewr9EOGFQ5Lst6W72Wn7n2OFr+1uzIcTcNtc= 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:39 +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:31 +0200 Message-Id: <91e740eb9d7e9d040e88b3c10a3f072542e5ac54.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: bf99966c-6020-4bcd-231b-08d5415bbcc8 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:vsT3cgTdB1sIU8SllOmufwSKOzUW8xcAflevxT4gFFb21mOnx+HesuIJz8Bpp8a7fTqedNim8GUWmLrDFCNuWWCB8aeZXlFCF6xCi9yAcHiaInCI7Te/O319dVvdYR85J1DkAHwBv4xReCmZxfZLn2v1ZK6MYd5KwLPovuNZlwPI5inojDx6MMhDXrywCjOi14YIrY9g0S9EqwEUlYlgD+gIKS/S1i5pjYAenKyiroieE/Scu0SFIfW7gh1uuzUb; 25:vR/NU2GCpxLIOB0/XFHBMHU6dtP7XZuW62D8fBMmG+CUsMJJkV2CUeLcRqcAQIVgRhGBFH4acbTJETH8Mc77kT/Wt1KHIBOgFrl6RWJkPzYkD01ql+v1bpEN18cUq1OSTZXyDjXrOHWvV97Za1ovY43u/VOMIykglFpBXt0l8/pje0hfsQLnGjaWtIR8pS/Jnm63aC/lYzn/V6vkEn6scHCnCoDW5s6kdgf/DIJEZQdrVECmEEpGfCBFiYv4d4vYt5gW6c5eeDozO5mhUumSgFcDjCLpp7KH9LeTFIkMUEmoaYCIqlf7KliG7u3wnf97DsCvoUYYk+QoyoeVLEjfAw==; 31:xDPnHWn5EhTJ2QR6Ywwa52yvDMuU5Ih+ux4iTmhPUqpR+D3L1T0dGV2mP1jX1rbdGcLD+PWlRYGSaa4TaBVfiXMg/j8bNU1C9myhILrOSUg8CiE2yDcyfPHj/rOU1bGkFD2EBPMAm2WKzbbdDd7qldyXQEb24+jv61MPs6woCipqMh5Ai2a1gmEwe+sFB5eUEdY5teiil2XADjiBd2C8DCJO44TKW3hI7Dl/JBbOAxw= X-MS-TrafficTypeDiagnostic: VI1PR05MB3149: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 20:BRrJmeap3z+Q9oCZPgBni4Z6dshfCaU3tT8iDH8H8vlG45ryz/iKhks+B4ZxkKyWBqej84fno+JJhJdeVscDBd+wuXK6GnV6nwxZbbOcOKMKoJBh50yfwJl0FpF+h7qWY/NjmbmwaFp15dVAVQz+UHzehGBd5pHKCm94CX/K0VCkVBasRn8r70/2nhMBpYzCA08vLgS2kyEDA3MZDehYXL0TZ/9S7BcbgPwF0F/61vLl43Zf+8BGgaKKrgnJMR0x7nSPgMOrCYuAVVpIrlYJ8JiED3fAo+WNiPWsrC5pd/wEYd5QUCA7iUdZaw24/agv/WTc/TPPypj3lM3I8VWrRTesUdHdR3P9SlQpRYbvDYcbC1eueJ7OoPmfUFMsbiRdnyQjepFqHWjFDBDJKGWpu9Epoi/bUtvmSzqgQESrZXObbNtSZKerQ65OHbZRLNcJp6+GY/27RBm8Hi97Nh68j1doHzULy2TO/1Lnq99yJd1bGmBiJQAbp9qUrRWUb+RV; 4:/vhT181/w+vgCpfUNNGhdEO7vGGqlTimac8KnzgN6+uus1XGEtDf6arei/lzjqSa8TTVsAp+sgl40/flqQcd1JrOg1V1i5cmDILGKHv2/sdZRFqFhv2mEfgJf8OIfbBS8p/cMXRuHCQmhQbzd9+eGQpYkBj+ihPe9gYAOjCFPTm/Ktxrx5R7VlCaPs8w4Bvt5VPcVKMKAVX3otUFeippu9sT4YZ+K9wrgfjIoSRsYI9pFlH9HSnRxfUT28bgRn7VYoEudxgZg2i0yJUyzpz6dg== 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)(979002)(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)(575784001)(76176011)(16586007)(53936002)(16526018)(969003)(989001)(999001)(1009001)(1019001); 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:2Eeuk3neT5zF2Rokeh+gni4f4YebLnWTZrX5R3nJU?= =?us-ascii?Q?f2izTnpX60ri2I5ml2KdSWfSrxeKUxU9StOen/QdEZZbu5Nuu0jv6hFDYlab?= =?us-ascii?Q?MVUTVK6/MEBuMbO3OLbxcaeLnfvEVL2ovbQfFpXkfoepZIF5L0+HD4nmExY3?= =?us-ascii?Q?lhZrwIyzQJZcAvE5ZDTJjbMCqBupctngQkg2puT1ixxKyN2jMzMx9YmgEaHY?= =?us-ascii?Q?F8zt9Ahc48M3nyv7+TSJIlnSOD72juFw7LpGv0JiCRZ1ZSaK4UQ7stg5n6UI?= =?us-ascii?Q?p3QEKS1gTNExLB6JUPHaLRlVJFy2obhsIurcdtAMSpGm1AfyYXEEFfOKeC+P?= =?us-ascii?Q?nwr7QbkBVb4cip5aR335Grkeu5fjsQVUyYW7db0G3NXKIR4wOhQUUvSGMrwH?= =?us-ascii?Q?BT6l6M5+43Wxtne09fRJj+n+LV3gAs6IzhnyYr7P3p72BwO/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vYyRNyd6N33j/uWYdkMycoMzCkQpgW000qD4KHSHHzxm7NWQ/es2UYN25e7g0jgxOkgAn/hWQruUyOM6E4yuUGJTKZpHbzXNXw1Cv/HLXbySJxCozzOKClGkl5dtyvdq9KWEQWUY7ePfo84UDjcrEMCqvD7Crt8wyR9u4iRAvSuc4b5AhQDP7QiAsSYqRTfZhZhXOy0KZkbczd+o2UXJ17rXyoYZcJzhuzhGYkeAB3y2lv/pKRAk6Doxrtcm3SdU6RQkOam0O9hlTW8=; 5:4aGqHp7+CdQ2zDasBz9klzxIsML6S/40FgNDnwgTSd1Ou/mI+mtEYVZYvNhJj2MBFe2imX7x24ZmB4djkpq9EKeDJ4kFns9VPmN+CPPOHhdUY8uUqsFaWzgzC6WM5wuFLNm+WDdyZCzJzLdYufPco88OS1NvMhi+lzOAQn3tXAk=; 24:vjAtfcobm5zLZNUij2KS2dznGEVC8Du1DzkE0KGsxeh8yEjG9hPjc3Zeqv7YwOZivYw31jmuaTzyEKbolItCto9RzdQBAG1xvQDeUKoSpps=; 7:ol0VauHYU5bCIwH+5PUv15TahD24LCJB7bestRAL42ese9VmHAknuvAs8EFD10KzQESLyXXEkvjWp4hLOEqOBYPZeLw65/hcZfqigKOFPWZcaA47wE4QLhANSkpVor2Q7h/wFk3yw2GBmGRdQSn4GpaXp5BAeI3khSn5oc6UutDftb2+OOBnonln7KuclFjUUN31aLCZajMV6tFLyucWNXWdZd/rlfxu1PQfNF7/K/bIK3/HYs+Tg6Fw8BJ2r40n SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:27:39.9105 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf99966c-6020-4bcd-231b-08d5415bbcc8 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 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, 12 Dec 2017 12:27:44 -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 | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 756f90e..5c0f55a 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -193,11 +193,10 @@ struct lcore_queue_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,9 @@ struct lcore_queue_conf { }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, + .offloads = (DEV_TX_OFFLOAD_IPV4_CKSUM | + DEV_TX_OFFLOAD_MULTI_SEGS | + DEV_TX_OFFLOAD_MBUF_FAST_FREE), }, }; @@ -1052,6 +1054,8 @@ struct rte_lpm6_config lpm6_config = { /* initialize all ports */ for (portid = 0; portid < nb_ports; portid++) { + struct rte_eth_rxconf rxq_conf; + /* skip ports that are not enabled */ if ((enabled_port_mask & (1 << portid)) == 0) { printf("\nSkipping disabled port %d\n", portid); @@ -1104,6 +1108,20 @@ struct rte_lpm6_config lpm6_config = { 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.rx_offload_capa & port_conf.rxmode.offloads) != + port_conf.rxmode.offloads) { + printf("Some Rx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + portid, port_conf.rxmode.offloads, + dev_info.rx_offload_capa); + } + if ((dev_info.tx_offload_capa & port_conf.txmode.offloads) != + port_conf.txmode.offloads) { + printf("Some Tx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + portid, port_conf.txmode.offloads, + dev_info.tx_offload_capa); + } ret = rte_eth_dev_configure(portid, 1, (uint16_t)n_tx_queue, &port_conf); if (ret < 0) { @@ -1114,8 +1132,10 @@ struct rte_lpm6_config lpm6_config = { } /* init one RX queue */ + rxq_conf = dev_info.default_rxconf; + rxq_conf.offloads = 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 +1160,8 @@ struct rte_lpm6_config lpm6_config = { fflush(stdout); txconf = &dev_info.default_txconf; - txconf->txq_flags = 0; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf->offloads = port_conf.txmode.offloads; ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd, socket, txconf); -- 1.8.3.1