DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Proper way of notifying the application that DPDK received messages
@ 2018-08-29 23:56 Sungho Hong
  2018-08-30  0:44 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Sungho Hong @ 2018-08-29 23:56 UTC (permalink / raw)
  To: users

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?.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-30  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 23:56 [dpdk-users] Proper way of notifying the application that DPDK received messages Sungho Hong
2018-08-30  0:44 ` Stephen Hemminger
2018-08-30  2:02   ` Sungho Hong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).