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.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=unavailable 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 8259BC10F05 for ; Sat, 23 Mar 2019 16:05:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51D5C20879 for ; Sat, 23 Mar 2019 16:05:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fomichev-me.20150623.gappssmtp.com header.i=@fomichev-me.20150623.gappssmtp.com header.b="zPr3rprp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbfCWQFe (ORCPT ); Sat, 23 Mar 2019 12:05:34 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44336 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727372AbfCWQFe (ORCPT ); Sat, 23 Mar 2019 12:05:34 -0400 Received: by mail-pf1-f193.google.com with SMTP id a3so3503526pff.11 for ; Sat, 23 Mar 2019 09:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fomichev-me.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=quPtM3va7MNERPJ6j9k7oesLWTPUXB2mimdDliiri6k=; b=zPr3rprpFP7288Q42kA/eB5+a7Qf5Qt5jyrnjYz7CDG1HbKifLlaYUcD9jTXaCuljt gnjH6sxy5esvysueB+6VVwpJLbNPlTAqlw7yDazlRqkbzQTNd7PxtCbEM6Y3cnpeP1uh mi2+cHCDN12UJ4vEcAz4tgcNqjeLxcvfv5hfkwhiHu8kM7XdAlFCnVEzCTDqISvZRJWw 26NqUiGX0L/OmZHLhqtW2LAMhrVT3/W19k42Yc1RGYdQg014YZjKqhRJ9gqnblKYx2e9 S990+y7IyYs7SAgvMQ8nwW+hp/wQbOabaEColBatICLtbunbJ7oYUwrHCnTG6nJOlTR7 RMaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=quPtM3va7MNERPJ6j9k7oesLWTPUXB2mimdDliiri6k=; b=LyfLdODCkkmBuhePPx5zHvk7DWkxGTcuqYzsQqVJMwWGL3GMckhxcG3DzkavFSUmoV AsNiU4DBVqdPr2lp6WDxmRt5ZBqAXehivrepvDs+zXQNQX2MQXvvCIfKHsvnqQR4yjLO sx+OAxHmM7oA0UnexlEXU14ZRYsasB/G3r/HXpt8a/udXOWSoATEbUvvkKW50jdbh7CC OwMmBDRNP5l64F8JvSy3fRJu1VqbDlNRGYapKp9V51XjSNVlWP5edUvS4jnLZ29JZeM2 nzmFtRbd6KT72CqLFUmFun5Ryq1XAEkWnF1Sr07mrMeVrbNnMevm4+UvjGgj8cdp9e0j 02og== X-Gm-Message-State: APjAAAX1GAGlLkgA8TIZ/K6ejyuXbCdmLYQ9dUuej+brjyU8N+D52EsI Y0e5LV4Z9wDQuOYXYkHk17+TqQ== X-Google-Smtp-Source: APXvYqyMBAS5vEn9/0EdtRJVTt7mefpa9S4i0scVkdq83Tz2yO0e6ccyuPRXR9fuJqH1oWQRWW790Q== X-Received: by 2002:a63:f843:: with SMTP id v3mr14929463pgj.25.1553357132985; Sat, 23 Mar 2019 09:05:32 -0700 (PDT) Received: from localhost ([2601:646:8f00:18d9:d0fa:7a4b:764f:de48]) by smtp.gmail.com with ESMTPSA id u20sm10705139pga.76.2019.03.23.09.05.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2019 09:05:32 -0700 (PDT) Date: Sat, 23 Mar 2019 09:05:31 -0700 From: Stanislav Fomichev To: Alexei Starovoitov Cc: Stanislav Fomichev , netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net, simon.horman@netronome.com, willemb@google.com, peterpenkov96@gmail.com Subject: Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case Message-ID: <20190323160531.GZ7431@mini-arch.hsd1.ca.comcast.net> References: <20190322195903.162516-1-sdf@google.com> <20190322195903.162516-7-sdf@google.com> <20190323010049.dbywat3n6kfelwth@ast-mbp.dhcp.thefacebook.com> <20190323011957.GY7431@mini-arch.hsd1.ca.comcast.net> <20190323014101.mxeey4tw3gt7o4yi@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190323014101.mxeey4tw3gt7o4yi@ast-mbp.dhcp.thefacebook.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 03/22, Alexei Starovoitov wrote: > On Fri, Mar 22, 2019 at 06:19:57PM -0700, Stanislav Fomichev wrote: > > Are we ok with breaking api in this case? I'm all in on removing this > > extra information. We can always put it back if somebody complains (and > > manually parse in eth_get_headlen case). > > Fine. That seems to be the only way forward to clean it all up. > Could you submit patch 1 to bpf tree disallowing vlan fields? > Patch 3 looks like candidate as well? SGTM, will do. Let me also spend some time and do a simple test for the vlan case, to make sure I didn't miss something important. One question here though: would I need to wait for bpf and bpf-next to re-merge to continues the series? Or we can cherry-pick those patches to bpf-next as well (and git will work it out during the merge)? > > We can still have protocol, because in both skb/skb-less cases we have > > it. > > proto can work in both cases, but is it needed ? Does program benefit from it? > The kernel side burns extra bytes by copying it and extra branches to handle it. > May be drop it as well? I feel like the program benefits from it, there is no need to go back and re-parse that (and in the skb case, this data is already pulled). I was also thinking about re-purposing flow_keys->n_proto for that (instead of skb->protocol), so it functions as input and output, maybe that's a more clear way to do it.