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 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 24104C282C0 for ; Fri, 25 Jan 2019 08:30:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E25B521915 for ; Fri, 25 Jan 2019 08:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728276AbfAYIah (ORCPT ); Fri, 25 Jan 2019 03:30:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51436 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbfAYIah (ORCPT ); Fri, 25 Jan 2019 03:30:37 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4CDAEAC613; Fri, 25 Jan 2019 08:30:37 +0000 (UTC) Received: from localhost (ovpn-200-36.brq.redhat.com [10.40.200.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AA2B61520; Fri, 25 Jan 2019 08:30:28 +0000 (UTC) Date: Fri, 25 Jan 2019 09:30:27 +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 3/7] samples/bpf: Convert XDP samples to libbpf usage Message-ID: <20190125093027.28203d2f@redhat.com> In-Reply-To: <20190124214747.6986-4-maciejromanfijalkowski@gmail.com> References: <20190124214747.6986-1-maciejromanfijalkowski@gmail.com> <20190124214747.6986-4-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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 25 Jan 2019 08:30:37 +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:43 +0100 Maciej Fijalkowski wrote: > From: Maciej Fijalkowski > > Some of XDP samples that are attaching the bpf program to the interface > via libbpf's bpf_set_link_xdp_fd are still using the bpf_load.c for > loading and manipulating the ebpf program and maps. Convert them to do > this through libbpf usage and remove bpf_load from the picture. > > While at it remove what looks like debug leftover in > xdp_redirect_map_user.c > > In xdp_redirect_cpu, change the way that the program to be loaded onto > interface is chosen - user now needs to pass the program's section name > instead of the relative number. In case of typo print out the section > names to choose from. > > Signed-off-by: Maciej Fijalkowski > Reviewed-by: Jakub Kicinski > --- > samples/bpf/Makefile | 8 +- > samples/bpf/xdp_redirect_cpu_user.c | 145 +++++++++++++++++++++++++----------- > samples/bpf/xdp_redirect_map_user.c | 47 ++++++++---- > samples/bpf/xdp_redirect_user.c | 44 ++++++++--- > samples/bpf/xdp_router_ipv4_user.c | 75 +++++++++++++------ > samples/bpf/xdp_tx_iptunnel_user.c | 37 ++++++--- > 6 files changed, 253 insertions(+), 103 deletions(-) Thanks a lot for converting sample/bpf programs to use libbpf. It have been on my todo list for a very long time. You didn't implement the matching of prog-names in a iproute2 like fashion, as I described, but the important part was converting this to libbpf, so I'll Ack this anyway. Acked-by: Jesper Dangaard Brouer (I acked V1 just before... meant to ACK this V3) -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer