Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp173528lqf; Fri, 26 Apr 2024 03:22:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZb/tNPoFZI7xZByCsWjjCJzXR0sZZWdTK4aOBHq+6JJ3DOQyG3ZLZp2I7QO7Gj2gJNzrpDrT2z2I+a8Uxkc+tatCBu//6D+sqwUgkfw== X-Google-Smtp-Source: AGHT+IHJqEBzYJUwiHSsbBtD5DS1JCEzOX7R9iYBmsS5uGE5l9ZMw1uBWnlIBLyGwPbCOfGiZPKm X-Received: by 2002:a05:6e02:1a42:b0:36a:388f:ec98 with SMTP id u2-20020a056e021a4200b0036a388fec98mr2913368ilv.10.1714126962643; Fri, 26 Apr 2024 03:22:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714126962; cv=pass; d=google.com; s=arc-20160816; b=uyWO4jlgKagJEwB42uLQicEIoC3E6iNqPPqXkcOiO4D2RQDM9NkPOf/DLM12lGunof rrViDd09mQ1MDrcoMOyDfcBuQsn86p7rywqN+kft7YnucgAzpFhsxh8CZj8eYtw+9akM K57IlhJZk6xqowKhxcdcwmdyKd+tm9ZmdT93sDd6P9FyLMkaZ9e4SbZ8fBaJJ16S1r0J 6tJ1VIBp0j/Kl0bTyoA1bAPywiOJVOQxj/nw/99P9r8k2FuEwF6gy/pYNl0DwnmY6/sV hlu24T47WPsbdtyl700nsDf4j8T85curgd4tZ4LobGKmdBeWrOEcxy+dXVpHef0adJTq GEPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=S49e9neyIx2OrqxN/KYI3hxQsA6WdvtEmqaDQtaz1eE=; fh=bH8wtoutavYA7YVow2Ey5eNMVKGylgpvzC5W/6gq12U=; b=MTN5LNVSWIREyf1WJVTc0sAah14e7JPix3ay1JWi5FQvyMooZhwYEHkUpFqEmkj1vi QBLYEvpX/+HJTJSm6XzyWyQ97FHOL0z8fDaTqlNhCoRINPZZVm3XLW6dFsa+NgRM4BeJ Sl+cmquqrnYKBxO9fcOT9IuHtslue84XW25u5cA3f2KuSsMvNYO2oXv4o3psBN6qxTqY XsJIOQD+1Iyz2XDsypHR5nVFB6ydhK+jZF3edi6l3dlRNVN/i1AAkBaG0w9hoSEElV7X HMLJCFQ3Ipd9UJ4bdA6izQbHGn97pIUEFJluO7QwB1JgTw0kxacbOuyrVcHGdqMMeElq ZaFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-159850-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e1-20020a635441000000b005dc16b88e8dsi14628186pgm.353.2024.04.26.03.22.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 03:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159850-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-159850-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7E4AD28A8FE for ; Fri, 26 Apr 2024 10:17:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EFDD145B0F; Fri, 26 Apr 2024 10:15:36 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CE8214533D; Fri, 26 Apr 2024 10:15:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714126535; cv=none; b=NgHCITDWqfc05dEgAsOK/3UNJJz6PngiE3knIyAnUXNSZRTgQJBfoTJyXMk4DMvBdzFasobf3U0gaD+F2kYn/XpwvFNaqBjBYg9Tf5C5zRN0len9nUy2582UqNxsQeu0WGkBC1CwozrD0sEhVVOARjw0kGhgT9OnSEcxAfWNWTo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714126535; c=relaxed/simple; bh=EyNcns5pQgclKYHILemdW7rew+42rQDhCJV9u1hRB3Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hPOk15pGNHtGnplWvZVw/QTRdjSMAIE8rh/TTgNF0OGP6T2MxeRwUiLZZERf0JghMDA1aLv2vTarD7481+YONmGKXWjFPeXYtCZhnIWIe1bTFry9n/AAqlyNxq1x7SruEdJIG7nyJ87gCdgVnkEvi81oRUkfizGvmAC+BSgMFsg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4VQpRx3jQszwV9T; Fri, 26 Apr 2024 18:12:13 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id 71C9718009D; Fri, 26 Apr 2024 18:15:26 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 26 Apr 2024 18:15:20 +0800 From: Jijie Shao To: , , , , , , CC: , , , , , , Subject: [PATCH V2 net 2/7] net: hns3: change type of numa_node_mask as nodemask_t Date: Fri, 26 Apr 2024 18:00:40 +0800 Message-ID: <20240426100045.1631295-3-shaojijie@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240426100045.1631295-1-shaojijie@huawei.com> References: <20240426100045.1631295-1-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) From: Peiyang Wang It provides nodemask_t to describe the numa node mask in kernel. To improve transportability, change the type of numa_node_mask as nodemask_t. Fixes: 38caee9d3ee8 ("net: hns3: Add support of the HNAE3 framework") Signed-off-by: Peiyang Wang Signed-off-by: Jijie Shao --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 ++++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 7 ++++--- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index f19f1e1d1f9f..133c94646c21 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -897,7 +897,7 @@ struct hnae3_handle { struct hnae3_roce_private_info rinfo; }; - u32 numa_node_mask; /* for multi-chip support */ + nodemask_t numa_node_mask; /* for multi-chip support */ enum hnae3_port_base_vlan_state port_base_vlan_state; diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index ff6a2ed23ddb..62ddce05fa2b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1766,7 +1766,8 @@ static int hclge_vport_setup(struct hclge_vport *vport, u16 num_tqps) nic->pdev = hdev->pdev; nic->ae_algo = &ae_algo; - nic->numa_node_mask = hdev->numa_node_mask; + bitmap_copy(nic->numa_node_mask.bits, hdev->numa_node_mask.bits, + MAX_NUMNODES); nic->kinfo.io_base = hdev->hw.hw.io_base; ret = hclge_knic_setup(vport, num_tqps, @@ -2458,7 +2459,8 @@ static int hclge_init_roce_base_info(struct hclge_vport *vport) roce->pdev = nic->pdev; roce->ae_algo = nic->ae_algo; - roce->numa_node_mask = nic->numa_node_mask; + bitmap_copy(roce->numa_node_mask.bits, nic->numa_node_mask.bits, + MAX_NUMNODES); return 0; } diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h index e821dd2f1528..37527b847f2f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h @@ -891,7 +891,7 @@ struct hclge_dev { u16 fdir_pf_filter_count; /* Num of guaranteed filters for this PF */ u16 num_alloc_vport; /* Num vports this driver supports */ - u32 numa_node_mask; + nodemask_t numa_node_mask; u16 rx_buf_len; u16 num_tx_desc; /* desc num of per tx queue */ u16 num_rx_desc; /* desc num of per rx queue */ diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 0aa9beefd1c7..b57111252d07 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -412,7 +412,8 @@ static int hclgevf_set_handle_info(struct hclgevf_dev *hdev) nic->ae_algo = &ae_algovf; nic->pdev = hdev->pdev; - nic->numa_node_mask = hdev->numa_node_mask; + bitmap_copy(nic->numa_node_mask.bits, hdev->numa_node_mask.bits, + MAX_NUMNODES); nic->flags |= HNAE3_SUPPORT_VF; nic->kinfo.io_base = hdev->hw.hw.io_base; @@ -2082,8 +2083,8 @@ static int hclgevf_init_roce_base_info(struct hclgevf_dev *hdev) roce->pdev = nic->pdev; roce->ae_algo = nic->ae_algo; - roce->numa_node_mask = nic->numa_node_mask; - + bitmap_copy(roce->numa_node_mask.bits, nic->numa_node_mask.bits, + MAX_NUMNODES); return 0; } diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h index a73f2bf3a56a..cccef3228461 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h @@ -236,7 +236,7 @@ struct hclgevf_dev { u16 rss_size_max; /* HW defined max RSS task queue */ u16 num_alloc_vport; /* num vports this driver supports */ - u32 numa_node_mask; + nodemask_t numa_node_mask; u16 rx_buf_len; u16 num_tx_desc; /* desc num of per tx queue */ u16 num_rx_desc; /* desc num of per rx queue */ -- 2.30.0