Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3508947pxf; Mon, 15 Mar 2021 11:06:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnHK8OPsfh0rNP3ZzbejywZy1EfH5HSoxQVwSOTiLz68eMhjpdpxGQ9Wm9uO785s/HnG6B X-Received: by 2002:a17:906:16ca:: with SMTP id t10mr25435962ejd.85.1615831579133; Mon, 15 Mar 2021 11:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831579; cv=none; d=google.com; s=arc-20160816; b=EMRv+6+FYfinmnauIVkSJtdKDuljkgXsDcbz6U7ZhZKqcgQOXbZDO7Au0PZxjvVIGS w9is6FWHR4Ruy8+DYj1NZn3G0/s/Hc00tOcU8Xq6gEGUDMkdmmxY1X9py9MJ921BH1Sd 5OTSBYVldwjqwkBrcyhJGwu5OixdJwQfRmHcPr/3dzc9SQjZwJTNisG64136mtf/C3BW 099c5FTt+c6MpULWeVxJw1e7AkOJXA3+mRljv+pxj7ITqL81tWQhhorjh/aR4tBtOBRA iD/JD4VaynS2HIJlyTi/jTJlofRlThPWNTA3TLkVZ1Momxkz4Ej8sDQCoLXuNgNwrw6n uuuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vZp6u/QQsnFOH7PpD3y3qUpAGdEe+gGxC46BklWLKvs=; b=ZjDkjsyQulXTLF6R3EnfEQNo6qdhbKYOlg1i1x989wV4gno7J7OxB1MTySf+Chvjvs eelBOyL8C7Rx9j/2i4r6PoLxEijwM66ko7Rgi6GW5Oq6pQWqlGV+d3BbZYmqmdEfw1lO rh6pZ2QvM7qmHESAkRwaohaje8+hzXoBTlpA/RI94ZwirttiTnsCFzHy0BZKaet7OUOt 5FuegIyyb/N1DefVVfamfL1Xv6naxTPtOfQGrAtT5Cp2owVB1oFCot6eNJR6Odf3oNnn C2//2TW+mqRe9/JVIxg+mx4tKW1ZaIsIhYblqcA4MXp+W5DVEbiHh7faenDxwbPzd0MH wudA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AkOj7Yii; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw19si11292866edb.211.2021.03.15.11.05.46; Mon, 15 Mar 2021 11:06:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AkOj7Yii; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235429AbhCOOHh (ORCPT + 99 others); Mon, 15 Mar 2021 10:07:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:36614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232245AbhCON6B (ORCPT ); Mon, 15 Mar 2021 09:58:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 90C9764F0D; Mon, 15 Mar 2021 13:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816681; bh=nz1kj4uZaKmsov5VzACaBVHY/4az2fmYnuOqpZqP68k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AkOj7YiiWE/3JukUacgALg2gLtcn5LWssW4nuHzG1QdCr+M5hgPzC7hS/vowrWUfd GXrs373O52rWfcF/fyJawjTplPiYiiMD7O4isVQSZ/lYS6hl5gUG2mLxLeD/bngXxj U5Lme+oTM7a4VCoG+8IbRktiqJ9X86Qvo+R48CBw= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jian Shen , Huazhong Tan , Jakub Kicinski Subject: [PATCH 5.4 043/168] net: hns3: fix query vlan mask value error for flow director Date: Mon, 15 Mar 2021 14:54:35 +0100 Message-Id: <20210315135551.772128666@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Jian Shen commit c75ec148a316e8cf52274d16b9b422703b96f5ce upstream. Currently, the driver returns VLAN_VID_MASK for vlan mask field, when get flow director rule information for rule doesn't use vlan. It may cause the vlan mask value display as 0xf000 in this case, like below: estuary:/$ ethtool -u eth1 50 RX rings available Total 1 rules Filter: 2 Rule Type: TCP over IPv4 Src IP addr: 0.0.0.0 mask: 255.255.255.255 Dest IP addr: 0.0.0.0 mask: 255.255.255.255 TOS: 0x0 mask: 0xff Src port: 0 mask: 0xffff Dest port: 0 mask: 0xffff VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x0 mask: 0xf000 User-defined: 0x1234 mask: 0x0 Action: Direct to queue 3 Fix it by return 0. Fixes: 05c2314fe6a8 ("net: hns3: Add support for rule query of flow director") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -5939,8 +5939,7 @@ static int hclge_get_fd_rule_info(struct fs->h_ext.vlan_tci = cpu_to_be16(rule->tuples.vlan_tag1); fs->m_ext.vlan_tci = rule->unused_tuple & BIT(INNER_VLAN_TAG_FST) ? - cpu_to_be16(VLAN_VID_MASK) : - cpu_to_be16(rule->tuples_mask.vlan_tag1); + 0 : cpu_to_be16(rule->tuples_mask.vlan_tag1); } if (fs->flow_type & FLOW_MAC_EXT) {