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=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 8F54AC35249 for ; Sun, 2 Feb 2020 17:59:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59F8A20679 for ; Sun, 2 Feb 2020 17:59:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jSxQ8jtB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726921AbgBBR7N (ORCPT ); Sun, 2 Feb 2020 12:59:13 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:42454 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbgBBR7N (ORCPT ); Sun, 2 Feb 2020 12:59:13 -0500 Received: by mail-io1-f68.google.com with SMTP id s6so3725064iol.9 for ; Sun, 02 Feb 2020 09:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7e7urQWuEf6zo8tajlPF09u4D0S1zSeM+Jzm0gn2jn4=; b=jSxQ8jtB7nIjGAtfFNqsasreelxCQafeKykYhHkkIjBv2xo7bHtUtk5lNH1RxlNf4R 0bkqclL443099ciTtLmW5XqM/uRaXTBc0l+C/AD9PInZm3CRp4BvTMUbOUfgpePJthvk tsw1z2sNu9ul4Z/t672dm3YrBGgXvhatzPU+gMbIs2KyHJBhqlMq9U3w2Q3+fTSwR9Xs ThL6o/FtsVDAixz/8OFoah0zkCZo7sdqfgFHwNA3OLVmUh5cjLzIDReiIDUHnpDAqYS9 VGHQSAptbBDwPXOjpmmaaRMfqppOXc0zO6UIhKuf3QdjYNQm/FxnFBiepzVO8c0+2DKM nCvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7e7urQWuEf6zo8tajlPF09u4D0S1zSeM+Jzm0gn2jn4=; b=rKGyCrs/T5ZPUoD/5WucKoH79T1dLYyUxZr5PJbqsjaMWDYzvLw/aGpsVIzmY78YYe YNy5VM55ISAan+cRUw8y5rmZ8npXjHdjzPdhGYlTrV6CNM1BK6fnAzcA/UKjL8xegw9a aeq/BLf4KXfnwVmrl0K+b0V/ddHjql6Xs16bTkpyVpdKw+fPM55eM0JyEsDv/AyY7hxn /agzJVs4GbaL3R0Q0dLNs9k2lUrIOZae7yIZXHxupbz/l4XtN0nZvWPZMymNnpmT7PtC IlXUoEv9qi8587WEST937vIaxulOlVYhSssjRYJdaVVXeKMamkprJ2l5Lmwm7xVfvhuV +6UA== X-Gm-Message-State: APjAAAUJfR3e1SRQEiDKcH4YwtDEIFijs/05kfzQFdEix/bqjFDFgoZO M6JOBFy4Q9XtoEd/apqA820= X-Google-Smtp-Source: APXvYqxOaXgFl2R6tpAuliGz8oCe4J6GX0Z3zkcjFghvaGA3WR3vfOgtpcXGc6OfIfISf4AcE+zFTg== X-Received: by 2002:a5e:8214:: with SMTP id l20mr16966637iom.168.1580666352478; Sun, 02 Feb 2020 09:59:12 -0800 (PST) Received: from ?IPv6:2601:282:803:7700:2529:5ed3:9969:3b0e? ([2601:282:803:7700:2529:5ed3:9969:3b0e]) by smtp.googlemail.com with ESMTPSA id d9sm4689036ion.22.2020.02.02.09.59.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Feb 2020 09:59:11 -0800 (PST) Subject: Re: [PATCH bpf-next 03/12] net: Add IFLA_XDP_EGRESS for XDP programs in the egress path To: Alexei Starovoitov Cc: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Jakub Kicinski , David Ahern , netdev@vger.kernel.org, prashantbhole.linux@gmail.com, jasowang@redhat.com, davem@davemloft.net, jbrouer@redhat.com, mst@redhat.com, toshiaki.makita1@gmail.com, daniel@iogearbox.net, john.fastabend@gmail.com, ast@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, David Ahern References: <20200123014210.38412-1-dsahern@kernel.org> <20200123014210.38412-4-dsahern@kernel.org> <87tv4m9zio.fsf@toke.dk> <335b624a-655a-c0c6-ca27-102e6dac790b@gmail.com> <20200124072128.4fcb4bd1@cakuba> <87o8usg92d.fsf@toke.dk> <1d84d8be-6812-d63a-97ca-ebc68cc266b9@gmail.com> <20200126045443.f47dzxdglazzchfm@ast-mbp> From: David Ahern Message-ID: <8356434b-8c6b-9fe5-ebd2-a30bd7d7c093@gmail.com> Date: Sun, 2 Feb 2020 10:59:10 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200126045443.f47dzxdglazzchfm@ast-mbp> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 1/25/20 9:54 PM, Alexei Starovoitov wrote: > On Sat, Jan 25, 2020 at 06:43:36PM -0700, David Ahern wrote: >> >> That said, Martin's comment throws a wrench in the goal: if the existing >> code does not enforce expected_attach_type then that option can not be >> used in which case I guess I have to go with a new program type >> (BPF_PROG_TYPE_XDP_EGRESS) which takes a new context (xdp_egress_md), >> has different return codes, etc. > > This is acceptable risk. We did such thing in the past. The chances of > user space breakage are extremely low. > Ultimately that is a decision for the maintainers. Code wise both iproute2 and libbpf always initialize bpf_attr to 0 and given the many uses of that union it seems odd that someone would initialize one field at a time. Unless someone comes back with a strong 'hell, no' I am planning to send the next RFC version with the current API.