From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DE8F606A31F for ; Sat, 5 Dec 2026 18:31:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=vLVEIMqe Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0ADE4026C; Sat, 5 Dec 2026 19:31:16 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTPS id 5486F4025A for ; Sat, 5 Dec 2026 19:31:14 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-49d05d51553so13422105e9.2 for ; Sat, 05 Dec 2026 10:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796495474; x=1797100274; darn=dpdk.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Wz8Y2OsJM2uk6rNGOICjm2AxC580WCFEQAwUbKUkmb8=; b=vLVEIMqe/FmsdiUuMi9OiJG5I2bhkPM+z7xAGTdrRmWVQFmx8VJ1HcvLsgF6aM8CBZ VQup0J+41hrwWl0QA40IDj09s5bZeqX215aHriS2PDBltVvnJlskP5aFYVDUCvFzKJUS IXvgD4F5Zv7niax8Il+IM3+g4JOKi7E1WVWynkdv07ZhtO1nRJAt3o1pSvBSZt2nhEdR RYycGv/kCydcYq2OBPNpzXZa7UNOb1KrrqSKvAhlb98e/LKsiiWsl28YGcCtl9DoPbvW kRqQQTO2LvidGbkU1fPMPDSIZeG2z2DI6tVlSvYZozRmZH2awzfXMjql/aUy5O1wUaAt jvlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796495474; x=1797100274; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Wz8Y2OsJM2uk6rNGOICjm2AxC580WCFEQAwUbKUkmb8=; b=dfMygCu8rtPcAyIiJ8LfrpRFWwyB2bRuzIfUIbFKDrFuRMwsY3qbi9wo0iS+0L8tj4 XQOrYZ3iDYsA+tUp05yc3Yqe6PRsrkmMQDK7Kxopz6UBgip+dkJOZsGN2KElxdYna87m yWishNb7mDcO5O0O83u6iYOd7RuhriFPawym/hEPOAgrq+oLln74+1jNdkMtrrIZ3ORv O/XkzjA99M6r0go02aBNapsydrcdBeeNvhfXNu01OW317fMz+ldad1gd6f9NjyYUHt7g KatOfnxNCqUExv3TAJcGbIwm+2Fp3urJgye3YtZDDEoZ/4Ex3kx0VoqztYy+PCaHPXPJ cM0g== X-Forwarded-Encrypted: i=1; AL+hErG7RqOqcZ3yW/dJHgjYWjoMp5MRMXOIJX5GCcR0HN+b1l0XbzrrlxlUxVb9AuWr+BiQYw0=@dpdk.org X-Gm-Message-State: APuU4Z9byo5rf7Uuty3e9GZ9PJP5UXQR6yJUL3VvEUqB8qVjV+rv3wXW 7AaA/J0w2FvaNR0AJ42qzpg7q3f8xjW52LeHb3e3Rkn/KanpN5Uu4oZ5 X-Gm-Gg: AZFdTZfDL5dqnOq8FTyU2VT4/5icwUZqiDm+z/JbBSvtYvCx93vLXhAlJrIcWwmnvBP NOetJXe18+nb1JP9vTPIPNEzqkjieE/DQBIbBuUsYbxgPo28IduC1KAnPFbhrmEIjXTsVo5PtFz 4yR8Bru3j8QY2KMtDece+iBPPXDd/k6moCfTS1U5LUTgRVMnHsvvG1UjThTjG6XkQUUtVKxWH60 tulKGaV+eVuQNr9/r2QO75545kxvaIXTdR9pCuxLpaJwaetBvUw0TEmO69dvZ3mfb+5xJeCJxEO depYOQ/sNi2txDPpcyG9JP9Fk2VPFg4wAhgXRslqOsv48tpUlkwmvWsrvm79KM+Nxui7ll/Wa9z XkaexaDh+sf1YnChFOyn5OzBqnUy1nfTJsfsu9azbXcbzL/bYqjWv4HykIbMsqREA/ql57KzNs/ 1eI+Gr9CBejb4JJvUAuT3E6m6QJ+iQ75yn/wUpuj2VPgTNZEEk2WI3r8GGGFeHyTcrjBnahomla +Yb77udHk/XZqE/nReiWyPj7CTtW7kGke+e7+I+Zfw2iRksfsMhDCEdy38dy8Az7dpugkJrSxbA +4uoeCeJYJODQMVhAqIngW+LzxLtEuSL+5Ies7TQOTfR X-Received: by 2002:a05:600c:840d:b0:4a1:fbd2:f689 with SMTP id 5b1f17b1804b1-4bbeb8bc0f2mr139855985e9.7.1796495473749; Sat, 05 Dec 2026 10:31:13 -0800 (PST) Received: from [192.168.0.78] ([80.233.39.64]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbf17c5c11sm64394485e9.3.2026.12.05.10.31.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Dec 2026 10:31:12 -0800 (PST) Message-ID: <7c1122a9-f985-4e22-9554-4d280bbf7983@gmail.com> Date: Sat, 5 Dec 2026 18:31:10 +0000 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] bpf/arm64: detect atomics at build time or runtime To: Nick Hudson Cc: Wathsala Vithanage , Konstantin Ananyev , dev@dpdk.org References: <20261130163306.11116-1-nhudson@akamai.com> <20261130163306.11116-4-nhudson@akamai.com> Content-Language: en-US, en-GB From: Marat Khalili In-Reply-To: <20261130163306.11116-4-nhudson@akamai.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 30/11/2026 16:33, Nick Hudson wrote: > Use LSE instructions when __ARM_FEATURE_ATOMICS or > RTE_ARM_FEATURE_ATOMICS is defined. Otherwise, check runtime CPU flags > before selecting LSE instructions for JIT-generated code. > > Signed-off-by: Nick Hudson Hi, thank you for working on this. I can ack the code, but not the commit message or (missing) comments. The patch changes the current behaviour in a meaningful but counterintuitive way. Understanding it needs some analysis and may confuse some poor soul trying to figure out in the middle of the night why DPDK executes atomic instructions in the place it previously didn't. Firstly, it would be nice if commit message clearly stated the change in behaviour: generate JIT atomic instructions based on runtime detection even if RTE_ARM_FEATURE_ATOMICS is disabled. Secondly, it should explain the problem the patch is solving. Something along the lines of target alone being insufficient to guarantee the atomics availability for some values, LL/SC loops having forward-progress issues under contention, behaviour commonality with the rest of the platform (if it actually does the same already), yada yada. Short comment inside has_atomics would help too, maybe (not sure) even a release note. Searching mailing lists for answers should be the last resort IMO. I would also love to know how practically relevant having atomic eBPF atomics in a armv8-a generic build is in 2027+, what prevents us from just building for armv8.1-a. I'm not claiming it's not relevant, just want to make sure it's not just a "nice to have" tweaking.