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=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 87345C432C0 for ; Fri, 22 Nov 2019 17:44:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 670AA20674 for ; Fri, 22 Nov 2019 17:44:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726947AbfKVRoj (ORCPT ); Fri, 22 Nov 2019 12:44:39 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:38176 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfKVRoj (ORCPT ); Fri, 22 Nov 2019 12:44:39 -0500 Received: from localhost (c-73-35-209-67.hsd1.wa.comcast.net [73.35.209.67]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id EDFD51527DCBC; Fri, 22 Nov 2019 09:44:38 -0800 (PST) Date: Fri, 22 Nov 2019 09:44:38 -0800 (PST) Message-Id: <20191122.094438.2187613497633111748.davem@davemloft.net> To: petrm@mellanox.com Cc: netdev@vger.kernel.org, pablo@netfilter.org Subject: Re: [PATCH net-next] net: flow_dissector: Wrap unionized VLAN fields in a struct From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 22 Nov 2019 09:44:39 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Petr Machata Date: Fri, 22 Nov 2019 15:47:21 +0000 > In commit a82055af5959 ("netfilter: nft_payload: add VLAN offload > support"), VLAN fields in struct flow_dissector_key_vlan were unionized > with the intention of introducing another field that covered the whole TCI > header. However without a wrapping struct the subfields end up sharing the > same bits. As a result, "tc filter add ... flower vlan_id 14" specifies not > only vlan_id, but also vlan_priority. > > Fix by wrapping the individual VLAN fields in a struct. > > Fixes: a82055af5959 ("netfilter: nft_payload: add VLAN offload support") > Signed-off-by: Petr Machata Applied.