Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp172325imn; Fri, 29 Jul 2022 03:35:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR4s1Sj5FUYHgVXlqHMAsBkcR8pp2AFNx0tovGhUtYhx5FZk0xhT6Pe4yYM4I9vXjskwDkKc X-Received: by 2002:a17:902:d50c:b0:16d:5881:a14f with SMTP id b12-20020a170902d50c00b0016d5881a14fmr3311523plg.22.1659090937405; Fri, 29 Jul 2022 03:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659090937; cv=none; d=google.com; s=arc-20160816; b=wB6KJaaIbGGcF43fjDPN1H+CJwT/aiTwd5FMa21p9pyQJnsrLojUyRhu57vwrHMq8p e184Y3ebk4Tbju/r1Gm/2cnLbHGpjPKDQ1Fey920ax9TC/BcOlhte/U2UcfsOamyUgWs tfuQDdPB1pTy91XbpPEYAnM+HYVcqAUx6EldEiVxn31LpAndu1o+bMLpyLnaR81iTPoS 8aEvtYcnM7KcmeqKOT4xqhrhep1gjcUgCHxZdvN8F3NnHr20DjPFHB+T9p3Lo+OLF/02 y1TvwzfFpKhEhdyGa430XhHbZkpMCtihjxkJlGG559EFH9+oljwEktGAmY8BtDIGEIt8 M8cw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GbrvGM/K9/2ZyRodN5Yzzsj4KKgWM+RDaU3fXwBp0qg=; b=pNKQLtAv2yBmHRi0XQoxLOjcScXfziz2nvT81cv/+9t2o3IdVReeVeHU1MSYDgLX5L HP1QxFWSfdKs3CZNEx2iuQYv/jp6qULQFnNHd9YFNmV9PnvXE1sza1mDBl0jQRP3Pstu z5BUzw0P+J+QaLNuS6wQ54tTyn/fW4eWfyhqTLzDqxjB9nLvGjjqjXH/GsWDNl0yZJyJ ESxtJjsKnvrSfYYSeUeryb1EJriO02RE/D8/nBpVoJKWWVist/EvmS2LpATgEa7lTBU1 +lNcd0cXERG5i0bu4Lrm3NCeDJkt27wqWcyNDGho9E7RWHpwJL4Ld47SZWjzmD2nNzfI K/lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 82-20020a630355000000b00419e1a3542bsi3639966pgd.303.2022.07.29.03.35.22; Fri, 29 Jul 2022 03:35:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235653AbiG2KZH (ORCPT + 99 others); Fri, 29 Jul 2022 06:25:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235352AbiG2KZF (ORCPT ); Fri, 29 Jul 2022 06:25:05 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F54E82449; Fri, 29 Jul 2022 03:25:01 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LvNp744mJzWg1n; Fri, 29 Jul 2022 18:21:03 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Jul 2022 18:24:52 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600016.china.huawei.com (7.193.23.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Jul 2022 18:24:51 +0800 From: Guangbin Huang To: , , , , , , , , CC: , , , , Subject: [PATCH net 2/2] net: ionic: fix error check for vlan flags in ionic_set_nic_features() Date: Fri, 29 Jul 2022 18:17:55 +0800 Message-ID: <20220729101755.4798-3-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220729101755.4798-1-huangguangbin2@huawei.com> References: <20220729101755.4798-1-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600016.china.huawei.com (7.193.23.20) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen The prototype of input features of ionic_set_nic_features() is netdev_features_t, but the vlan_flags is using the private definition of ionic drivers. It should use the variable ctx.cmd.lif_setattr.features, rather than features to check the vlan flags. So fixes it. Fixes: beead698b173 ("ionic: Add the basic NDO callbacks for netdev support") Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index f3568901eb91..1443f788ee37 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -1437,7 +1437,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif, if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH) ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL); - if ((vlan_flags & features) && + if ((vlan_flags & le64_to_cpu(ctx.cmd.lif_setattr.features)) && !(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features))) dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n"); -- 2.33.0