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 2E5ECA0524 for ; Fri, 5 Feb 2021 12:30:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20AB340682; Fri, 5 Feb 2021 12:30:15 +0100 (CET) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id B04F440682 for ; Fri, 5 Feb 2021 12:30:12 +0100 (CET) Received: by mail-wm1-f52.google.com with SMTP id j11so5732795wmi.3 for ; Fri, 05 Feb 2021 03:30:12 -0800 (PST) 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=QXJU+VZEaTnq+73Rcj5Ch2UsM76IGsrArBXiU6PE9cc=; b=CFHBs9v90nd0WdJZdcephSClDRGQX+4chzK13FAFfTtdbhK24LQvdIn5Sg2qfFu9Bn UdVzNHLJWFwDz69OejpDIMF3IwEszXvk25O2BmqyrMc8pr2FvKu/bUHYxKWwCnTf8foF p3tIB//gvoxICfgI5G6kXg0br3zaun5eCovh0OZmhfe3LDVsehbE4YFbkSclZo2twaMH KJUIvHsYMMk9OegBkhfZkoCG6BDsFGOSrT0L54YwZ695xNs6sWeqMbcfp6NysIB/Aatm bYRnRsjF5pX7tsuJzyLCEb+ppoQ5C6SRbfIZSG3wM1eviLZ3VCTw63SQ6gMDZR84eL5+ btBQ== 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=QXJU+VZEaTnq+73Rcj5Ch2UsM76IGsrArBXiU6PE9cc=; b=eSxCNexynmroS+Z84eJTOyTHWMRzzfySglz/fdIyg6TtFHb9a95hr1DqGnyv5FcRRk GsZlqcTC8WX6CK1fDSnvG9E3T2iiMue5xqo8wS/eE3M0FwwFwvNjRao+/ZovnzHr4Av/ awFujaNu6ju+dEqaJNmcm7m3RR4+tJL0BmhqwezO2te1vR6drL8rJ13a2nqh+lEzsfZ9 FFp0NiO0fYgmK+aqf8qi96qxNG5ku7D0SoGkyU3jVgPlBRkVWWowe+hfQmQFDk4MSl9o qGtz8ddtPKYeeJJwF3S4doi/8xejCDjLC0zLDa1nPu/cogUmLwphLTLQ6IlB9zxN5x5r 30ew== X-Gm-Message-State: AOAM531INqcFjH35yggjghHYFSwW6zwWDFVNlp1IfI9rK2N3Sp2PMro2 bYKakD00d7+Xa33YwjItoSIpDhtDkA3KIZzB X-Google-Smtp-Source: ABdhPJz37DQnpvo2HPuNTyw5sYH7Mb0WB1BfDXOT1NZ0i3FzH/Nmsu0V4pP4rSxqkEzWCOFC7L1EbA== X-Received: by 2002:a1c:7409:: with SMTP id p9mr3160645wmc.95.1612524612696; Fri, 05 Feb 2021 03:30:12 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3]) by smtp.gmail.com with ESMTPSA id d30sm13521544wrc.92.2021.02.05.03.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:30:12 -0800 (PST) From: luca.boccassi@gmail.com To: Ruifeng Wang Cc: Jerin Jacob , dpdk stable Date: Fri, 5 Feb 2021 11:16:22 +0000 Message-Id: <20210205111920.1272063-96-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/octeontx: fix build with SVE' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. 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. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/450da6bd01601534cdb350a8c1050e2653eccbba Thanks. Luca Boccassi --- >From 450da6bd01601534cdb350a8c1050e2653eccbba Mon Sep 17 00:00:00 2001 From: Ruifeng Wang Date: Tue, 12 Jan 2021 02:57:06 +0000 Subject: [PATCH] net/octeontx: fix build with SVE [ upstream commit e88bd4746737a1ca464b866d29f20ff5a739cd3f ] Building with gcc 10.2 with SVE extension enabled got error: {standard input}: Assembler messages: {standard input}:91: Error: selected processor does not support `addvl x4,x8,#-1' {standard input}:95: Error: selected processor does not support `ptrue p1.d,all' {standard input}:135: Error: selected processor does not support `whilelo p2.d,xzr,x5' {standard input}:137: Error: selected processor does not support `decb x1' This is because inline assembly code explicitly resets cpu model to not have SVE support. Thus SVE instructions generated by compiler auto vectorization got rejected by assembler. Added SVE to the cpu model specified by inline assembly for SVE support. Not replacing the inline assembly with C atomics because the driver relies on specific LSE instruction to interface to co-processor [1]. Fixes: f0c7bb1bf778 ("net/octeontx/base: add octeontx IO operations") [1] https://mails.dpdk.org/archives/dev/2021-January/196092.html Signed-off-by: Ruifeng Wang Reviewed-by: Jerin Jacob --- drivers/net/octeontx/base/octeontx_io.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/octeontx/base/octeontx_io.h b/drivers/net/octeontx/base/octeontx_io.h index 04b9ce1910..d0b9cfbc67 100644 --- a/drivers/net/octeontx/base/octeontx_io.h +++ b/drivers/net/octeontx/base/octeontx_io.h @@ -52,6 +52,11 @@ do { \ #endif #if defined(RTE_ARCH_ARM64) +#if defined(__ARM_FEATURE_SVE) +#define __LSE_PREAMBLE " .cpu generic+lse+sve\n" +#else +#define __LSE_PREAMBLE " .cpu generic+lse\n" +#endif /** * Perform an atomic fetch-and-add operation. */ @@ -61,7 +66,7 @@ octeontx_reg_ldadd_u64(void *addr, int64_t off) uint64_t old_val; __asm__ volatile( - " .cpu generic+lse\n" + __LSE_PREAMBLE " ldadd %1, %0, [%2]\n" : "=r" (old_val) : "r" (off), "r" (addr) : "memory"); @@ -98,12 +103,13 @@ octeontx_reg_lmtst(void *lmtline_va, void *ioreg_va, const uint64_t cmdbuf[], /* LDEOR initiates atomic transfer to I/O device */ __asm__ volatile( - " .cpu generic+lse\n" + __LSE_PREAMBLE " ldeor xzr, %0, [%1]\n" : "=r" (result) : "r" (ioreg_va) : "memory"); } while (!result); } +#undef __LSE_PREAMBLE #else static inline uint64_t -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:33.578075743 +0000 +++ 0096-net-octeontx-fix-build-with-SVE.patch 2021-02-05 11:18:28.946693778 +0000 @@ -1 +1 @@ -From e88bd4746737a1ca464b866d29f20ff5a739cd3f Mon Sep 17 00:00:00 2001 +From 450da6bd01601534cdb350a8c1050e2653eccbba Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e88bd4746737a1ca464b866d29f20ff5a739cd3f ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org