From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDE7AC282C0 for ; Fri, 25 Jan 2019 08:32:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EE8221915 for ; Fri, 25 Jan 2019 08:32:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbfAYIcS (ORCPT ); Fri, 25 Jan 2019 03:32:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46200 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbfAYIcS (ORCPT ); Fri, 25 Jan 2019 03:32:18 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 26DCFC002963; Fri, 25 Jan 2019 08:32:18 +0000 (UTC) Received: from localhost (ovpn-200-36.brq.redhat.com [10.40.200.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 523E1604DC; Fri, 25 Jan 2019 08:32:12 +0000 (UTC) Date: Fri, 25 Jan 2019 09:32:11 +0100 From: Jesper Dangaard Brouer To: Maciej Fijalkowski Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org, jakub.kicinski@netronome.com, brouer@redhat.com Subject: Re: [PATCH bpf-next v3 4/7] samples/bpf: Extend RLIMIT_MEMLOCK for xdp_{sample_pkts, router_ipv4} Message-ID: <20190125093211.724f6d5c@redhat.com> In-Reply-To: <20190124214747.6986-5-maciejromanfijalkowski@gmail.com> References: <20190124214747.6986-1-maciejromanfijalkowski@gmail.com> <20190124214747.6986-5-maciejromanfijalkowski@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 25 Jan 2019 08:32:18 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 24 Jan 2019 22:47:44 +0100 Maciej Fijalkowski wrote: > From: Maciej Fijalkowski > > There is a common problem with xdp samples that happens when user wants > to run a particular sample and some bpf program is already loaded. The > default 64kb RLIMIT_MEMLOCK resource limit will cause a following error > (assuming that xdp sample that is failing was converted to libbpf > usage): > > libbpf: Error in bpf_object__probe_name():Operation not permitted(1). > Couldn't load basic 'r0 = 0' BPF program. > libbpf: failed to load object './xdp_sample_pkts_kern.o' > > Fix it in xdp_sample_pkts and xdp_router_ipv4 by setting RLIMIT_MEMLOCK > to RLIM_INFINITY. > > Signed-off-by: Maciej Fijalkowski > Reviewed-by: Jakub Kicinski > --- > samples/bpf/xdp_router_ipv4_user.c | 7 +++++++ > samples/bpf/xdp_sample_pkts_user.c | 7 +++++++ > 2 files changed, 14 insertions(+) Acked-by: Jesper Dangaard Brouer -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer