Content-Type: multipart/mixed; boundary="===============2978678808245211677==" MIME-Version: 1.0 From: martin.belanger at dell.com Subject: [SPDK] How to manage a persistent connection to a discovery controller over TCP from a Host computer Date: Tue, 15 Mar 2022 14:51:13 +0000 Message-ID: <20220315145113.2873.95332@ml01.vlan13.01.org> List-ID: To: spdk@lists.01.org --===============2978678808245211677== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable I'm new to SPDK and I'm trying to figure out how to use it from a host to c= onnect to a Discovery Controller. More precisely, I'm looking at the recent= ly ratified TP8010, which defines the Central Discovery Controller (CDC). M= y goal is to establish a persistent connection to a CDC over TCP, to perfor= m Get Discovery Log Page commands, and monitor for "Discovery Log Page Chan= ged" AENs. I've been reading the documentation and I have a few questions. My first qu= estion is about polling. The documentation mentions that the SPDK driver us= es polling instead of interrupts to avoid the overhead of context switches.= And avoiding context switches results in better performances. I'm curious = about how polling is done. Is polling performed continuously in a tight loo= p without any blocking? In other words, does polling consume 100% CPU? Havi= ng processes that consume large amounts of CPU is not something that I can = afford on my host. Is there a way to operate in interrupt mode instead? Tha= t is, can I use a blocking poll() (or epoll() or select()) on the file desc= riptor associated with the socket connection? My second question is about AENs and how they are handled. AENs, by definit= ion, are asynchronous. What if an AEN is sent while I issue a command? For = example, let's say I issue a Get Discovery Log Page (DLP) command and at th= e very same time the CDC sends an AEN. I was looking at the code and it loo= ks like when one issues a command the SPDK starts polling for the response.= In this case, the SPDK would not get the response to the Get DLP command, = but instead would get an AEN. How is that handled? Is the AEN just discarde= d? --===============2978678808245211677==--