From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) by dpdk.org (Postfix) with ESMTP id 0EBE8231E for ; Thu, 30 Aug 2018 01:56:53 +0200 (CEST) Received: by mail-it0-f54.google.com with SMTP id p79-v6so267609itp.3 for ; Wed, 29 Aug 2018 16:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0ggRzgKgZA6esc3t8KFcjVO5Mc6O9M6CBflF2ykejn4=; b=jjZn+v+r0TzivB2ZBxVVnUMqalgfQ982LBScLWINHpDv8OfXTd8WLYESUnwZxgJ4vt s+6CeSwjOBNoAdgL/N0+Uufin5kMOTb6sv2ZjY16gP4zErCdKnQRYldxEKe1QteAiDMT ZKMm2y/HZUnY0Njl7aI9z2Wtcb1lhmNCaoo6Y/qk1ItPwO52c2ixqumrkohyX2+IOpad U64gRpLHLVIQY247KDAalB9uxpuoVZHRQLMkaBL6AYEGCo1PRn5p8arM1KAs+9bX1cGf 6mNcjCHe8RkfLPRR3yP5y00GVlNNFKNipTrA5uzLrF9eYUb/05wp8UCRMg/3e//v4SWp XIZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0ggRzgKgZA6esc3t8KFcjVO5Mc6O9M6CBflF2ykejn4=; b=dIfFiX/rUHjtRSLwIGPX8f/aDMJFqPn48jIs3xHKG5NiKhDhelhfuagAgQTC8FS43z J+UbIMmrCxUN3tq2Ss2A5+XTUpAduHSz6slz9f7wTFmo0627YaU+iavyYc6iyMpI/bUu oYW4/7wUuMZXmowSfz4Ao5I/n/W0Co0KgUdjc5wwR5h0sv2wtrYD7lWtwtB3/joK/7FV NejcwTs07WTKo3u0kV0eV/tmA0F6GbMGmN/h8NonszeyOG1qsbtA7SgVpew1Tz0/rFwl 4I635eccqUGriQgp6aihi74W/LqxEyf3YjnX9LzbiH2Pv9jTeBLWmGICVC7Q2YdNGozM sApQ== X-Gm-Message-State: APzg51CtcKiEPqKLDDjh04f6yg+h/Gi/9oxCLH60ZeH+hxrLGiLxSGMn bZyTdCRvhLPBwAcLftMmUd8Nw323b+F51H5b+cOX4f9m X-Google-Smtp-Source: ANB0VdbzIXhT7L35TNT2gMP/dGadyTpep5LGomp9xJsnwemr68MdzvxHbzF3XrSjwVqU7qJYsnPUY817H7rphhZNdxo= X-Received: by 2002:a24:c48a:: with SMTP id v132-v6mr266437itf.72.1535587012019; Wed, 29 Aug 2018 16:56:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:2e54:0:0:0:0:0 with HTTP; Wed, 29 Aug 2018 16:56:51 -0700 (PDT) From: Sungho Hong Date: Wed, 29 Aug 2018 16:56:51 -0700 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Proper way of notifying the application that DPDK received messages X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 23:56:53 -0000 Hello currently, I'am using dpdk by sending and receiving the packets in to the rte-rings. I'am having difficulty of finding the proper way of to notify the application that the DPDK received incoming messages. In order to check the whether the rte_ring has received the data or not, I run a busy loop on the rte_ring. here is the example below while (1) { if (rte_ring_dequeue(rx_ring, &_msg) < 0) { usleep(5); } else { recv_msg = (char *) _msg; if (chara_debug) printf("[%d] Server merge data::[%.24s...]__length::[%ld]\n", batched_packets, recv_msg, strlen(recv_msg)); collect_packets++; if (collect_packets > MERGE_PACKETS) break; } } However, my fellow developers say that this is not a efficient way nor the proper way of checking received messages. Busy polling should be only done in the DPDK API and not in the application. Is there a way for DPDK to send a signal to the application so that the application can only check the rte_ring only when there is a received message?.