From patchwork Mon Dec 17 10:24:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 1014386 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43JHNZ55q9z9sBh for ; Mon, 17 Dec 2018 21:25:34 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731998AbeLQKZd (ORCPT ); Mon, 17 Dec 2018 05:25:33 -0500 Received: from mga09.intel.com ([134.134.136.24]:63098 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbeLQKZd (ORCPT ); Mon, 17 Dec 2018 05:25:33 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2018 02:25:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,365,1539673200"; d="scan'208";a="110064279" Received: from nisrael1-mobl1.ger.corp.intel.com (HELO btopel-mobl.ger.intel.com) ([10.255.41.181]) by fmsmga008.fm.intel.com with ESMTP; 17 Dec 2018 02:25:28 -0800 From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: bjorn.topel@gmail.com, magnus.karlsson@intel.com, magnus.karlsson@gmail.com, ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , brouer@redhat.com, u9012063@gmail.com, qi.z.zhang@intel.com, jakub.kicinski@netronome.com, andrew@lunn.ch Subject: [PATCH bpf-next v2 4/7] tools/bpf: sync kernel uapi bpf.h to tools directory Date: Mon, 17 Dec 2018 11:24:58 +0100 Message-Id: <20181217102501.22019-5-bjorn.topel@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181217102501.22019-1-bjorn.topel@gmail.com> References: <20181217102501.22019-1-bjorn.topel@gmail.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Björn Töpel Sync kernel uapi bpf.h "BPF_FUNC_xsk_redirect" change to the tools directory. Signed-off-by: Björn Töpel --- tools/include/uapi/linux/bpf.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index e7d57e89f25f..2568039b6265 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -2319,6 +2319,17 @@ union bpf_attr { * "**y**". * Return * 0 + * + * int bpf_xsk_redirect(struct xdp_buff *xdp_md) + * Description + * Redirect the packet to the attached XDP socket, if any. + * An XDP socket can be attached to a network interface Rx + * queue by passing the XDP_ATTACH option at bind point of + * the socket. + * + * Return + * **XDP_REDIRECT** if there is an XDP socket attached to the Rx + * queue receiving the frame, otherwise **XDP_PASS**. */ #define __BPF_FUNC_MAPPER(FN) \ FN(unspec), \ @@ -2413,7 +2424,8 @@ union bpf_attr { FN(map_peek_elem), \ FN(msg_push_data), \ FN(msg_pop_data), \ - FN(rc_pointer_rel), + FN(rc_pointer_rel), \ + FN(xsk_redirect), /* integer value in 'imm' field of BPF_CALL instruction selects which helper * function eBPF program intends to call