From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vipin Varghese Subject: [PATCH 2/2] event/sw: code refractor for sw_refill_pp_buf Date: Fri, 2 Mar 2018 01:05:00 +0530 Message-ID: <1519932900-10571-2-git-send-email-vipin.varghese@intel.com> References: <1519932900-10571-1-git-send-email-vipin.varghese@intel.com> Cc: Vipin Varghese To: dev@dpdk.org, harry.van.haaren@intel.com Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D4EB45B2C for ; Thu, 1 Mar 2018 14:53:26 +0100 (CET) In-Reply-To: <1519932900-10571-1-git-send-email-vipin.varghese@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Code changes how shadow buffer are filled up in each calls. Refilling the shadow buffer helped in improving 0.2 Mpps. Signed-off-by: Vipin Varghese --- drivers/event/sw/sw_evdev_scheduler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c index 70d1970..a95a22a 100644 --- a/drivers/event/sw/sw_evdev_scheduler.c +++ b/drivers/event/sw/sw_evdev_scheduler.c @@ -451,6 +451,10 @@ __pull_port_lb(struct sw_evdev *sw, uint32_t port_id, int allow_reorder) port->pp_buf_count--; } /* while (avail_qes) */ + /* replensih buffers before next iteration */ + if (port->pp_buf_count == 0) + sw_refill_pp_buf(sw, port); + return pkts_iter; } -- 2.7.4