From patchwork Tue Apr 3 08:19:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Mattias_R=C3=B6nnblom?= X-Patchwork-Id: 36910 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB97A1B674; Tue, 3 Apr 2018 10:19:46 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by dpdk.org (Postfix) with ESMTP id 73AEC1B673 for ; Tue, 3 Apr 2018 10:19:45 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 3E3B740036 for ; Tue, 3 Apr 2018 10:19:44 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 2B98640033; Tue, 3 Apr 2018 10:19:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.1 X-Spam-Score: -1.0 Received: from isengard.friendlyfire.se (m176-71-126-62.cust.tele2.se [176.71.126.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 4B8A740032; Tue, 3 Apr 2018 10:19:42 +0200 (CEST) From: =?utf-8?q?Mattias_R=C3=B6nnblom?= To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, =?utf-8?q?Mattias_R=C3=B6nnblom?= , bruce.richardson@intel.com Date: Tue, 3 Apr 2018 10:19:03 +0200 Message-Id: <1522743543-7974-1-git-send-email-hofors@lysator.liu.se> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522228611-4838-1-git-send-email-hofors@lysator.liu.se> References: <1522228611-4838-1-git-send-email-hofors@lysator.liu.se> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] eventdev: fix incorrect MP/MC tail updates in rte_event_ring 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_event_ring enqueue and dequeue tail updates were hardcoded for a SC/SP configuration. Fixes: dc39e2f359b5 ("eventdev: add ring structure for events") Cc: bruce.richardson@intel.com Signed-off-by: Mattias Rönnblom v2: * Fixed issue with update_tail() parameter order. Acked-by: Bruce Richardson --- lib/librte_eventdev/rte_event_ring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eventdev/rte_event_ring.h b/lib/librte_eventdev/rte_event_ring.h index 29d4228..827a320 100644 --- a/lib/librte_eventdev/rte_event_ring.h +++ b/lib/librte_eventdev/rte_event_ring.h @@ -99,7 +99,7 @@ rte_event_ring_enqueue_burst(struct rte_event_ring *r, ENQUEUE_PTRS(&r->r, &r[1], prod_head, events, n, struct rte_event); - update_tail(&r->r.prod, prod_head, prod_next, 1, 1); + update_tail(&r->r.prod, prod_head, prod_next, r->r.prod.single, 1); end: if (free_space != NULL) *free_space = free_entries - n; @@ -140,7 +140,7 @@ rte_event_ring_dequeue_burst(struct rte_event_ring *r, DEQUEUE_PTRS(&r->r, &r[1], cons_head, events, n, struct rte_event); - update_tail(&r->r.cons, cons_head, cons_next, 1, 0); + update_tail(&r->r.cons, cons_head, cons_next, r->r.cons.single, 0); end: if (available != NULL)