From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: Re: [RFC PATCH net-next V2 0/6] XDP rx handler Date: Thu, 16 Aug 2018 12:24:07 +0800 Message-ID: <4e5c81ee-56ae-1d70-273e-c551ad6c932b@redhat.com> References: <1534130250-5302-1-git-send-email-jasowang@redhat.com> <20180814003253.fkgl6lyklc7fclvq@ast-mbp> <5de3d14f-f21a-c806-51f4-b5efd7d809b7@redhat.com> <20180814121734.105769fa@redhat.com> <03ab3b18-9b13-8169-7e68-ada307694bc1@redhat.com> <08bf7aec-078a-612d-833f-5b3d09a289d0@gmail.com> <2792239a-ed3b-d66e-0c1c-e99455311eff@redhat.com> <20180816040517.7vjm4bwxosyzvapu@ast-mbp.dhcp.thefacebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: David Ahern , Jesper Dangaard Brouer , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, mst@redhat.com To: Alexei Starovoitov Return-path: In-Reply-To: <20180816040517.7vjm4bwxosyzvapu@ast-mbp.dhcp.thefacebook.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 2018年08月16日 12:05, Alexei Starovoitov wrote: > On Thu, Aug 16, 2018 at 11:34:20AM +0800, Jason Wang wrote: >>> Nothing about the topology is hard coded. The idea is to mimic a >>> hardware pipeline and acknowledging that a port device can have an >>> arbitrary layers stacked on it - multiple vlan devices, bonds, macvlans, etc >> I may miss something but BPF forbids loop. Without a loop how can we make >> sure all stacked devices is enumerated correctly without knowing the >> topology in advance? > not following. why do you need a loop to implement macvlan as an xdp prog? > if loop is needed, such algorithm is not going to scale whether > it's implemented as bpf program or as in-kernel c code. David said the port can have arbitrary layers stacked on it. So if we try to enumerate them before making forwarding decisions purely by BPF program, it looks to me a loop is needed here. Thanks