Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6460031ybi; Wed, 29 May 2019 08:09:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVIXsurKDCWihZuj14PxAh2NNa5pycoeEOiyhze8Kyl2Y4QygwaS7gAQuaP7SkmtTwVfVY X-Received: by 2002:a17:90a:a608:: with SMTP id c8mr12471410pjq.37.1559142564894; Wed, 29 May 2019 08:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559142564; cv=none; d=google.com; s=arc-20160816; b=wJT7hwJi1yktgGPRX6vdy/4f99IRu3U1Cus15oulCbcaG+xW5JYyLU+d8PtXRDAeof GGIFjGvAJipbHnmwxrYOkarxHf/cQIOwc/knkTjVKUtjXfAyLNt2Icu0oaFD/GVPtVES 0jn8u2EhSyxm2fKRCP4zovtp+DhL/NnwVKw2Mhp4Uv12vCl/ObVfANiKsxaN9lzus1S0 wmwbjBPHkXlsQ91iHC/73uPJ6kkM40QRxgGI8ejGLgnj3G6ZZnFYTAMM3xcmriJZibnX zl7SpN/E3zJP6clzS+IdSY6tLG+I+P1qNJTjNOxF7KqfWDZvez8MO9EEd7+RBuw5KThq 0ewg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=99i8WyTO+BEbq76qqDY06/G+ZQ5DPs+GRpykZeKIaQU=; b=cft5Vc1Zrv56XMkTrSFP5n6BH9L/snv1NGuemsXlfYKJ8gr5GnR/pP/LO0o5qZ0aO6 HoOozkqh2DS2wXl5y3MM7deXa4ndxlwNt79wuB7iuLxkt3R/Zcb1ydpjaKW1rSt2Ml8h xsfRzFIutLgeUagdU6OF0yPiJVErwyPDgU/HGwRllCaVPOVfbKOZqdHvNPehSGj+tBTM kKGKYXmiQSVveZVMGadnnufrbt9azxnUTLY0sn7iSWWFLlBJEkOvi+6Gz4W4ejJWWoxZ flW5wVht3+6apgPByaerKCB82Hy1W3YIJn1mVfrutxT9UJaFt61633Zosj3wt0koWyzI 12iQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si25269663pli.403.2019.05.29.08.09.03; Wed, 29 May 2019 08:09:24 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbfE2PH1 (ORCPT + 99 others); Wed, 29 May 2019 11:07:27 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:55303 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbfE2PH0 (ORCPT ); Wed, 29 May 2019 11:07:26 -0400 X-Originating-IP: 90.88.147.134 Received: from bootlin.com (aaubervilliers-681-1-27-134.w90-88.abo.wanadoo.fr [90.88.147.134]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 033FBFF805; Wed, 29 May 2019 15:07:22 +0000 (UTC) Date: Wed, 29 May 2019 17:07:25 +0200 From: Maxime Chevallier To: 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 Subject: Re: [PATCH net-next] ethtool: Drop check for vlan etype and vlan tci when parsing flow_rule Message-ID: <20190529170725.5856dd65@bootlin.com> In-Reply-To: <20190529141044.24669-1-maxime.chevallier@bootlin.com> References: <20190529141044.24669-1-maxime.chevallier@bootlin.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 May 2019 16:10:44 +0200 Maxime Chevallier wrote: >When parsing an ethtool flow spec to build a flow_rule, the code checks >if both the vlan etype and the vlan tci are specified by the user to add >a FLOW_DISSECTOR_KEY_VLAN match. > >However, when the user only specified a vlan etype or a vlan tci, this >check silently ignores these parameters. > >For example, the following rule : > >ethtool -N eth0 flow-type udp4 vlan 0x0010 action -1 loc 0 > >will result in no error being issued, but the equivalent rule will be >created and passed to the NIC driver : > >ethtool -N eth0 flow-type udp4 action -1 loc 0 > >In the end, neither the NIC driver using the rule nor the end user have >a way to know that these keys were dropped along the way, or that >incorrect parameters were entered. > >This kind of check should be left to either the driver, or the ethtool >flow spec layer. > >This commit makes so that ethtool parameters are forwarded as-is to the >NIC driver. > >Since none of the users of ethtool_rx_flow_rule_create are using the >VLAN dissector, I don't think this qualifies as a regression. > >Signed-off-by: Maxime Chevallier I should have targeted this to -net, and provided a Fixes tag. Let me resend that to the proper tree. Sorry about the noise, Maxime