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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 D86CFC4321D for ; Thu, 16 Aug 2018 04:24:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD5EB2124D for ; Thu, 16 Aug 2018 04:24:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD5EB2124D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388144AbeHPHTx (ORCPT ); Thu, 16 Aug 2018 03:19:53 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47060 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726072AbeHPHTx (ORCPT ); Thu, 16 Aug 2018 03:19:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27B4C40216F3; Thu, 16 Aug 2018 04:24:17 +0000 (UTC) Received: from [10.72.12.48] (ovpn-12-48.pek2.redhat.com [10.72.12.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 64EE12166BA0; Thu, 16 Aug 2018 04:24:10 +0000 (UTC) Subject: Re: [RFC PATCH net-next V2 0/6] XDP rx handler To: Alexei Starovoitov Cc: David Ahern , Jesper Dangaard Brouer , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, mst@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> From: Jason Wang Message-ID: <4e5c81ee-56ae-1d70-273e-c551ad6c932b@redhat.com> Date: Thu, 16 Aug 2018 12:24:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180816040517.7vjm4bwxosyzvapu@ast-mbp.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 16 Aug 2018 04:24:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 16 Aug 2018 04:24:17 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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