Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1727757imm; Thu, 16 Aug 2018 01:19:50 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzyYqmnjLZdmpwDCL+yTsdPWNHhCll1QrCGfs+iMI77O1wr3aAip0eyhtnHdKFy3wOIOjl6 X-Received: by 2002:a62:c218:: with SMTP id l24-v6mr31336449pfg.185.1534407590330; Thu, 16 Aug 2018 01:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534407590; cv=none; d=google.com; s=arc-20160816; b=HBLBBUrh4jGSTZfiOY3vO1loSdnJinO4NMG7sJCFiwR+zep0GUA/GTL8i96JWCRDHW SZlkV9f7dlWlPoc6NTwjtxo4bqeFDLMR6x+e3L+0DpujOw3gxEbabbUmAN5FyyG7uJsk e4pLPUQ6uJ0mFcWgpVQMjSogYqmHSzCJEFQVM/TlStpgFBLFLKZgRvfalidcI6y2CFQJ 73DHi24fFDCZhaw5vszk8R9Snbm/yJtRIrxHed78BSq3FItuF90Uc57EP1kTeQeLivgP sl2LNezGKRwrL9xvwrc/mFO+LrRBtLl0GkUaynviVtmF0F/5TXJ1v35ptlXRFG6KygRS EGhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=ngqqKNUjpH+Da7YfHq9PgVu9+UNTKVD5AO2hMjomn5A=; b=EJ0DTfZHbeWdk5BH0zNh2IE21Y4A56b5UZaa49mNJg9fJQ6tq+GfD6ktMUGs8wCzQ7 OlhWBRgKHOaMNlZZLsyQHXFfmai9ZyoWEnCQ9lsy4oefMYzoTbp9LS6YBd+3a5gmVJqc Ch6U8uCy4N2ZCt2dUq4CwIe9RUx19DN9er7SYnyYadFOjk2ZHg1FFuwH7doqSx6jsPf/ 7BE/+oc5z6iNoeeNTpq3qOUJyUU6H0CcP7NoeDwYEV6nsMvjqz4shQy7UcUGgHe8E9nf VvCSa4zfLbFpF4WWpl8nBU2HUkOoNe+JHPnd6/J+1KAzMOc3k6Sl7vpHgrxwBil5QG1N 23IA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18-v6si22974522pff.91.2018.08.16.01.19.26; Thu, 16 Aug 2018 01:19:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388141AbeHPHTx (ORCPT + 99 others); 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