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 E3D50325A for ; Mon, 7 Aug 2017 12:54:48 +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=QbKqEhM6UmM/RP9GGj8WxQ9CGFe7tweHjWBaQSFfjF0=; b=vi/flWKVnpu/A/63KK5bylD8TNJKIABibh4sLQc6+4oVIexQQ0RT8nwXxUiBbRiHNEUNuUmlgyR5DArBtyaIW7GV5UhBypF6s1we2vHMDbgjBkFIsvbH7I0EuCtZqEDcSkAg5Bj8KaegD1mpZ5qeP0zGAV/NlmicrE/EOHIAMd8= 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:47 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Mon, 7 Aug 2017 13:54:30 +0300 Message-Id: <8b07fcae6061fb3ca0baa7914a10e74b1a69a0a7.1502096064.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: 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: 838ac750-cab2-4b16-2410-08d4dd82b8dc 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:zEl2I5Fx/IPFaIhwnx9t0YNK8TN9dLyJZIXAkgssfk4S9OXz58zoK3abwKShet6AHeMF5AWW3URhSsIzuz4Wwrlh9xMbn1X5o/VwwUrwCO26W3kboFS3xu0/7gIC7jDmDUqZDgXAKYTURRCk/bhdu3HwyiAESW6w0W2xBMU8QfYNJn7c5Wgt8Vloqs9nafbvXoHM19JJgB1X3ba2FpE2wqV8Ask2frjrcJF4h1EZNalMV/6vhfkk3ml+tLixIhga; 25:+/uNx+PONvsEmuGBr2SdblCQfsWCwl6k4uoru8bpQPN10dwpAfgjnuOInWOM835FXDAEB3GUjc2dB146F9fK4+uWPM0WSX9KsMyOnptLvptyOxhiWc9gqd2XoAaZR2aFuAT2OJhtT1jB1FOzlc7yBomV5cyWOFSeN8xMWbAoNOwpQybpmV+eGsFpDiiya6R0xHlVcg/bx/hF6E851cjMOSg+lOdgRv09W+6ksnIPmaU2oLmc2pj7nF8qnm07RR7Ug+VgWwvgxJ0B9hdUXBWzaDHZzyIvVfD8Goyf6YaEc+lpTy9AFfwzaSmfJjFypu/L0aApmSDQJwyJQt31gyiCgQ==; 31:IWPxop3EX4Cf8KGbitJ0u2xgFTyJfsFgKIgIttCA0gcPEy3cz1EbFuOjkoETP3PgHjlDY2l/ErccdpV2fCqRxnR79qXZSL+BMR61jDdiVUxurFh+t61jbMIarKeipNvNJcoW982vzqtir4OXzSBrLFsanlcOMXfR2364m4pu96lNDlw+Zo4qPQmFCd04smQYWIiYLk1uQp2AVxeEPlrhanlMEorG04LLxeRLOgULmkU= X-MS-TrafficTypeDiagnostic: VI1PR05MB3151: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 20:Y2z52EV4ibwh1VAA6EHghQTpClV0DaMX1yI2XTckVoYyKj4qWqQqWl1E7OaiSNlYuLCl1vnOIMKEWi+DsdQ0ezX/NMTGcPi+3SqJCDg4oi0WzdQGjThDz3j2+Hzx4bGEgzdwhe06mPVeUAWkStVk90DLIti4ompJ2CpLL8zFcuhciUCI755uoHAxwHIgUHx1ODvY9znjvjUD8489OjsRMCQR55K9VQoJVGZmp9uqE4aqtrFcH7sYOvVqG7v6s4VcCLljkWyobFKJpcLWXwXjcUHWD6TwUx+ngDmG/QWMGTjHLHKmS9kOXdtIOqJ+Zz1a3fkuDJ8M3Uff631Su6f4MEP5QeeN6ddDFdMwEEDWzJpPpEeICCbPWhk+LA6I8Hf6e34BbKoHCKjc0qgrbVJmyPoO+OXl6tzltqSeXpoxuBacU78itz8udhNjGnSwwQd+t7b8+iX+ARYHsxT/i6ztr/kWbGASwMK8SlyK5knUcFwF9sxQSsjb3ud7EX+deWiP; 4:ac8aLP056hdVuM6E8mTjGsXw7/UtgjgBMVeqU4gC0/dviFoALUJT6z3dhh1gvHQY4XQ64AlxzQCGYzUGh3kZCoG14yx6rvXHH5yr9mO7GusJbjFBkhHj+bRU4h80YzFBMQKxJaH/05A+j9gQemQAPXB3v6dNXZAAjlHKL5GsF/NDcTsRmC8ML/EH2Rjx4O6lwasM4SN8gPhj2EHSl+St1iY6ZoxqROeO9Tzfd9X0jLQSiGz0YM0qdbmELpshfXhX X-Exchange-Antispam-Report-Test: UriScan:; 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)(76176999)(50226002)(3846002)(42186005)(48376002)(50466002)(6666003)(478600001)(118296001)(53936002)(2361001)(7350300001)(25786009)(6916009)(2906002)(33026002)(68736007)(81166006)(2351001)(36756003)(5003940100001)(38730400002)(81156014)(21086003)(55016002)(2950100002)(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:pHpf4ZGMedTcOAiDubsf6e8eGtYNvtG8n9MoxdBzl?= =?us-ascii?Q?l+pWdT07DWFUnQ7LT89lzBUhP/W2ywBkvanNV707j1hlpEYwSo0sTS+8EQ6Z?= =?us-ascii?Q?Xx1Xsa7c4ax5XcUQ4T65n3SJfh+XdE4RBUJpXUj9oP5VIly95leUiRZg+ZKb?= =?us-ascii?Q?KZaZ5MHr4MNPGvjXi/PIEohDnCaIdrMYDEkTTgeBOk23JB6uwBtkLfnYjs5x?= =?us-ascii?Q?IPV81EBE/MOACW755H2FwSh+DkYJKdFYuYn9MC8nazG2T6D9pcuSlfntcW22?= =?us-ascii?Q?YvuA+nQ9vWHhq/Vp86z6bGtBM/Ck2dn6spMiYc3+K97OdioJ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wyAyoPbM2wZyHdDoFp5GAyFKf0Q5N6UpOnf4mWCQyv1XPc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2017 10:54:47.9879 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Subject: [dpdk-dev] [RFC PATCH 3/4] ethdev: introduce Tx queue 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:49 -0000 Introduce a new API to configure Tx offloads. The new API will re-use existing DEV_TX_OFFLOAD_* flags to enable the different offloads. This will ease the process of adding a new Tx offloads, as no ABI breakage is involved. In addition, the Tx offloads will be disabled by default and be enabled per application needs. This will much simplify PMD management of the different offloads. The new API does not have an equivalent for the below, benchmark specific, flags: ETH_TXQ_FLAGS_NOREFCOUNT ETH_TXQ_FLAGS_NOMULTMEMP The Tx queue offload API can be used only with devices which advertize the RTE_ETH_DEV_TXQ_OFFLOAD capability. The old Tx offloads API is kept for the meanwhile, in order to enable a smooth transition for PMDs and application to the new API. Signed-off-by: Shahaf Shuler --- lib/librte_ether/rte_ethdev.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index ce33c61c4..fd17ee81e 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -719,6 +719,14 @@ struct rte_eth_rxq_conf { #define ETH_TXQ_FLAGS_NOXSUMS \ (ETH_TXQ_FLAGS_NOXSUMSCTP | ETH_TXQ_FLAGS_NOXSUMUDP | \ ETH_TXQ_FLAGS_NOXSUMTCP) +#define ETH_TXQ_FLAGS_IGNORE 0x8000 + /** + * When set the txq_flags should be ignored, + * instead the Tx offloads will be set on offloads field + * located on rte_eth_txq_conf struct. + * This flag is temporary till the rte_eth_txq_conf.txq_flags + * API will be deprecated. + */ /** * A structure used to configure a TX ring of an Ethernet port. */ @@ -730,6 +738,12 @@ struct rte_eth_txq_conf { uint32_t txq_flags; /**< Set flags for the Tx queue */ uint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */ + uint64_t offloads; + /** + * Enable Tx offloads using DEV_TX_OFFLOAD_* flags. + * Supported only for devices which advertize the + * RTE_ETH_DEV_TXQ_OFFLOAD capability. + */ }; /** @@ -955,6 +969,8 @@ struct rte_eth_conf { /**< Multiple threads can invoke rte_eth_tx_burst() concurrently on the same * tx queue without SW lock. */ +#define DEV_TX_OFFLOAD_MULTI_SEGS 0x00008000 +/**< multi segment send is supported. */ struct rte_pci_device; @@ -1751,6 +1767,8 @@ struct rte_eth_dev_data { #define RTE_ETH_DEV_INTR_RMV 0x0008 /** Device supports the rte_eth_rxq_conf offloads API */ #define RTE_ETH_DEV_RXQ_OFFLOAD 0x0010 +/** Device supports the rte_eth_txq_conf offloads API */ +#define RTE_ETH_DEV_TXQ_OFFLOAD 0x0020 /** * @internal -- 2.12.0