From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0066.outbound.protection.outlook.com [104.47.1.66]) by dpdk.org (Postfix) with ESMTP id 69EF5325A for ; Mon, 7 Aug 2017 12:54:47 +0200 (CEST) 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=OgO0Swk1Lig8GkOC6sT13TkRcniZZOLq5pcorftrWCY=; b=CHuNoewuvyzMmYI5aj70WPDtXndk6qQrK5I8RV5aaLl/PE9UoVEQ7IftKUZwxR0Tyl7Ims3kD5vTmhx8Zqhg13cQUXzkk4Mrdv8ECiwB9an7QnXogQqyWS+uWsu8/ZNBMPLeW5Cz2/OxfvQQLXlcB0TTW03lEV754ZDHzV0OxDQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1304.22; Mon, 7 Aug 2017 10:54:46 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Mon, 7 Aug 2017 13:54:27 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: AM5PR0701CA0022.eurprd07.prod.outlook.com (2603:10a6:203:51::32) To VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cfb1faf0-e548-4f2d-7efe-08d4dd82b7b4 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR05MB3151; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 3:MB4bcFVSRj2vwJyxnSt58Z7yQ3tPGjGOuUgManG5n58LdxlZHDrhqaGMScgUcMvXmdInCpsMGDNm01PqTot1rZUWLCdnNtJG1DmU/6XbH2WLQy61e1fET/CdeDIH4IgHuE5l9fUibvxRlZcxFhsZZ0yCTHAlGkRavr4t11DOxdZA7BjM1D+NbfUfynpIwVVzBlPRyJIJu3CgSlpVy/309uizPBOld3tMb2P6vm/Awg4c/TZ0eujKOjQ+PKv3i6DQ; 25:5KKQqz+xRo4j4cZ/cCilojJldK7Ck99Tws88dO1gM2w1T+u1r/roxmabceP07RRr7J1NloqG0eevnenMWJiJR3FxBqNKfh5KCydFgbYCMkEl0mBNebgsseh/F3lAfNVsEdZKNpcefUm8ovFDQ+niRC6xX+mRNlizqejJ/+juMpSbgeiOhUNiyD1J8jOdcmivsXqhcbnScaO5TrNszaMEp2tKKunqYXnaCQAbQseWvBDzrUDa86X2lrKA+mDfnz47emE2lwlg1pKGZNZ32LtCbBurrCPPOzxBKH4SFScwtB+9rF8PmPAONkG9rqj1u0YPx4t/A9Pz3+ta7hSOt7RYrw==; 31:hBaTMojS/uDakyvtHjIJ1ztVRmuYqCUBJR/qCrshm8BQ/J/bVfrkiuKfaYdRSHRGrRSJs95qMmgE52K1oSO8QXqx/d8OgDmwPH6hfRQLMOA+U3EGQ00xkXZwGs2nrFXJO7dmpewducqUNCuPEXG1wMgt324w3EvhDYYP0Y4yq+gbInWsf0ue9loke8Dk5VNj00q234H/4siIdq19stkDOx4QjD4+y9F0X8oOBVA05F8= X-MS-TrafficTypeDiagnostic: VI1PR05MB3151: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 20:SCAqY3vW/mxAoAnOMjrqn+++guoWOlty2ls6a18cF1cHon1TqBhMifcys5b/8iZoMsCmMWulnXpIjtIomrugM7L4rXJQISIWTYnzDos0dQeo9XIe2I672ICMaQL2EnFcFUmv8L7xE3HrhZxOq0B3/1D0GCH+cem1xUwBHzX3b55yEpTJfomuJXfxHM8Fz6d4OCgveToGotQcRox4fIqQggVVLOTSJ9rn3wsJNlxwiwbe/zUM7XKfDz/Kl54BuiXgnOS8/WuOD4W8wIcP9UF96dckSzkc3D675abDXJqyuCYZluneCQhYeyY/+403XFatoqkijjEZVKGN7k/iN2Hfn+683LqMIPg2SLv/Kx3wHfyTgWUjG2CWAPItS1NUMAqzyApjGtBfCDYjkf5G+8tSDvBPtxrqJy0t6EtEdJRwpUDr/Y/e+OYQsPv/pRrfC6a9PtgqAI8fNeFkj9qA0s8FnGOCh8P+E8f1kH6TYlqmouz5Oo5eZ1Uspn1Mzabgs4es; 4:oMOtQuOlzSUwAaWpZgS1Xcu2BXHyUUtZQO5+9897eo8rjFkRfjzQLlFX8EQto/OyJcbX4v7jj054SjPnqLJ+v8sUoTNBnHKETeQ6M1jV7wh7zpj/zJ48bYdW3h9BWkyzVj7OzhrpM1IYVjssG+6qedxwqJkuSWRoGGU8NsqLf0B8LxWoL4G5zMF8SUO9F+MBojqbdcO+//GTVBisv/vpzZQ/nT/2CqZepXI022OFrljx3oq6K/lOn7XzagUevs3HFi5R4vValz+7RILT2iuVGAXpZeq23ZD8oqG98Sz+FVw= X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB3151; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB3151; X-Forefront-PRVS: 0392679D18 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39450400003)(39860400002)(39410400002)(39840400002)(39850400002)(39400400002)(199003)(189002)(6116002)(33646002)(50986999)(5660300001)(69596002)(305945005)(86362001)(105586002)(106356001)(8676002)(66066001)(101416001)(97736004)(47776003)(7736002)(50226002)(3846002)(42186005)(48376002)(50466002)(6666003)(478600001)(53936002)(2361001)(7350300001)(25786009)(6916009)(2906002)(33026002)(68736007)(81166006)(2351001)(36756003)(5003940100001)(38730400002)(81156014)(21086003)(55016002)(189998001)(110136004)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3151; 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; VI1PR05MB3151; 23:AzC82/uoV+LXBRg2jJplnASvDXeBqBRDfuRE4Bq9r?= =?us-ascii?Q?dyMLGainkUpXPxGA971CtxOqr/kLdlYGVKm53Ed+nV0WY1xVAXtwsj3nPmb6?= =?us-ascii?Q?wkrQqM/QmWcWky+AN/kUCHMxHIz+QHrWNU1yBJlBo0qPstitJ9PqwG1hyJ3/?= =?us-ascii?Q?h3BgxofmWIbm++mGNBMrhZInu6u5LXaNZMjYlVwQcUCO0akUQFU9JPEYx3nW?= =?us-ascii?Q?i+VbPD6S68nssuiC9aZvuHp7zREKibVQ+oz+WOrsLmCXb/m84XaT7CdcibUS?= =?us-ascii?Q?1Ax07HR/cvee6YBOKJs8jFxRU65Wr46sZa6z8VkTJRADJQv8RVN/5OAxjPce?= =?us-ascii?Q?zcJCpJDyvPvjTxK7t+AH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cr/1fAuniAayGCyLICd1vHzZG8mV9LDy/M3El7VdtX7oj3TSivyzFm?= =?us-ascii?B?Zz09?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 6:ndVeiiJdHJ2HsNSIw5EP6jQ8ruFG/oxyGkN9eAARpuCzXfFc7BtLDcNCHaqmmQAjgHMDbLMt5h+41omuq2TgBPLAIy3GtENzaDP5rkDBNn56NoSLvzekGwaox7xrE8NLyKko4l/8YbR1hMwbY69fpQV5JRNJv29QAtvDVRO6ExcDgxkLIYGi/fkv2HMLvx88F1NQD2MjgnKRTrQDs4v0siGTAeHLJ1G4fb+ybRwVUmNhIZ03HldoUkK0ffQt+GSZcXRBAD0nJtxmMoLJz4F71uccRdrk2E5+gGe7XFd3bU2VAc1D9Ab7pKTs/oo4HHiEpqFMucaIUT/pv/8ChohGFg==; 5:Ovl43fGakGimhYD9pzjaiFwuS7BuEvGdZdRqe7Q0m2yREyovnsvDRlLYyiZdtnK6RLup3ehPtUYJB6cP00/ZMb9m8htGaZjjNxOcr/meOjYNcRWcdrfespxkv3/1vQ3N81DAkvV2sZPK0lROZiw3Qg==; 24:AkNNYr7wy/u6xgAd7JuFKJLKr80vRgcDf5uuGzXUGSesGpvis3mgccoM+WRJKX4ai5kbavdefEhixtqg8wPuiOF9L5Frk4zR8zr3/+SM2oE=; 7:i/bgm7Z7N9cM2nxktaZliOCOnQOMrpkjHYHQ/kC8CnSX190cX6tUJ/HGRND/fXZDRG3qnFw4JB1fzYkbNo86UVXH+5t8B0X0BGZPsTcJZI35sOGllaGspCXsCffBC+aq6RX2b/dYXYYhwd2BeFlqda7jMuE36thVZO6ctiAY13yiWV8YnAZceUU5es/bVRcPUKFQyDldNYSMHotYIJX5M11Jx6RF4trxiBNm4+ehOY0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2017 10:54:46.0503 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Subject: [dpdk-dev] [RFC PATCH 0/4] ethdev new 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: Mon, 07 Aug 2017 10:54:48 -0000 Tx offloads configuration is per queue. Tx offloads are enabled by default, and can be disabled using ETH_TXQ_FLAGS_NO* flags. This behaviour is not consistent with the Rx side where the Rx offloads configuration is per port. Rx offloads are disabled by default and enabled according to bit field in rte_eth_rxmode structure. Moreover, considering more Tx and Rx offloads will be added over time, the cost of managing them all inside the PMD will be tremendous, as the PMD will need to check the matching for the entire offload set for each mbuf it handles. In addition, on the current approach each Rx offload added breaks the ABI compatibility as it requires to add entries to existing bit-fields. The RFC address above issues by defining a new offloads API. With the new API, Tx and Rx offloads configuration is per queue. The offloads are disabled by default. Each offload can be enabled or disabled using the existing DEV_TX_OFFLOADS_* or DEV_RX_OFFLOADS_* flags. Such API will enable to easily add or remove offloads, without breaking the ABI compatibility. The new API does not have an equivalent for the below Tx flags: * ETH_TXQ_FLAGS_NOREFCOUNT * ETH_TXQ_FLAGS_NOMULTMEMP The reason is that those flags are not to manage offloads, rather some guarantee from application on the way it uses mbufs, therefore could not be present as part of DEV_TX_OFFLOADS_*. Such flags are useful only for benchmarks, and therefore provide a non-realistic performance for DPDK customers using simple benchmarks for evaluation. Leveraging the work being done in this series to clean up those flags. In order to provide a smooth transition between the APIs the following actions were taken: * The old offloads API is kept for the meanwhile. * New capabilities were added for PMD to advertize it has moved to the new offloads API. * Helper function which copy from old to new API and vice versa were added to ethdev, enabling the PMD to support only one of the APIs, and the application to move to the new API regardless the underlying device and without extra branching. Shahaf Shuler (4): ethdev: rename Rx and Tx configuration structs ethdev: introduce Rx queue offloads API ethdev: introduce Tx queue offloads API ethdev: add helpers to move to the new offloads API lib/librte_ether/rte_ethdev.c | 144 ++++++++++++++++++++++++++++++++++++- lib/librte_ether/rte_ethdev.h | 72 +++++++++++++++---- 2 files changed, 202 insertions(+), 14 deletions(-) -- 2.12.0