Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3516352pxf; Mon, 15 Mar 2021 11:16:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeNU54pD6X+CBkoIv764ccmpuJWth0tv0zzSiO/OJ1EioY6LiXTf4K4/y+OH3athPA3c11 X-Received: by 2002:a05:6402:13ca:: with SMTP id a10mr31444371edx.320.1615832194030; Mon, 15 Mar 2021 11:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832194; cv=none; d=google.com; s=arc-20160816; b=aOMngMm6sf1jbrb2sN1BGteXi9GErdgyTQWsog89O9XFwMnSJ6Hz9WiUCrkpnaLKfm /A/r1flbL/f5/WNrMSD4J909IRWQx36HkkC13M+ilwHs5u+EbPdd9XqfgixAhUuLvrC/ ZfrMN8Clg28Ta58rjMDdC+mSJQzv7pwTTepj5cFvRhcI5kzxh1KXUK5ueL/rA2rjrmua 3s2PGjPZBmph6VxN5bcUVFwFLG7zQiiJ/8+R7AYz4QwLTVNLIoHHKgs2Oc2i9KzvHzBj JnpDdpgKB/LsP6e03mqZX5rq1zmOl3QeOvxsZSNRTh6LqyMcxIpu7VZppTIgRYE5dtdL LA7A== 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=pZKJobpptz9dglJ1ag6UmDFAfnBKewGozn4no9PpCTs=; b=nX3kKWaqAJPiEsUMnnKgJhrIK3B1PZQmfwcOCJ4EO1DreJhpu267GN+MsJm2Hg+lSQ oeCWQ8Vg1ZDwL9ejQN7WZxT2JuW4hpYWdybH9pAssVfrATsu38iKt1Op84zgEaeAQZRl DCUyiEV4LOCs35M19KOzHVSFvNsQ2ghxbZGtNaGQb121UGPtTbsWfh8IAKqlEpiHfMqS 7iegfwaWFaPc9XF7aMFYP+f+fyfvx2L+nrsMgMmaXJepSxmrOOXzdn0cMGQDbE8DiRpM p11YI6A/dKCmTP7QaXeCB+7J06wtfU58YD0n7cG9bnlgAHuPkmMkPx9vssyULnpzkDyD RsrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KlWuNfr+; 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 t15si12155998ejx.751.2021.03.15.11.16.11; Mon, 15 Mar 2021 11:16:34 -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=KlWuNfr+; 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 S236805AbhCOOPf (ORCPT + 99 others); Mon, 15 Mar 2021 10:15:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:37612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232495AbhCON67 (ORCPT ); Mon, 15 Mar 2021 09:58:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0093B64F29; Mon, 15 Mar 2021 13:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816722; bh=bEj67SlRkQh96fFM0wqHYsH5alerkYTtOlOVpLd73Z0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KlWuNfr+LaEPBMiLNN/YDgoNd+r9wzTnEZ6GOlUudvGIRfLTnQWmPP4j68rWWgTSQ ijezV3xO96QJhoXGwk88uZDsw9JmbnDrA8k/aarRLctWZZZaQq5IYMHprkMjTSigBt LYsIAgaHGLMyXm+pC+nwXuVMf6RQCd32PoEXQAG0= 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.10 075/290] net: hns3: fix query vlan mask value error for flow director Date: Mon, 15 Mar 2021 14:52:48 +0100 Message-Id: <20210315135544.447649704@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 @@ -6183,8 +6183,7 @@ static void hclge_fd_get_ext_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) {