From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06DA3A0518 for ; Fri, 24 Jul 2020 14:00:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F21981BFE7; Fri, 24 Jul 2020 14:00:55 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by dpdk.org (Postfix) with ESMTP id C63C31BFE7 for ; Fri, 24 Jul 2020 14:00:54 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 184so8041473wmb.0 for ; Fri, 24 Jul 2020 05:00:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ofOfruwHt77n5vr/A41VC1P9tK5KtrE+AkRo7wCcZrU=; b=iUM4lsajy3SlnHMUoEbdIn1KlcKbSvQtuPLhEpOz3kdw1OcP9S796RGO3ozHaS3Vpf 7D8yomPQhY2vo5+PQvVkWkOoTXOYU9VeLcfKhlILaHYGqPFg+sb5zjcU9/0WjKv9hHhH InJvNRosBK1U8JqIVTJOTzHk8T98Wg9dMhuwpAH+abbtPA/VP1oEfX2UEyGafR+7UOMa Ru10llkGL2fXaAyeujLj1y3LgEqREcLeufQopv8ty3Iij25s7sp5ecCizZ69dzh6RWpY 2EK9U6dr91KAldwIkAj/GO7BRGHDzxgryNtPg7q56f/nsK9GeMzRxm89iHruT2sD+L5t SN8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ofOfruwHt77n5vr/A41VC1P9tK5KtrE+AkRo7wCcZrU=; b=PKAw94QnZHLO10qebbb0FKYWIGmnuzVetnX7nDrc1RnsKjMYNe6qppCwE1pvG1tOjM j/Jv3B2yxP+ShVJ5XxGA9Xyll7dd9BxbJUe/YZKs+dKAbcHWMY2DDQtGolLTzRDF90/R 7QQY2hwz5zGAqqFCLAvm9V+Fp9jnCtJ/9XQUikL9/kAk7sa48WNL2+CLUiQ/k3LLzc8E eA6tPbn//AK45B9xL9x2/1xGJ8UfwiNBC8e71NaKqvRuqSyBo1/ArZXEn917alEY4LOi yRykIIJueca7arPfg1S6+PNGlK6DHFLAEGeQhXJRriIYam0lTTsjDoQaSPB7AqMq/QeI swMg== X-Gm-Message-State: AOAM5316NdkeEe8NpMsFJ9HTBj+qo1oX7c9fOfpVORgIroUBBfWZ6GV9 LARHdIRZwORNdZiOaF3sDMvEpc9inWI= X-Google-Smtp-Source: ABdhPJzEBOand57S04aZbR7efgr57AvDhBZnpMdCJfZfY891YF7LYBfNwvtMttWut6/X2iIfEvQrUQ== X-Received: by 2002:a1c:9e06:: with SMTP id h6mr8026503wme.45.1595592054499; Fri, 24 Jul 2020 05:00:54 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h10sm1048372wro.57.2020.07.24.05.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:00:53 -0700 (PDT) From: luca.boccassi@gmail.com To: Rahul Gupta Cc: Kalesh AP , Ajit Khaparde , Lance Richardson , dpdk stable Date: Fri, 24 Jul 2020 12:57:25 +0100 Message-Id: <20200724120030.1863487-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix performance for Arm' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From e86198b452432b721a760e7c97624cccd1d7a6de Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Fri, 22 May 2020 23:12:09 +0530 Subject: [PATCH] net/bnxt: fix performance for Arm [ upstream commit bfc1d45875e2c21deb11fa44a6ac4bc7035d33c6 ] Eliminate unnecessary rte_smp_wmb() before writing to request/completion doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb() before writing to tx/rx request queue doorbells and use rte_compiler_barrier() before writing to tx/rx completion queue doorbells. Fixes: 4af9d0c72941 ("net/bnxt: cleanup NQ doorbell") Fixes: f8168ca0e690 ("net/bnxt: support thor controller") Signed-off-by: Rahul Gupta Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_cpr.h | 6 +++--- drivers/net/bnxt/bnxt_ring.h | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h index c2880783f..cccd6cdbe 100644 --- a/drivers/net/bnxt/bnxt_cpr.h +++ b/drivers/net/bnxt/bnxt_cpr.h @@ -64,9 +64,9 @@ struct bnxt_db_info; (cons)); \ } while (0) #define B_CP_DIS_DB(cpr, raw_cons) \ - rte_write32((DB_CP_FLAGS | \ - RING_CMP(((cpr)->cp_ring_struct), raw_cons)), \ - ((cpr)->cp_db.doorbell)) + rte_write32_relaxed((DB_CP_FLAGS | \ + RING_CMP(((cpr)->cp_ring_struct), raw_cons)), \ + ((cpr)->cp_db.doorbell)) #define B_CP_DB(cpr, raw_cons, ring_mask) \ rte_write32((DB_CP_FLAGS | \ diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h index 48a39d788..9913aed05 100644 --- a/drivers/net/bnxt/bnxt_ring.h +++ b/drivers/net/bnxt/bnxt_ring.h @@ -82,10 +82,12 @@ void bnxt_free_rxtx_nq_ring(struct bnxt *bp); static inline void bnxt_db_write(struct bnxt_db_info *db, uint32_t idx) { + rte_cio_wmb(); + if (db->db_64) rte_write64_relaxed(db->db_key64 | idx, db->doorbell); else - rte_write32(db->db_key32 | idx, db->doorbell); + rte_write32_relaxed(db->db_key32 | idx, db->doorbell); } /* Ring an NQ doorbell and disable interrupts for the ring. */ @@ -94,10 +96,10 @@ static inline void bnxt_db_nq(struct bnxt_cp_ring_info *cpr) if (unlikely(!cpr->cp_db.db_64)) return; - rte_smp_wmb(); - rte_write64(cpr->cp_db.db_key64 | DBR_TYPE_NQ | - RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons), - cpr->cp_db.doorbell); + rte_cio_wmb(); + rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ | + RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons), + cpr->cp_db.doorbell); } /* Ring an NQ doorbell and enable interrupts for the ring. */ @@ -106,10 +108,10 @@ static inline void bnxt_db_nq_arm(struct bnxt_cp_ring_info *cpr) if (unlikely(!cpr->cp_db.db_64)) return; - rte_smp_wmb(); - rte_write64(cpr->cp_db.db_key64 | DBR_TYPE_NQ_ARM | - RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons), - cpr->cp_db.doorbell); + rte_cio_wmb(); + rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ_ARM | + RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons), + cpr->cp_db.doorbell); } static inline void bnxt_db_cq(struct bnxt_cp_ring_info *cpr) @@ -117,9 +119,9 @@ static inline void bnxt_db_cq(struct bnxt_cp_ring_info *cpr) struct bnxt_db_info *db = &cpr->cp_db; uint32_t idx = RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons); - rte_smp_wmb(); + rte_compiler_barrier(); if (db->db_64) - rte_write64(db->db_key64 | idx, db->doorbell); + rte_write64_relaxed(db->db_key64 | idx, db->doorbell); else B_CP_DIS_DB(cpr, cpr->cp_raw_cons); } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:48.875692444 +0100 +++ 0007-net-bnxt-fix-performance-for-Arm.patch 2020-07-24 12:53:48.155004000 +0100 @@ -1,8 +1,10 @@ -From bfc1d45875e2c21deb11fa44a6ac4bc7035d33c6 Mon Sep 17 00:00:00 2001 +From e86198b452432b721a760e7c97624cccd1d7a6de Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Fri, 22 May 2020 23:12:09 +0530 Subject: [PATCH] net/bnxt: fix performance for Arm +[ upstream commit bfc1d45875e2c21deb11fa44a6ac4bc7035d33c6 ] + Eliminate unnecessary rte_smp_wmb() before writing to request/completion doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb() before writing to tx/rx request queue doorbells and use @@ -11,7 +13,6 @@ Fixes: 4af9d0c72941 ("net/bnxt: cleanup NQ doorbell") Fixes: f8168ca0e690 ("net/bnxt: support thor controller") -Cc: stable@dpdk.org Signed-off-by: Rahul Gupta Signed-off-by: Kalesh AP