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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FROM_EXCESS_BASE64, 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 F3630C282C0 for ; Fri, 25 Jan 2019 17:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6468218D0 for ; Fri, 25 Jan 2019 17:53:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q0RKy3V6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729327AbfAYRxz (ORCPT ); Fri, 25 Jan 2019 12:53:55 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41647 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729119AbfAYRxy (ORCPT ); Fri, 25 Jan 2019 12:53:54 -0500 Received: by mail-lj1-f193.google.com with SMTP id k15-v6so9064020ljc.8 for ; Fri, 25 Jan 2019 09:53:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tI9ctXZ/iN6I0MR3gjj9RCVNZRZZzwe11/lifun9q44=; b=q0RKy3V6miH9042RZpN4d10rmvi2anjomiT5ihUWUKHJtx8olk97rtOwzt7jfu0OmU 4FMUxsjGvE5vLUNZ3/nZwxgs5obYuQjcruiSBntredOYeOfAo9LNtDdhL9sLHnOJ/Bbc MMMxrk4Ddx+cDxveittNiyVPvlOhTHyINSVGsxnbSrUvOU3jsL1bJ1oJiaUUq7QLedPV qbJER4WUgmKuHc7ZM7udPNBcPQTRQX0Qhmk88nzTGBw11jriRu/BkE9u+ub+OZ4/w+7U u6pQAWRXkWnHU/cKausqY/3JjP/dqs3/BgtJmDsIe+mC4vHcv+MC/NFtHlKq0DYKrn6P qgoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tI9ctXZ/iN6I0MR3gjj9RCVNZRZZzwe11/lifun9q44=; b=B0tV+jsWGYkwGpEmn49/38J9p2ZS6If3txBfXmOOTSa4h77hy6fqYspOKFcwPBGt24 p+pxezv3RGws7uplRpnhAU33xmdZ4c8lpmPSGvBcuTGv+z12axdHL7YqiHeQ/4nLFmnw flngQokwhMXXuWERUiLOiciLi/eiJP4TKPyHVMcXPnQSLoSPNxwbXOsz/dTLuF/mrU8s 1KJL1OGDM/58qfya3aXCN4HVVbP6lRGPi4zxWgl+1w/9JJpkobp4hLtzKN/BKx8maQZD l9Kbf0x2qcaaOStNEbXIOCvDs+Ls2FR1RWZ09+UjoAzAWCCgIlSkR8CrZpbxB0ZRlgbt SU2Q== X-Gm-Message-State: AJcUukezDjZJDGVUYljD79b2FzN7c0nHbpDL8x7pZVY1m1WU/FL15Ftc ABweRc1DmCuFi/jjqnhagaIPcEoFvuE= X-Google-Smtp-Source: ALg8bN6xmv6m/NbiaY5kGr0GiY/Bv6vLDENlvv2bmzlC/t+/HZD9GLLtWgGw0yHe2+3YVuuxTWb7mg== X-Received: by 2002:a2e:6503:: with SMTP id z3-v6mr9764506ljb.153.1548438832299; Fri, 25 Jan 2019 09:53:52 -0800 (PST) Received: from maciek-lenovo (host-185-93-94-63.ip-point.pl. [185.93.94.63]) by smtp.gmail.com with ESMTPSA id b17-v6sm1628953ljj.93.2019.01.25.09.53.51 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 25 Jan 2019 09:53:52 -0800 (PST) Date: Fri, 25 Jan 2019 18:53:48 +0100 From: Maciej =?UTF-8?B?RmlqYcWCa293c2tp?= To: Jesper Dangaard Brouer Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org, jakub.kicinski@netronome.com Subject: Re: [PATCH bpf-next v3 3/7] samples/bpf: Convert XDP samples to libbpf usage Message-ID: <20190125185348.44fa961e@maciek-lenovo> In-Reply-To: <20190125093027.28203d2f@redhat.com> References: <20190124214747.6986-1-maciejromanfijalkowski@gmail.com> <20190124214747.6986-4-maciejromanfijalkowski@gmail.com> <20190125093027.28203d2f@redhat.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 25 Jan 2019 09:30:27 +0100 Jesper Dangaard Brouer wrote: > 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. > I will post it as a follow-up patch once I'm done with this series and we got this (hopefully) merged, if you don't mind. > Acked-by: Jesper Dangaard Brouer > Thank you! > (I acked V1 just before... meant to ACK this V3) >