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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 BFE10C433DF for ; Fri, 22 May 2020 01:05:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 840772083E for ; Fri, 22 May 2020 01:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590109530; bh=HV7gC8R+wl2s1Xr3gzpl86mdgofh3EV70CREEsDAoIE=; h=From:To:Cc:Subject:Date:List-ID:From; b=Job3Jr9aR3joWKROyhpBSUmMnaqBd14Y+1aPG3QxcmVx1YxoXrDrvevTDrEHWrvPU AkE9QiLG1iE33nuc82ql16wOl/l+GwqX5/gJpSYLcoslheq26xI4IGV8HPUAZn+4er WF+NlTQec9ecaJG34abXkfYH0cQVUobNZMtMliOM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726936AbgEVBF3 (ORCPT ); Thu, 21 May 2020 21:05:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:48402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgEVBF3 (ORCPT ); Thu, 21 May 2020 21:05:29 -0400 Received: from C02YQ0RWLVCF.internal.digitalocean.com (c-73-181-34-237.hsd1.co.comcast.net [73.181.34.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6C5012072C; Fri, 22 May 2020 01:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590109529; bh=HV7gC8R+wl2s1Xr3gzpl86mdgofh3EV70CREEsDAoIE=; h=From:To:Cc:Subject:Date:From; b=X/OhYoCQn7FKxr0qxKuOvbpwROqJUSp/+btnm3KhuaqTMPzwwPnHL9fE4Md4YZCmh Gm/Hx/uIsLSTzj+sP1ugD5JBJ/jb6C/o39zzHCVTvC3c+DknT2bLGcmwVoKplsHeoR WheBBEBB0Yr9Ss5DQT40UoNEJg78Jb+JIDkpB+3c= From: David Ahern To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, brouer@redhat.com, toke@redhat.com, daniel@iogearbox.net, john.fastabend@gmail.com, ast@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, dsahern@gmail.com, David Ahern Subject: [PATCH RFC bpf-next 0/4] bpf: Add support for XDP programs in DEVMAPs Date: Thu, 21 May 2020 19:05:22 -0600 Message-Id: <20200522010526.14649-1-dsahern@kernel.org> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Implementation of Daniel's proposal for allowing DEVMAP entries to be a device index, program id pair. Daniel suggested an fd to specify the program, but that seems odd to me that you insert the value as an fd, but read it back as an id since the fd can be closed. David Ahern (4): bpf: Handle 8-byte values in DEVMAP and DEVMAP_HASH bpf: Add support to attach bpf program to a devmap xdp: Add xdp_txq_info to xdp_buff bpftool: Add SEC name for xdp programs attached to device map include/linux/bpf.h | 5 ++ include/net/xdp.h | 5 ++ include/uapi/linux/bpf.h | 3 + kernel/bpf/devmap.c | 132 +++++++++++++++++++++++++++++---- net/core/dev.c | 18 +++++ net/core/filter.c | 17 +++++ tools/include/uapi/linux/bpf.h | 3 + tools/lib/bpf/libbpf.c | 2 + 8 files changed, 170 insertions(+), 15 deletions(-) -- 2.21.1 (Apple Git-122.3)