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 B6604376C 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=/KITgclRzPjqSnuin3opBcVzOtd++X3cNuUTZovEkIw=; b=Dwv46sHa6C1ox9SaJ3goeKpZhl/0im3qPGtv7I5r4VSB+LfyE1vH78CCRAMmE3kfl2vQmZ6bBH8cg51QtqxrJRldcZEK0oGyaBpSjk4v49Vn3kPKdbNXSIr7cW1sOcHwgYTpwXxsTeyYR7pxkduId2i9mfWEjOnGQfGgW02Y7WA= 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:29 +0300 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: 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: 9f7369e1-1718-4ca0-00cf-08d4dd82b878 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:NL7C9GS5cfkRdNTjrpARbQfJSyhM0c+CrJNNxTNY0Tg0IOkXFGQsARdkWqWVZMoeruYA1zQNNuCdE+wEO6Zk4KaYEOLrMjJUNv+zQRU9bBTOXHEo0732RVoW99b9cz8bFBtiGqCXo1QLytUbbW3rKJrkbbQNdAGJ3BK6aYAyPuKe8tAVFbmNnJRat9MCuUPygwrfYttTPdX/TWtTegFZgoOo5Bow3oMTNbqsNbczw8PL7FCm+fNDSedlpVON2k6T; 25:Y4+AroxNC/4se8vMpHKDLoOkV6Fyxuv17+i2IVdfX164GkxDmmhXmGkMpxvhE9HfhbXYqtDvHdSeaMk5i/vAdksL5IBfmEIhPZ3hdfYGUFOglKWMgMxTLg2SvV51z5A1AugfneYcwAUvyQ0LQQSy97VxW1IeSYV0drUA9p88NpnT+nEIYGFntSilleprQT7gc5YGHprNaT50zsmIyZ1NqaymySkqRocQammxba4hicD9O6JGL8y4OpQ70GqE/JYjV/6C2CjEGbgM0k9+gDZ/ewIN9LYFD0lDRXwxbywDQi01bVpsScHrEDAM3tp2MxglTGq14+IZb2B8WJLTkZPtdg==; 31:e2Mv6UmQXSrzvG+77XI/yG8kl+VtfcNWpTEl7O8rB7m9UuLSo6WakekhP1p5jO96DZWAIUJpqPq0wETtr3Oaf/s+Q/wbJn4us7XgtrXM/E2dlRXyRCTJkt2X3ZowhQxhI+iXDiLuOORvbSaceIJnztAVKrrOiVChDm9dWEGQB/iJaeWbS5Fsw+ZRuQKft2iKMhbd3BRbNMzvSwOLY3KmXZl8F+v6BoMnPKZhy9h07dI= X-MS-TrafficTypeDiagnostic: VI1PR05MB3151: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 20:xHbA+cBNP8NUNbHcrQ8ZWyJjDYOGSYX6My9OuwzdqhuKyPzsSRcASNGTCuDEha2K+isV5moNg38EMT/jy50OZs/xpLB+bsoG5Ln7UhSycB2urvf/0Y2hYhDll8q/MkXZpK1LBMw4s3EtyoQTd+MzsYO60tBIrmvqzjx5Rja+Hw2xAQ43x2ESQLSQq+rF7tMyoB9OIClRHGEEto7Qob7hTLt7UICeHaenUZTNrvL05QbNcSwHSK0xn4tohraARVpu61DOA8itB8fMGrq/4gakBQJmuzBdC7QBVfOU0CshQmoqx+DNSa2axcnfk/B/vgv67zA54dlGgjTbtAfs58RNMJj4y1V30uaDpvdU9Z2/GMcWiRmSO80O3zNwGYVuY4h9cOwjv4NNYMlVsezo9sQZ4b8Ll+e3dnQD7vMhp1jX+qk5ZSYiOysvCH+/LYwTSAbxnMcmDl+Sd1UfgxlUXMFoNEcth9pnBQNiRLLSC4plP4ylCJodCq+PkhTrcUuNBqF/; 4:Rp4xJEV739wL5xkKSNRiMEIGf8YyAFRvhjWHMqJGvUgt1WKCUdVilYOU9aouln7IRczcpqNrrZSfIlfu/uvG9mZS7ufd+u+lFXT8Gkg2+HTTtxS2+vBeB0x89ILI/SOp8FkCuhBejM6LHxOOVbKE5oQimvH3DWLhCcOsbALobVVyF8VTjHq4pzyJVmTw8e2Xsi/RrX2PwpnCNVrqxQpVEVDmKoH0guKncvtTD3vCmn7pq7FZK/bAGQ9XCj1TPoq9 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:mZS8TOMiWK8fnAp3ezs78q04oNCw7Bz/M6ct4RU7G?= =?us-ascii?Q?IXE0HaimA8BAqo1FAq3GjOhu85pgSLHAHYb8EMvdQGwWvDffJtDP9pSWf3ob?= =?us-ascii?Q?z7NJShx35oS/i5yG+XW3dam7DIH2BIWOJipNEXmCfnbhiFv1lyvO4n8KRib0?= =?us-ascii?Q?Ffnf61qnjlHGgvfFh91JXKJZd3BEfnaV71WxF/WQq/0oNtFCzdge8O52ETBL?= =?us-ascii?Q?9YBZ0t6ASu1R1vWI69e8cUpZsvDesoH+1/qlJU+ThyVP1lxajLZzzgspcGQQ?= =?us-ascii?Q?CpnSMCIDZOrPQQ5P8C7YmvE6tea+4xQffem4yQZK3WgTOUTuKfppNdcavtnh?= =?us-ascii?Q?gzDBWC2Cg5eQuxsfOZFLm2M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put: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2017 10:54:47.3473 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Subject: [dpdk-dev] [RFC PATCH 2/4] ethdev: introduce Rx 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 Rx offloads. The new API will re-use existing DEV_RX_OFFLOAD_* flags to enable the different offloads. This will ease the process of adding a new Rx offloads, as no ABI breakage is involved. In addition, the offload configuration can be done per queue, instead of per port. The Rx queue offload API can be used only with devices which advertize the RTE_ETH_DEV_RXQ_OFFLOAD capability. The old Rx 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 | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index f7a44578c..ce33c61c4 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -357,7 +357,14 @@ struct rte_eth_rxmode { jumbo_frame : 1, /**< Jumbo Frame Receipt enable. */ hw_strip_crc : 1, /**< Enable CRC stripping by hardware. */ enable_scatter : 1, /**< Enable scatter packets rx handler */ - enable_lro : 1; /**< Enable LRO */ + enable_lro : 1, /**< Enable LRO */ + ignore : 1; + /** + * When set the rxmode offloads should be ignored, + * instead the Rx offloads will be set on rte_eth_rxq_conf. + * This bit is temporary till rxmode Rx offloads API will + * be deprecated. + */ }; /** @@ -691,6 +698,12 @@ struct rte_eth_rxq_conf { uint16_t rx_free_thresh; /**< Drives the freeing of RX descriptors. */ uint8_t rx_drop_en; /**< Drop packets if no descriptors are available. */ uint8_t rx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */ + uint64_t offloads; + /** + * Enable Rx offloads using DEV_RX_OFFLOAD_* flags. + * Supported only for devices which advertize the + * RTE_ETH_DEV_RXQ_OFFLOAD capability. + */ }; #define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=1 for all mbufs */ @@ -907,6 +920,19 @@ struct rte_eth_conf { #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020 #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040 #define DEV_RX_OFFLOAD_MACSEC_STRIP 0x00000080 +#define DEV_RX_OFFLOAD_HEADER_SPLIT 0x00000100 +#define DEV_RX_OFFLOAD_VLAN_FILTER 0x00000200 +#define DEV_RX_OFFLOAD_VLAN_EXTEND 0x00000400 +#define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800 +#define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000 +#define DEV_RX_OFFLOAD_SCATTER 0x00002000 +#define DEV_RX_OFFLOAD_LRO 0x00004000 +#define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ + DEV_RX_OFFLOAD_UDP_CKSUM | \ + DEV_RX_OFFLOAD_TCP_CKSUM) +#define DEV_RX_OFFLOAD_VLAN (DEV_RX_OFFLOAD_VLAN_STRIP | \ + DEV_RX_OFFLOAD_VLAN_FILTER | \ + DEV_RX_OFFLOAD_VLAN_EXTEND) /** * TX offload capabilities of a device. @@ -1723,6 +1749,8 @@ struct rte_eth_dev_data { #define RTE_ETH_DEV_BONDED_SLAVE 0x0004 /** Device supports device removal interrupt */ #define RTE_ETH_DEV_INTR_RMV 0x0008 +/** Device supports the rte_eth_rxq_conf offloads API */ +#define RTE_ETH_DEV_RXQ_OFFLOAD 0x0010 /** * @internal -- 2.12.0