Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751816AbbETASt (ORCPT ); Tue, 19 May 2015 20:18:49 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:34858 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbbETASq (ORCPT ); Tue, 19 May 2015 20:18:46 -0400 Message-ID: <555BD2E4.5050608@plumgrid.com> Date: Tue, 19 May 2015 17:18:44 -0700 From: Alexei Starovoitov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Andy Lutomirski CC: "David S. Miller" , Ingo Molnar , Daniel Borkmann , Michael Holzheu , Zi Shen Lim , Linux API , Network Development , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next 1/4] bpf: allow bpf programs to tail-call other bpf programs References: <1432079946-9878-1-git-send-email-ast@plumgrid.com> <1432079946-9878-2-git-send-email-ast@plumgrid.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 896 Lines: 20 On 5/19/15 5:13 PM, Andy Lutomirski wrote: > > IMO this is starting to get a bit ugly. Would it be possible to have > the program dereference the subprogram reference itself from the jump > table? There would have to be a verifier type that represents a > reference to a program tail-call entry point, but that seems better > than having this weird indirection. Which part? I don't think you've looked at examples yet. network parser has to call itself. Otherwise we cannot parse 10 mpls labels or TLVs. Indirection via jump_table also has to be there. We need to dynamically add and remove programs form this jump table. It cannot be all static. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/