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 67FE144010; Sun, 12 May 2024 18:03:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DEE7F402B1; Sun, 12 May 2024 18:03:30 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 4A52F40278 for ; Sun, 12 May 2024 18:03:29 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6f44e3fd382so2963077b3a.1 for ; Sun, 12 May 2024 09:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1715529808; x=1716134608; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=Iwe3P7Sls+w7t3uO9sKmYW1145AFAzJLm0rKvxabyh8=; b=Sc0ceDu0Fe1Dfk3ydcERKsBiurkprYqM1wluZy2grwuyy21rWvL4MYKctYw1tvCbmc jatG2kDWaZuF9BJ6DI/bq0U/3FgJli4t7XmU5XTyzfn371l1Oen1TqNimfW1D7t4LNUA bSYbBUrxmU5PrSvwc30dGBJsPS2TCMavWgQnVSX44cjcCQeEK3STDm4hxwMDm78YLTMD jC7VnmABvc5jELhAKHJLHONvWn63WUQY4jHM1fadwF11xbrfyoieinaj/PNNWDyLq3wI 8zmINlCeibJesUvTyqOnZy5yvmvaLXKSj8tMNrysgWk4uUYs9fNGE564RfB+Q3z2olrd AMWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715529808; x=1716134608; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Iwe3P7Sls+w7t3uO9sKmYW1145AFAzJLm0rKvxabyh8=; b=gPdiX/nu18AB26KP9fUjz5wFwfbB261etEGvyhgKdiwmNtAoWgj2r5hbRsTvS9bHbd o2aW9q7XHrcDA1NoI0FRNE6w/ktxNuF9lK2KwRnv/hxGkZp8ifCu+UHKkXyjitYMYk3n OyvW8sUuxXtrcJByeZBWRiMYzb69XdQXXlWUy56s6N6OSjNE5GX/fvdqX8+HRiZUtsub KAEdI6ZUGQJt7tvtT4gX4OzWwzVnmCv5zRls3Pxcg+S5KqHCyygCZj48ZRMx1KC9whX/ icXFDiBApY/2HIRL00ij4pu4l8XWFV514aen8qDLyXy0jmqr4an54B9TF3tLLOCgFRx+ +nZQ== X-Gm-Message-State: AOJu0Ywr1I11UjnJrytBO8ifiR94eYv8YE+jDZTpN12GchX997GpWCRf vxILTYqCcnu6CAQfR+YPVxC5dKwj3FCqKQ+No2zPyP/jQS+FgBZYCx3tp03VdgQ= X-Google-Smtp-Source: AGHT+IENXIzABTiJ15hdDIxq2r/MtAbhI6oyznTcQjNWO5iq9C/WuQC4z1X+PUbs+dy+hQAzG48lkg== X-Received: by 2002:a05:6a20:5a9b:b0:1af:4ea2:5424 with SMTP id adf61e73a8af0-1afde1192f3mr7021973637.33.1715529808083; Sun, 12 May 2024 09:03:28 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a66600sm6038466b3a.11.2024.05.12.09.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 09:03:27 -0700 (PDT) Date: Sun, 12 May 2024 09:03:25 -0700 From: Stephen Hemminger To: Yoav Winstein Cc: dev@dpdk.org, Konstantin Ananyev Subject: Re: [PATCH] bpf: don't verify classic bpfs Message-ID: <20240512090325.7c085db5@hermes.local> In-Reply-To: <20240512055545.98297-1-yoav.w@claroty.com> References: <20240512055545.98297-1-yoav.w@claroty.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sun, 12 May 2024 08:55:45 +0300 Yoav Winstein wrote: > When classic BPFs with lots of branching instructions are compiled, > __rte_bpf_bpf_validate runs way too slow. A simple bpf such as: > 'ether host a0:38:6d:af:17:eb or b3:a3:ff:b6:c1:ef or ...' 12 times > > results in ~1 minute of bpf validation. > This patch makes __rte_bpf_bpf_validate be aware of bpf_prm originating > from classic BPF, allowing to safely skip over the validation. > > Signed-off-by: Yoav Winstein > --- No. Wallpapering over a performance bug in the BPF library is not the best way to handle this. Please analyze the problem in the BPF library; it should be fixed there.