Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp719494ybe; Wed, 11 Sep 2019 03:42:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwL9CkW/6AMirsNbtcRuBoVNF+bAQ18mwLlrJsc7GXQ8kYgPw+Gvt7rIvpY5+F0m5I47ihJ X-Received: by 2002:a17:906:6b0f:: with SMTP id q15mr28998160ejr.200.1568198520779; Wed, 11 Sep 2019 03:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568198520; cv=none; d=google.com; s=arc-20160816; b=H/HtaCdmqkZ2+Xu2qTkUqCmn7dtBi3ynBYbWw41LhfxMcrCZSZyEsyPHh/f/G4VgOf 1y23RugJMgpODADuS6NyNPqNdWOh35scSPULFWXxQ3vDhfaPw+K3XW+spdQtUVNykFMB z7Gn7SDlhCFcWzyLj+SF62auXlJiNFezSusvYhYCDZ/m/SV1mDc21+vdyiREZfw4kHgp Y/acBXLs6IOtyf5f32EDCNGulqf416IVuCBBMKvT39eoNy0MWSOt6GIlMkwe5duBp7Mx HxB0wMU06dZFEsyZFhTMeDN6ubodCFhTUFi2hNsn0UtOeSVu2jsm+4FhuZBH3sqHt47h 3FRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=k52TPuYrUt+XBT7FzePhew+sRiw9pvJQffjp9P97C7k=; b=vtmXM+dKbm1rB07O28mC9DDq4vWv9Riz+l5BMTooN/pwwAKgMgj08IPog5sjW7Zxi+ 16X9Y8QC7CfaGCOqOgkY9sKQSdDTnMWrtADABGHxdqjDtLxIHc1kSNiQ22DkjNRvkM90 jwEsWzXcVh2+Amhe1EK4vbyczNj6JIqGxDIt1TLfu4NADYWHp0efmr/EO3eWdbNy3EA7 fbzcoSpuiuR0exS4Wp2l336v5Rk9hl0XXqZgwz6gOb2Q/9Ybw7ilFIs0pjR/H+R/B9Gn R1piy/rSdZE4dKd0vFbq0p2E+e4NPHRvrslvs8RxHDm0LQ1BYaeY7ngcIIqxm9gExuf9 GAXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id um3si11070148ejb.391.2019.09.11.03.41.36; Wed, 11 Sep 2019 03:42:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727731AbfIKKjN (ORCPT + 99 others); Wed, 11 Sep 2019 06:39:13 -0400 Received: from mga12.intel.com ([192.55.52.136]:53278 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727307AbfIKKjM (ORCPT ); Wed, 11 Sep 2019 06:39:12 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2019 03:39:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,493,1559545200"; d="scan'208";a="200497189" Received: from sroessel-mobl1.ger.corp.intel.com (HELO btopel-mobl.ger.intel.com) ([10.249.38.107]) by fmsmga001.fm.intel.com with ESMTP; 11 Sep 2019 03:39:08 -0700 Subject: Re: [PATCH] bpf: validate bpf_func when BPF_JIT is enabled To: Yonghong Song , Sami Tolvanen Cc: Alexei Starovoitov , Daniel Borkmann , Kees Cook , Martin Lau , Song Liu , "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Jesper Dangaard Brouer References: <20190909223236.157099-1-samitolvanen@google.com> <4f4136f5-db54-f541-2843-ccb35be25ab4@fb.com> <20190910172253.GA164966@google.com> From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Message-ID: Date: Wed, 11 Sep 2019 12:39:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-09-11 09:42, Yonghong Song wrote: > I am not an expert in XDP testing. Toke, Björn, could you give some > suggestions what to test for XDP performance here? I ran the "xdp_rxq_info" sample with and without Sami's patch: $ sudo ./xdp_rxq_info --dev enp134s0f0 --action XDP_DROP Before: Running XDP on dev:enp134s0f0 (ifindex:6) action:XDP_DROP options:no_touch XDP stats CPU pps issue-pps XDP-RX CPU 20 23923874 0 XDP-RX CPU total 23923874 RXQ stats RXQ:CPU pps issue-pps rx_queue_index 20:20 23923878 0 rx_queue_index 20:sum 23923878 After Sami's patch: Running XDP on dev:enp134s0f0 (ifindex:6) action:XDP_DROP options:no_touch XDP stats CPU pps issue-pps XDP-RX CPU 20 22998700 0 XDP-RX CPU total 22998700 RXQ stats RXQ:CPU pps issue-pps rx_queue_index 20:20 22998705 0 rx_queue_index 20:sum 22998705 So, roughly ~4% for this somewhat naive scenario. As for XDP performance tests; I guess some of the XDP selftests could be used as well! Björn