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=-6.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,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 5B6B9C31E46 for ; Wed, 12 Jun 2019 06:32:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2195D2082C for ; Wed, 12 Jun 2019 06:32:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HzX5XPpn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731164AbfFLGcC (ORCPT ); Wed, 12 Jun 2019 02:32:02 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37783 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731117AbfFLGcB (ORCPT ); Wed, 12 Jun 2019 02:32:01 -0400 Received: by mail-pf1-f195.google.com with SMTP id 19so8185263pfa.4; Tue, 11 Jun 2019 23:32:01 -0700 (PDT) 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=OZ+yC7LmAgzBV860nbEWGVmK+NhL+LSi4XpwmZSTZ0M=; b=HzX5XPpnQ+ru5hys4B91jhAn0h9r44bGbQT4hnP17W0tEHyfjcSwjqYs+v8k8KaDjb 8yaMse4P0PgudcmifD0vyijp7xE609LQZil9XTER70cZTHJCL+dekb28EpAc6KWR3X1Y cOnK/dEP5L3PpQRvpwZbuJGRk2w7VqjpbVcgKyhhtlRNo7OKEQMQoqdCE6gdmKEMBGvO 4dmx/aB3ormdjQNCd3VFW6wtMbrWqObX0c7KGypqCNqXO8ILCbrNGyDAHKzyi9ce3Kjv pshYYKM7dGWJ9aYW4x9CXQN3P0UI20cjZhNF0mwb6gSoOP9Tz0uGxEgpqoy4dJo/IyKr zexg== 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=OZ+yC7LmAgzBV860nbEWGVmK+NhL+LSi4XpwmZSTZ0M=; b=jrXweqVMQ+uMi6yVOGqZd0qYzCZeIXqZRLsts0qnnTyQy4j2D1kZVTrU+z5wJWZIRA hecjgYpB0ZwWXcMucAz79eokxQDOHoRSNwedKKmOMo7kXZ+Gg+X2GuhcaTlTnaSt053G w9R5VlbHLKV2Eyh2zGz2lJw5MsFd8TXNc+kWIJvbDBy9sZOPvnrcbJzvRSuN2+TESJEN GS5Avw+rE3tN+zhoZfLT7jTkdSpE+zv+t8fWgCW3hUf1/G8F5UZz1HykUrmtYEaD4USE NOrkH5ABwXQPCi0WEgQqrDvd7ABHzzpZzf8Ia9D/GtxLrw1gLEn+PKGp71ZKVIazt3e3 +S4A== X-Gm-Message-State: APjAAAXfyFZegi7EQDj+o1D0pg8F/PGW3Lo+NycTM/S/e5+snZzpj+y2 nHcJj16wcBAQd0foyww1Hdc= X-Google-Smtp-Source: APXvYqxmzfggnMHnVv6UIcB+MEvyCcyy/9yUuTo3xp2sO7XEYH/3uAi2ikci/nu9NIT/0MtNMi3hVw== X-Received: by 2002:a65:4086:: with SMTP id t6mr23153451pgp.155.1560321120889; Tue, 11 Jun 2019 23:32:00 -0700 (PDT) Received: from [172.20.20.103] ([222.151.198.97]) by smtp.gmail.com with ESMTPSA id r4sm4118576pjd.28.2019.06.11.23.31.58 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 23:32:00 -0700 (PDT) Subject: Re: [PATCH net] net: ethtool: Allow matching on vlan CFI bit To: Maxime Chevallier , davem@davemloft.net, Pablo Neira Ayuso , Florian Fainelli , Jiri Pirko , Jakub Kicinski Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Antoine Tenart , thomas.petazzoni@bootlin.com, =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= References: <20190611155456.15360-1-maxime.chevallier@bootlin.com> From: Toshiaki Makita Message-ID: Date: Wed, 12 Jun 2019 15:31:54 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190611155456.15360-1-maxime.chevallier@bootlin.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/06/12 0:54, Maxime Chevallier wrote: > Using ethtool, users can specify a classification action matching on the > full vlan tag, which includes the CFI bit. > > However, when converting the ethool_flow_spec to a flow_rule, we use > dissector keys to represent the matching patterns. > > Since the vlan dissector key doesn't include the CFI bit, this > information was silently discarded when translating the ethtool > flow spec in to a flow_rule. > > This commit adds the CFI bit into the vlan dissector key, and allows > propagating the information to the driver when parsing the ethtool flow > spec. > > Fixes: eca4205f9ec3 ("ethtool: add ethtool_rx_flow_spec to flow_rule structure translator") > Reported-by: Michał Mirosław > Signed-off-by: Maxime Chevallier > --- > Hi all, > > Although this prevents information to be silently discarded when parsing > an ethtool_flow_spec, this information doesn't seem to be used by any > driver that converts an ethtool_flow_spec to a flow_rule, hence I'm not > sure this is suitable for -net. > > Thanks, > > Maxime > > include/net/flow_dissector.h | 1 + > net/core/ethtool.c | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h > index 7c5a8d9a8d2a..9d2e395c6568 100644 > --- a/include/net/flow_dissector.h > +++ b/include/net/flow_dissector.h > @@ -46,6 +46,7 @@ struct flow_dissector_key_tags { > > struct flow_dissector_key_vlan { > u16 vlan_id:12, > + vlan_cfi:1, Current IEEE 802.1Q defines this bit as DEI not CFI, so IMO this should be vlan_dei. Toshiaki Makita