From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50083.outbound.protection.outlook.com [40.107.5.83]) by dpdk.org (Postfix) with ESMTP id 0DAAE1B2BD for ; Tue, 23 Jan 2018 19:43:43 +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=A2X8ukoFl5I0aTdARznbLzPdQXpCU3taZzFG/yzV4+s=; b=xBnaSdBAoDL9qeHQW2M+NlVx7PM0WmtQLBdjcbt/FadpVADJbIS0HEPueixBedaDBcphJT8M+zK8F1hBOG2kZJojxFwnVXkXuzDxOq8wnXcbaXHxJQ6v8gWKc6INB73tJuUUiXzK19ujf8TqIg6mk48xRn9s3bl6IPaZKqs1XlI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=motih@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR05MB3211.eurprd05.prod.outlook.com (2603:10a6:7:36::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Tue, 23 Jan 2018 18:43:40 +0000 From: Moti Haimovsky To: gaetan.rivet@6wind.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, Moti Haimovsky Date: Tue, 23 Jan 2018 20:43:17 +0200 Message-Id: <1516733000-1850-1-git-send-email-motih@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516354344-13495-2-git-send-email-motih@mellanox.com> References: <1516354344-13495-2-git-send-email-motih@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB3PR0202CA0025.eurprd02.prod.outlook.com (2603:10a6:8:1::38) To HE1PR05MB3211.eurprd05.prod.outlook.com (2603:10a6:7:36::33) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f73fc460-86d6-4da1-7367-08d562913969 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:HE1PR05MB3211; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3211; 3:YEgbzDcq8UJLyN690axrXSVFB4Zsbbqejhburt3fJNnQte2rgY7Pm11hvRokdyBWuf8tP/D2ZyKrgrQ2RTIDwdUA8h5Hfj3AgnGY0sReorG/k6sVNigV9ItefbA+NWsbFOUiyWjUIl/KLI8BPavA4vn6Sv5NieCqqPW0jL6i9uFl+XEIQC2coxoMrpJ/62R39vR7OCM00Hw72scCBBEICA/Giq+H8XHwcb2lw4hwoOuitaqfrZGKVxuHg3DAEKVo; 25:NNd4RSjSTXIxPd7DqkeqCZO/GXE7eahQoWd/BPzT81xCfzCjtPUva+WRGworxxaVYroh878OMN81TeGljf14HhoUVRxE61OnarMWKe++r+kNs214RBMmKFFgbyixx2G2mUb4jiNKen7aqGsNfHGCsQ0Au9077cAwkJlgf4ELBXuzBgXzEfL5h7MAI0PjDkuAFPXAOyzrTpgpc8kwg5by/JUQxPGMGuYGWUOmJ+hWDbLYiC1nPNFW/P6QKAoHtmQsU6VoUAGhkANWL8kYg1JnpZI4r9skTWNwXCLqHJQlasRnWRKAEi+r+Q3l7T3WvoVbu6M0BvBDeQY34JjEr4s+PA==; 31:8qxA6ZIj4f4jxL9FQWiACcL74FOSPbHJlbIy587K5ZKjAuFpbQ77SdC/okZ+IF38EVqj3v7nkTT6D9dOfjl0EfI8vSCu7Vt2uok/fKOMAtDX0vzQaZoKKMTxKxzI/0H1URbQcxxBcAVGyKCnjrqMnQng+VG4/ZnzHk0XdkROjPdLs/RwOPz7Vs6lxK+v6t1URQO15d9mhdDVixWHDDyUmjqG1T442C9WT7XsZCYquDI= X-MS-TrafficTypeDiagnostic: HE1PR05MB3211: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3211; 20:ju1CFDSA32rXmuevFjvJSRhzu/ukqHwk994P100KcbQVCYq95E4kz63VYuX3hvNnHEfjLzm3Dfbbs7i1oax0q0sFc3xrZDTCTBFT0aHfuND5ciW6iceY3vUAQrpHJn12Sf9R0sbnZcGnGP2W0dAxsCUx/zWy6c66hHZcAe5aWZJmQgRGsskljPESlR8Uj2L8f9QDXMYYYdlkrDovX4Aafidz455Giaxzo7m6kfiAqMR9skkwQMbS3ti9x5qaK3ZHtkDUbWIFDC0AKTbtS0RgvyuKOxwPCjba9GhHq4ICvBQ3LnYRe/+3qTV3mMO2rK0Y8WiW8MnaEvDmp25Rr+2NTo+Tel4ZgTvi/99wJgsfk7XwhlzdcdkSgzP+owhCLE8cfA6G+t6/xb2d8TkdIno8RPFhPzs7i+BfBAqLXbKWFLM1gm4zqZJKXImHRNJiJfvS1R3Y0yfEA8WW1JWUrj1R3Bp1npmBRfK17Ic1D2Fd0RDqp82NcHSF8r5V6VUdAqIo; 4:t8uZNchicdTxcbATbZTJsgXir0bxOJqdr4jBYzud5DN1mPhplZjs4trcO2RnkknYH5i//sU6sHeiee/adOZOT7AWTnTH1GwwaZJBg79HlOKjwULfHh3oF/LwuCzKNBV+VhU3xGg7bMWO2K/huXkqmjjy6RekrlHV0ngRaRbZitNNxnzD6vc522behMJ7txfzOGGDt0MALeqIdkO1lzwGHYPiL/jVXcSDViFMOPleuN6wxquIzP5LMjaDAzwjGlMtbOxR8QesC2niqMmnSEeAVypIW3Ztax1i9MORYcawxrllJlGCxdOUOJ/2/G61OmPR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041288)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR05MB3211; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR05MB3211; X-Forefront-PRVS: 05610E64EE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(39380400002)(376002)(366004)(396003)(199004)(189003)(7696005)(21086003)(16526018)(52116002)(51416003)(68736007)(3846002)(6116002)(25786009)(76176011)(66066001)(106356001)(86362001)(26005)(55016002)(53936002)(7736002)(386003)(69596002)(316002)(47776003)(59450400001)(97736004)(81166006)(81156014)(4720700003)(8676002)(8936002)(5660300001)(50466002)(105586002)(2950100002)(6666003)(50226002)(305945005)(478600001)(16586007)(2906002)(48376002)(33026002)(107886003)(4326008)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3211; 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; HE1PR05MB3211; 23:AOfUos+ajMw3CLvJkDFHJ3ygh2B8bTo/O0SFfd3lS?= =?us-ascii?Q?bWtfEZYLaVGacrW1wu6w9i/k0VsNek/PnzkN5VryN/KDblXCqIs0PRnS/RcJ?= =?us-ascii?Q?EnYpgj88HfditkY2pOPXSAesext6A7FACKu4TG/ocfeikGzE5LmuNmFCEwyf?= =?us-ascii?Q?thpW56KKPuDiqsEHTQGNp4zewfzBQVtOWtUHFc8WujWMNqP2sJ1jq23GxIpG?= =?us-ascii?Q?dTGq3qkXdyJ2HFBCOjySkXkE2g8UOV1euHuy2qsyuOzH2lNo/TAeJZbaUDSl?= =?us-ascii?Q?BSl9LSlhaXGjuFPt2r63kjs6+PkZ99xz9Ylt5tG4/sAZFOVsROUZBa5JUOXm?= =?us-ascii?Q?q0mBbO3DTu6XXsnsLVgbk+ACH5pd2a+pxaxVoV15nNl2FwDDbKTP0z/nDkuz?= =?us-ascii?Q?/iW9lvfGL3Um9Pfh7pO1wdi6zpfGpgPamM3sF3uelwiClazhadmaM8SFNwgy?= =?us-ascii?Q?i8wecz5lXRT2zjKbPRjiH9HfiR8UDWqglDXO7b7267DltyTSpnH1EPBP58gL?= =?us-ascii?Q?3o99HSHIF7hJtJNrRtNQ2/uQu+n1XLr6qA74liaSEvixxVkuAXyiW3Hd459D?= =?us-ascii?Q?x8MpnP58fi/SC04ZX70q/UoaJDIy5c69W8ng87fe4dM2E7gbw0stJb6ldZx6?= =?us-ascii?Q?K6dvWY1+4OEERo9gIUZyqsXP+6KtlITWzW68M0QgMBC/3ddyPH+2a3Oyy1an?= =?us-ascii?Q?CTUBFlbGdnhLVIhYRXAjcHxldBO0mhVnlIbBVZG7EOxXApMXnc2yxSDtSYmg?= =?us-ascii?Q?bsX9Hsr0YCWIhfxxbWUk10gD6AZPOoRzs7LgPdFA3Hm/R8Td9n3ZttS2qM2P?= =?us-ascii?Q?KmkLq3/SrlMCmButbmWgxNdPk9wQJZVBuYlPY0x7PRrP+oWyddRbx5+ZIAdp?= =?us-ascii?Q?ohevjlZHQlNkUT2yXMQbkwGbpFMk1ctGvpz7lVu87zNMmABraCC3fVLAJMdu?= =?us-ascii?Q?+/J47dfcedi8Fixq1s+c4amtMxCQY6REFwvUbLA6hftNojLrHe0fUIhd/nQR?= =?us-ascii?Q?2YAtzLKzKJLPlg96uYoKTpDRIEAe52CCQAt5XGbj3VCBJ0uyTDAAemso7SlF?= =?us-ascii?Q?SjaBDVvNa1Rnq6WeicZxK8n6PMiAaNg3nIDGBqKC19ekrlKs+iUZBzhklZK9?= =?us-ascii?Q?Y9SIFLKckQL64aPsoPsUUJMYTkNi5GHvUVsx6uzNnafR0si3aG9sUeQVRY+A?= =?us-ascii?Q?h6RVQEnTtqBZ5E=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3211; 6:3Qe1cxRTrHDwzwxsAJUaOVZhkvcruGfioKLH2fXj78PQyJtUqLz72fSbWU6S2/tudsX305MhNMa3Ie4DBpyjBwQh15j9tr2JcDzbIBVbnSbuPiD6JuwkKb7kGO5m6L9SPOXmS8+jPUUy8xcX4mO98kQhj/O2eebPvYCGSnGA6dgOXli4Dw4tT1a9yZd4qLMf2fG6oXFvzOtltOLY41Eie04ndwlk/FNmnD4vfOF5HG7OuN4VmT45w4Md1PkoPIxB5ckDQRQblnqn7B0ziK0u/n63eYwvOrtF6VIYK9YcacYdENNT3cj9UDNptSAxv+JVXg3qwoJBN3XQcouHs6mZHCQu0Oxc5nR9UVkj/CbhaCA=; 5:5k5fsAdJSy/+n91t8nuMHd49ARZQM1HAfN0kFYXdfu4wRH1fi4b5CIZFIypd2kqNOHVW93tKiiczHKMEVnpau61O7G9X/JLCxH5v9UKvpOduqCZAiuRotKlp5vc5WAnAtpwnKJaAPuUm1/SlLc7S5sXwrxs2t7aWYuSmpkdRppc=; 24:wT8bVsS67NDZsLCYcHOfSLLjgVKpFB24MJ87lF/1R90A8v8pfuWLO5jcafkfLJgiTStjv/knQhj6YzJBFuzBIrIg0eONB3LgnPAa7wjejVQ=; 7:ZmtHEfYZHejtxHY73Wk8rk4I+5DBUf46LOCZqVyptZqmwgGlyphWJeQGxvSTPEyjcLnimnx9Eo93l60xXMMjUAln1PGvtN0A6wFyeoiLftHAkkKPvRDQvoorBubcHLgphzttT79YoFuwsBS9hPzhLu+AZC7MPj9eRkN19h7gto3oyVMC7QbddxjSCbjBTuR5agiIU0Y0wr0NvdufoNQUbWqP8EB7x8cG9r6rag2s1UoWY4oavVkAOZM2kurhiQk8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2018 18:43:40.5941 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f73fc460-86d6-4da1-7367-08d562913969 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB3211 Subject: [dpdk-dev] [PATCH v5 0/3] net/failsafe: add Rx interrupts support 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, 23 Jan 2018 18:43:43 -0000 These three patches add support for registering and waiting for Rx interrupts in failsafe PMD. This allows applications to wait for Rx events from the PMD using the DPDK rte_epoll subsystem. The failsafe PMD presents to the application a facade of a single device to be handled by the application while internally it manages several devices on behalf of the application including packets transmission and reception. The Proposed failsafe Rx interrupt scheme follows this approach. The failsafe PMD will present the application with a single set of Rx interrupt vectors representing the failsafe Rx queues, while internally it will serve as an interrupt proxy for its subdevices. will allow applications to wait for Rx traffic from the failsafe PMD by registering and waiting for Rx events from its Rx queues. In order to support this the following is suggested: * Every Rx queue in the failsafe (virtual) device will be assigned * a Linux event file descriptor (efd) and an enable_interrupts flag. * The failsafe PMD will fill in its rte_intr_handle structure with the Rx efds assigned previously and register them with the EAL. * The failsafe driver will create a private epoll fd (epfd) and * will allocate enough space to handle all the Rx events from all its subdevices. * Acting as an application, for each Rx queue in each active subdevice the failsafe will: o Register the Rx queue with the EAL. o Pass the EAL the failsafe private epoll fd as the epfd to register the Rx queue event on. o Pass the EAL, as a parameter, the pointer to the failsafe Rx queue that handles this Rx queue. o Using the DPDK service callbacks, the failsafe PMD will launch an Rx proxy service that will Wait on the epoll fd for Rx events from the sub-devices. o For each Rx event received the proxy service will - Retrieve the pointer to failsafe Rx queue that handles this subdevice Rx queue from the user info returned by the EAL. - Trigger a failsafe Rx event on that queue by writing to the event fd unless interrupts are disabled for that queue. * The failsafe pmd will also implement the rx_queue_intr_enable * and rx_queue_intr_disable routines that will enable and disable Rx interrupts respectively on both on the failsafe and its subdevices. Moti Haimovsky (3): net/failsafe: regiter as an Rx interrupt mode PMD net/failsafe: slaves Rx interrupts registration net/failsafe: add Rx interrupts --- V5: Modified code and split the patch into three patches in accordance to inputs from Gaetan Rivet in reply to 1516354344-13495-2-git-send-email-motih@mellanox.com V4: Fixed merge conflicts found during integration with other failsafe patches (See cover letter). V3: Fixed build failures in FreeBSD10.3_64 V2: Modifications according to inputs from Stephen Hemminger: * Removed unneeded (void *) casting. Fixed coding style warning. --- doc/guides/nics/features/failsafe.ini | 1 + drivers/net/failsafe/Makefile | 1 + drivers/net/failsafe/failsafe.c | 4 + drivers/net/failsafe/failsafe_ether.c | 1 + drivers/net/failsafe/failsafe_intr.c | 492 ++++++++++++++++++++++++++++++++ drivers/net/failsafe/failsafe_ops.c | 102 +++++++ drivers/net/failsafe/failsafe_private.h | 40 +++ 7 files changed, 641 insertions(+) create mode 100644 drivers/net/failsafe/failsafe_intr.c -- 1.8.3.1