From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2018 05:53:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,408,1515484800"; d="scan'208";a="30696246" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by FMSMGA003.fm.intel.com with ESMTP; 01 Mar 2018 05:53:25 -0800 From: Vipin Varghese To: dev@dpdk.org, harry.van.haaren@intel.com Cc: Vipin Varghese Date: Fri, 2 Mar 2018 01:05:00 +0530 Message-Id: <1519932900-10571-2-git-send-email-vipin.varghese@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519932900-10571-1-git-send-email-vipin.varghese@intel.com> References: <1519932900-10571-1-git-send-email-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH 2/2] event/sw: code refractor for sw_refill_pp_buf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 13:53:27 -0000 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