From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTX6H-0006n4-8z for qemu-devel@nongnu.org; Wed, 10 Feb 2016 10:54:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTX6C-0001GT-Ko for qemu-devel@nongnu.org; Wed, 10 Feb 2016 10:54:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTX6C-0001CW-86 for qemu-devel@nongnu.org; Wed, 10 Feb 2016 10:54:36 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id AE79E7AE9A for ; Wed, 10 Feb 2016 15:54:33 +0000 (UTC) From: Ladi Prosek Date: Wed, 10 Feb 2016 16:53:21 +0100 Message-Id: <1455119605-31261-1-git-send-email-lprosek@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/4] rng-random: implement request queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, pbonzini@redhat.com, pagupta@redhat.com As suggested by Paolo, I have moved the RngRequest implementation up to the RngBackend parent class and made both child classes use it. Apart from the refactoring, the only functional change compared to v1 is the use of heap instead of stack allocation for the read buffer in rng-random. The parent class takes care of creating new requests and adding them to the queue, as well as removing them from the queue and deleting them. Child classes have access to the raw GSList * to do whatever else they need to do (walk the queue, peek the head of the queue, ..) [PATCH v2 1/4] rng: remove the unused request cancellation code [PATCH v2 2/4] rng: move request queue from RngEgd to RngBackend [PATCH v2 3/4] rng: move request queue cleanup from RngEgd to [PATCH v2 4/4] rng: add request queue support to rng-random