From: Daniel Borkmann Subject: Re: [PATCH bpf-next,v3 0/2] bpf: add helper for getting xfrm states Date: Tue, 24 Apr 2018 23:53:40 +0200 Message-ID: References: <1524581430-11921-1-git-send-email-eyal.birger@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: shmulik@metanetworks.com, ast@kernel.org To: Eyal Birger , netdev@vger.kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:59811 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbeDXVxn (ORCPT ); Tue, 24 Apr 2018 17:53:43 -0400 In-Reply-To: <1524581430-11921-1-git-send-email-eyal.birger@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 04/24/2018 04:50 PM, Eyal Birger wrote: > This patchset adds support for fetching XFRM state information from > an eBPF program called from TC. > > The first patch introduces a helper for fetching an XFRM state from the > skb's secpath. The XFRM state is modeled using a new virtual struct which > contains the SPI, peer address, and reqid values of the state; This struct > can be extended in the future to provide additional state information. > > The second patch adds a test example in test_tunnel_bpf.sh. The sample > validates the correct extraction of state information by the eBPF program. > > --- > v3: > - Kept SPI and peer IPv4 address in state in network byte order > following suggestion from Alexei Starovoitov > v2: > - Fixed two comments by Daniel Borkmann: > - disallow reserved flags in helper call > - avoid compiling in helper code when CONFIG_XFRM is off Applied to bpf-next, thanks Eyal!