From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BFD5145B34 for ; Mon, 14 Oct 2024 04:44:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8BC1402D9; Mon, 14 Oct 2024 04:44:29 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2110.outbound.protection.outlook.com [40.107.95.110]) by mails.dpdk.org (Postfix) with ESMTP id 27F4C40151; Mon, 14 Oct 2024 04:44:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GlEX0aslCen2Au/edXg4zwRvDA6iSc+irWASfBtqkbiPlTIFMOGMU4RF5j8YQxsBH3ytAvNTbdx4ZQcwo7H1vD90UkRK6CgwybdMzk/Fw6Nj1n//2rf4TJw9w+qafDoiEKSYZP+CEWRDYM5vBpXxqw5bC4MnTj6LVgHt9ZNyTJZNilr/+Ga9IGZUy2IbBBAdV7osEUu2FD5LH2ACl0kNIjZt+UN3V+kpzYxKhpNuxcOlKK+oVjm6LqDWxQAJUEl1OLjH8GN+qqzbqFbfrQ4Qb43omu1GLRFmDzC/MpeYjaCxw8DfInpmXwvbTwRJOtsmHkd8T+eLpFx6avWb8FGmWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nziE2lQIKe8B4M6lmBYIt1m1fr3YhPv+yOYVUeGVY/w=; b=Kf3dZhkDX3aNDD70bqGrbv/ya/bk3rVZhU+FSiy3x0YG9vGNdWCLzGvZpmG76nQVxzPw7ZNMwJC2qaacKGnW8hJKPMqPz1jX7xffCK9+RkYET6PW0tS+SIOIjPVqe+PFM3pqfilbJ7pxvVe3Lna3AcmIZhrSO3hYjwfIdPhwf+xXXqcGhH+ZLy+WKkvdnNIxwqXGcfSQaAFk8Um1jVo4r5AkQNpPZQR4vrf9/dVND6bPgdg2FJl0BqNZWHoC1XJl+vM8XBaI1fFNCOvnrEFuo2npr7B6avoBsSWOl2CAP5VzBsuDohAlJomA8VTg6B/Gv6Hw1TMQ/VnMfGYKvWWeOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nziE2lQIKe8B4M6lmBYIt1m1fr3YhPv+yOYVUeGVY/w=; b=aBDYqw0uS2bSqeoce8KnnJws2NPVGg5lN0lNcqYF9UaCo+6MIK6H9IHChYu62hx/CTdg3QxCZ6QTsRi9vYxS6nl2af1YuaMVnestm0GHSwt95QFDihKBtLGCFPZQz9tT+f3RhW8E94s6I7+3gMFw6BhdvnwkxxhYr+TtnWf6Bnk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB6115.namprd13.prod.outlook.com (2603:10b6:510:2bc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.24; Mon, 14 Oct 2024 02:44:23 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%5]) with mapi id 15.20.8048.020; Mon, 14 Oct 2024 02:44:23 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Zerun Fu , chaoyong.he@corigine.com, stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 1/4] net/nfp: notify flower firmware about PF speed Date: Mon, 14 Oct 2024 10:43:55 +0800 Message-Id: <20241014024358.3873420-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20241014024358.3873420-1-chaoyong.he@corigine.com> References: <20241014024358.3873420-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0023.apcprd01.prod.exchangelabs.com (2603:1096:4:192::17) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB6115:EE_ X-MS-Office365-Filtering-Correlation-Id: 628833a6-8428-4d4f-7271-08dcebfa1cab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?P/7lumoyEfsPN86cTuW37SiVF9yb3nlg+Yhy46piByLaRvpdNFxIroRsbw5E?= =?us-ascii?Q?qGNmyT9i1GeYN/GE+X0puCF6rFTf5bMbWhyCLNTI8v5tDBuKBUjY5/lf6t5d?= =?us-ascii?Q?lruLBhPcbve6o5su21FR1jp7Z0/1tMx5sQW4TgdDqVgZVPilnJrhr9zi3Ww2?= =?us-ascii?Q?AgGVdusaD8ZDkJxXco4nkOnMVaofnVVb4Txbm3flGIeUo33iERNiy72gQVAH?= =?us-ascii?Q?9PEkYuDIbG2erQ2KV5Rw/POrxLsdOZQixOkVKKpLFBpPZ0lmi5rhTulgVWcS?= =?us-ascii?Q?uMph6E3HTJSAhlneaiP0B70ipQn10LLot1WxPojubqk1MmIdArluHZcK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ht/XJEMWCiXXBL50kIeX2Lsl6R5c2HClpa03g/blbI0E/0VEhWx?= =?us-ascii?Q?TvivDX9Zm6Q23L5FdGcgFPC4wgjma48rzBt47xQbQn91zAmnVSWqhUQ+h51P?= =?us-ascii?Q?3NE/qd6zcim4oy6BRkWKM2GLuFeZMhxw0KSDoS9yxKCmuA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?3OmQ5LPZhRJ5G001KKd1gQqFFOebRXv3pkqradsdumukBLP4oVxN4h0ciFlG?= =?us-ascii?Q?bXAT8Qll1PB39OYm+AcOOtfdMBXsbHUroQP+H1AvUkkLRmWNUfcz1YJjana/?= =?us-ascii?Q?0/NKz9m/jCDzF9H7DfpSeABy6a4zZyNbZYJ9FvlawbaEertu4Ywz3/CMfGej?= =?us-ascii?Q?5FbBJYM/hSZ1H+2UyfOl+n7+NnlwybZsaDHNnMvWVrQfwp9DCdb37ZuNs0WG?= =?us-ascii?Q?+e8kk4n5TykiPYkXDEuGVPPm9i8s/bW4GMDfPwLQr+8zkYDNwDji9LamSkGw?= =?us-ascii?Q?oyjDKefuOk6g2Fj8YVshWbaKhz7qUqlEaJJel0Yr80xRg+1JJ9BtU3r4aNaw?= =?us-ascii?Q?0EIl6FxJT2LR4Y2pl4DoOkU2gZA77EkNfjOQpsNVPQda3L/qoWG34+BQELgv?= =?us-ascii?Q?hd8WTJe6g4sZ3txt4ByktdGG1N69Xy6Jsnj5nPQ6vL94/At2OxromnlvU7xc?= =?us-ascii?Q?eMQNaImV6oy/m1VvNViPp8ggzQ2IiZ9CrQMaDzWOqJtXcbo1WSYbCkK2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pG9RDqUmc8/FWHnH1h16ue9Bh+dX+mlqqlgGYMj?= =?us-ascii?Q?u+wngWIaEYJNDwu79h624xme5btB1saY13z8tvL35LuMw2DSi3qWN/U9Bvhv?= =?us-ascii?Q?4TQKrA92eYe2iDfubd9uj4u9EzJrvHJtSt1hR4JSHXmKyk11ztsZNa9IuXd+?= =?us-ascii?Q?NYhXlIdYI9U9GEhaS+I3HWwcKny/8jWwOxtlaPjoApTtKdMIzxtX1dNLMrxL?= =?us-ascii?Q?QQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 628833a6-8428-4d4f-7271-08dcebfa1cab X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 02:44:23.6688 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: t5815L7WuSrTtoQSaizI5DhdWuDN4F9TNDveF3teLQBkaNhOX54YvxA1XvdczCFLlJ93NPu/2Tixn56ZSFGQyyvPkDYDHTsAeTzjJzwVHxo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB6115 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Zerun Fu When using flower firmware, the VF speed is obtained from the firmware and the firmware get the VF speed from the PF. But the previous logic does not notify the firmware about PF speed, and this cause VF speed to be unavailable. Fix this by add the logic of notify firmware about PF speed. Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework") Cc: chaoyong.he@corigine.com Cc: stable@dpdk.org Signed-off-by: Zerun Fu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_representor.c | 3 +++ drivers/net/nfp/nfp_net_common.c | 2 +- drivers/net/nfp/nfp_net_common.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index eb0a02874b..eae6ba39e1 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -37,6 +37,9 @@ nfp_flower_repr_link_update(struct rte_eth_dev *dev, ret = nfp_net_link_update_common(dev, link, link->link_status); + if (repr->repr_type == NFP_REPR_TYPE_PF) + nfp_net_notify_port_speed(repr->app_fw_flower->pf_hw, link); + return ret; } diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c index b986ed4622..f76d5a6895 100644 --- a/drivers/net/nfp/nfp_net_common.c +++ b/drivers/net/nfp/nfp_net_common.c @@ -184,7 +184,7 @@ nfp_net_link_speed_nfp2rte_check(uint32_t speed) return RTE_ETH_SPEED_NUM_NONE; } -static void +void nfp_net_notify_port_speed(struct nfp_net_hw *hw, struct rte_eth_link *link) { diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h index 8429db68f0..d4fe8338b9 100644 --- a/drivers/net/nfp/nfp_net_common.h +++ b/drivers/net/nfp/nfp_net_common.h @@ -383,6 +383,8 @@ int nfp_net_vf_config_app_init(struct nfp_net_hw *net_hw, bool nfp_net_version_check(struct nfp_hw *hw, struct nfp_pf_dev *pf_dev); void nfp_net_ctrl_bar_size_set(struct nfp_pf_dev *pf_dev); +void nfp_net_notify_port_speed(struct nfp_net_hw *hw, + struct rte_eth_link *link); #define NFP_PRIV_TO_APP_FW_NIC(app_fw_priv)\ ((struct nfp_app_fw_nic *)app_fw_priv) -- 2.39.1