From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5E172A00C5; Tue, 15 Feb 2022 23:20:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D66F41172; Tue, 15 Feb 2022 23:19:46 +0100 (CET) Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by mails.dpdk.org (Postfix) with ESMTP id E53934114A for ; Tue, 15 Feb 2022 23:19:42 +0100 (CET) Received: by mail-il1-f182.google.com with SMTP id k18so86217ils.11 for ; Tue, 15 Feb 2022 14:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atomicrules-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/hRiP9o9mbQtRk3l4tUF+ZtF4o0IMEwj3egbLBXyMoc=; b=WpZZbztnt5B7TngVCw8ptFQZ7y+94z0DUZK8TTYrASxrUTWbjtdEAbIhu4hx1YF/19 DytkBWKs9UhfctcxBpKOxSdMZqKwLuJl4q3mj/G42H6V6iq9Rdk2w24oLtIm8Y2lx/q9 a+J7dbvsbU8oVLacXcPECogmzguDFRsuEUPsMkY1q5oJlSCjQQgypZBB1vaK2PlCZRJC iGmwHPZyMuyotXiH4nvny+VvK0tXfZ0FX7Qq9FqYSdBVlFJ756EkPRoVb+WgkdU28YM5 2Tc5nSwgg4TAPpC08eJrP43Myx38/ANijOGedBT9Qoo4qD/G87eWbkXQfbyMmV8v7vZ4 u3lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/hRiP9o9mbQtRk3l4tUF+ZtF4o0IMEwj3egbLBXyMoc=; b=yaMQEYvjvMtxZjpbCV5Gf73Bia1Pi13ychnaOZ8riyS1/y48Jc/rStH7iWhdq9plRK ZDQLnWDhRHPQp8sQu3OENU/LTBDm5KfH1JbyTq5hEhrcT0LMa/u/YmBtKZyrWOK3Su3B vPxrWk38q9UDUF0RuNDCgP9OFsVblHD10PljwRD5+Jyasp74ZDB83DRrvoL/TN3nWHqD ClMtKOimGVvGPIyH71oDSJi9SyXieCS6POW8bQ1s2z0KpkZJY6V/z+oMAEAIl7NaH4ec v4zk/DrNoKZt2VB+qLSz4tQmYrBV5AN0b2ynVRs+rtPaf9hzA/Pz4LafsnviCWFewzRz rK4w== X-Gm-Message-State: AOAM530QBCPr5vh3RcTeFXkw5fuMfboDDl2cGqlHXwtRZwR43Ki/UcZi Tdaoa9qyCYvq+YiRg4c74Ppi7aWocFV+GQ== X-Google-Smtp-Source: ABdhPJxKkwFIXuLrctaaMDNdEmESNrkrAe3zMCvT87+YzcA4k/3netWf0noCnPLDOsHn717dRUpttg== X-Received: by 2002:a05:6e02:1a41:: with SMTP id u1mr715558ilv.203.1644963581223; Tue, 15 Feb 2022 14:19:41 -0800 (PST) Received: from john-All-Series.tds (h75-100-85-216.cntcnh.broadband.dynamic.tds.net. [75.100.85.216]) by smtp.gmail.com with ESMTPSA id a15sm10758823ilj.21.2022.02.15.14.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 14:19:40 -0800 (PST) From: John Miller To: dev@dpdk.org, ferruh.yigit@intel.com Cc: shepard.siegel@atomicrules.com, John Miller Subject: [PATCH v3 6/7] net/ark: add memory write barriers in critical code paths Date: Tue, 15 Feb 2022 16:19:25 -0600 Message-Id: <20220215221926.409039-6-john.miller@atomicrules.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220215221926.409039-1-john.miller@atomicrules.com> References: <20220119191255.273988-ed.czeck@atomicrules.com> <20220215221926.409039-1-john.miller@atomicrules.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add memory write barriers for read and wait status functions in ddm, udm and mpu. Signed-off-by: John Miller --- drivers/net/ark/ark_ddm.c | 1 + drivers/net/ark/ark_mpu.c | 1 + drivers/net/ark/ark_udm.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c index 2321371572..b16c739d50 100644 --- a/drivers/net/ark/ark_ddm.c +++ b/drivers/net/ark/ark_ddm.c @@ -55,6 +55,7 @@ ark_ddm_stop(struct ark_ddm_t *ddm, const int wait) int cnt = 0; ddm->cfg.command = 2; + rte_wmb(); while (wait && (ddm->cfg.stop_flushed & 0x01) == 0) { if (cnt++ > 1000) return 1; diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c index 8160c1de7b..b8e94b6ed3 100644 --- a/drivers/net/ark/ark_mpu.c +++ b/drivers/net/ark/ark_mpu.c @@ -68,6 +68,7 @@ ark_mpu_reset(struct ark_mpu_t *mpu) int cnt = 0; mpu->cfg.command = MPU_CMD_RESET; + rte_wmb(); while (mpu->cfg.command != MPU_CMD_IDLE) { if (cnt++ > 1000) diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c index 28c4500a2c..cb3cf5c941 100644 --- a/drivers/net/ark/ark_udm.c +++ b/drivers/net/ark/ark_udm.c @@ -34,6 +34,7 @@ ark_udm_stop(struct ark_udm_t *udm, const int wait) int cnt = 0; udm->cfg.command = 2; + rte_wmb(); while (wait && (udm->cfg.stop_flushed & 0x01) == 0) { if (cnt++ > 1000) -- 2.25.1