Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3516562pxf; Mon, 15 Mar 2021 11:16:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv0+x+bHvWWLXTmGQS1mHB14snTb1oHnZ6eMc54CnpWBwoozzfOx8ytLyNQh/66KLwpjWM X-Received: by 2002:a05:6402:1517:: with SMTP id f23mr32203339edw.272.1615832212454; Mon, 15 Mar 2021 11:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832212; cv=none; d=google.com; s=arc-20160816; b=b63bXVgLTo2UQ2p4A5ZVJ/mzjfb3P7JAuEY15OeQI0vVxC2H8gZ93lOb7RGii83VED GKtOkOfYxxyR8Byfp6J8g9nhT+Y8TNCoTMZpeCDAm25BUIIgc4JhJVMn0o2p/ETb59gR JVTXHS+KYVcuGGQnnp/m4FSzvsi8yej4UdQZ9UD6FTP1XQZhmgdANl/ygyN6g2P1X2LF kx4odCFAKXbQXR9o2F3KLJs8I43qZE+OGBDJZOzk52YHrpvEOehtPR5LDJ7DOI1vdeGP fY4PDd4cvjWN0uc6owz4wrCxSZC+QrSF+aDoy+BCmVerSjyL440HogfYBfGh58OspMbR Y+pQ== 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=skv2welKrWMiHfZU5XiT/Q/kDA66HZDiuhAq46Exroo=; b=nEZ2oUaa+H5s4iSsoAwFcyzLvxCeiKRO/REplpQQQNhu8kqmHrgU67AJN5tzECJH6h 2TZSKqJQAsEi4b2qXtVQjMs61yM0VWK8TvO2ejtC7Liu0feQPuvpfAlS+lhQMT65wv3A j4ms20c6yUtdf+45mRqAaEiglbt3aR5+OaIxP/xJYzUoCOnt9w9nURvH+Xcwk0HhO2hT ULUlruK1/b2J7TJc3z8WCC2wKrqvccVlTUnYqk6VXgLw8SS8IHN7J6EIAawUxct+YHVP 3yjme/lejfQMTqsa2ZXTrEAE0nCwAdpBEWRf877o3rSSp0FpbqBzOCyFjLK12AdwAr+l F7IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nc9f1Abm; 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 bu1si11202020edb.213.2021.03.15.11.16.29; Mon, 15 Mar 2021 11:16:52 -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=Nc9f1Abm; 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 S236875AbhCOOQA (ORCPT + 99 others); Mon, 15 Mar 2021 10:16:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:37670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232147AbhCON7O (ORCPT ); Mon, 15 Mar 2021 09:59:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4151364F19; Mon, 15 Mar 2021 13:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816731; bh=Jl3E8f1Oe96Wvoxz7fOTbqvT+/AHJp0BHWTCpa3LvGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nc9f1Abm7F2nFeg2yvfEHtUJVZlVJSnY62gXzupVXOy8u00+uYrD8IxpM8M/n0wcR ArvqHYEChIRkc81XeXpPHzspXJhuXwrcjO47wPB8SgdW+raaam6Tl7QHmNEpchOgo+ lucAObL7zN4F57IWeLZvBEQ2Ch8llOUHAOcc8I6E= 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.11 090/306] net: hns3: fix query vlan mask value error for flow director Date: Mon, 15 Mar 2021 14:52:33 +0100 Message-Id: <20210315135510.690750167@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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 @@ -6283,8 +6283,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) {