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 B887B454A2; Wed, 19 Jun 2024 04:50:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BFF54114B; Wed, 19 Jun 2024 04:49:57 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2108.outbound.protection.outlook.com [40.107.223.108]) by mails.dpdk.org (Postfix) with ESMTP id 6EA19402F2 for ; Wed, 19 Jun 2024 04:49:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kgjgySkE4TpLPdAT7TXDC870D6bya7lKUsk1j2xCRaNjL5llbc3RUThBz6YVPvnribsJF8BldmCGPo7k/CH3P/D/oiOWyYg+IIVmMSs9Pug3fHAzCXwRBL5Tn/lmBNPU1il000Ah2E2Cy4lGZciYvkWlCp1LggRnQKd+DAsJX9pHlKIqVJdpc/PJaYe5rUcSSXujH8JYkkzGIxYkJlhwacnKZfJAqYQG4g4eRZs2ghTiqCkVc0kcwRoUStE2D+PBAlz7IX6owipw18qqmcAkhEPzWk6reaESj5+Pwc3vagXS5Wli1iuswmqeRFRChciOBoIq0Q80z2jb030tsnNKYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=0G8lQYyW8ae+UsC3/jwjiXEcNMjbzUPC4U3Ro4ruFZA=; b=L6mqFLfWOt0P34h4KFcYMZ+vUnAVYnbGscFd2QmgzGLU25MSNBTJZ3fXF/196Izn60RPniBSnXvHgk889QOGGoKD5cVPWlZZGprys9HGrmXf0GaMikRtVfJxuuWfkBhz/LT59yoixICyWS9rZ5nLgqHOiKUKrc+Oforu0az6J6/4DBTTnb1FPSJVw3oItfYn/PfxwSkNK12hwTVlkidY0rwqV1Dv+ahBBUf4bTNOa8b0xPj1+rNJY0aw3wY6eMKIukPwXIWKoRd62ng9pLxk3Y2S4srZjK+QZwUf51/ORdMCqDgaqs6FdnvPgePoWo9XLHP+tU/qpd3KnjH7opVVyg== 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=0G8lQYyW8ae+UsC3/jwjiXEcNMjbzUPC4U3Ro4ruFZA=; b=NR+8qVp6sq/WLO8ysR3HHbrfNbPE/+OIYukYI0ozzQGObigfickEy7ZBGQdIasfNr/cldJ23Zo1MNgATJD17LHRKnMdVZNDQt9ldLfFck8UJP6IcpTxK2cZTkZZeqwVv3GaHoE9VEoZeMFdobhCK84Eqe7UKYY3jNfN6SvrwCTk= 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 SJ2PR13MB6166.namprd13.prod.outlook.com (2603:10b6:a03:4f9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Wed, 19 Jun 2024 02:49:54 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 02:49:54 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Chaoyong He Subject: [PATCH 2/5] net/nfp: use offload flag to control VXLAN configuration Date: Wed, 19 Jun 2024 10:49:20 +0800 Message-Id: <20240619024923.3215843-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240619024923.3215843-1-chaoyong.he@corigine.com> References: <20240619024923.3215843-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: CYZPR02CA0007.namprd02.prod.outlook.com (2603:10b6:930:a1::24) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ2PR13MB6166:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c26f004-18c9-493b-f906-08dc900a7f40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|1800799021|52116011|376011|366013|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?MirSo6Rs1edx8eN31+AlHy44zkt0q0OtxNCeL3LwO2A+KrkPat0m5yCEe60Q?= =?us-ascii?Q?uhSpdrnC9e7VQu5Sg11u5T5xAWTwQuv0d/ucuFq3K8w7+pQZWpRdjGwIBzht?= =?us-ascii?Q?aOGNVWh4VMQ6u9rnba/2KU5kFF/WLnk4xKvGWAa5fn0ADqZ8u7xdJ9/2I5Ru?= =?us-ascii?Q?FMxdBAm+jCL720T6dOFb1w/LcNgH/chZ/5f7zZET8ATeitYv15ramctFmHMd?= =?us-ascii?Q?+BEREy/q8D8AJ94KU9I1mAmpp8Dtl/SEFrpnj3KjIY4zi9TGfjlkVur3JnUp?= =?us-ascii?Q?K/94e5JiKd2CsqFqlT82xga8zEv5ERfCCcWQoIf9DJVAthkAnMwblSZQlsH3?= =?us-ascii?Q?EwoMn6zZIPiIXV/k+GLHyPSHrxgZ2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Q?bZ0jQLEKqI2l8pLU9NGcKe+owHnLj0V18NH4Njct++C80oLahFSlufhiN9LV?= =?us-ascii?Q?v/VbF3FKLRYR4hnmI2kwbvzL1ShXIdDOZy9FiUMdG2bdVDDlIOWz36f34D/8?= =?us-ascii?Q?JpfK2QM=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(1800799021)(52116011)(376011)(366013)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AdXp6778BTEpiv4iHoV6Qd5RMiYeR77mJGpiX70pumXKc3M9lN7OvtfkhpCS?= =?us-ascii?Q?OZ+Cnq0E+jqCzMDy/b9rI/kTiKldtl6FbIrAA8xQG+z7S19QvOFjCF0It3pg?= =?us-ascii?Q?qq1KomaUSMVH8rG5MMrWb1Z6C48Labu7uUkVr/HP5V6VD/0/0QCPh4K8LZ3V?= =?us-ascii?Q?ENS5Zq1eivU/AFWL1Kmmlvssoqg5zGLiRTbsF24O8ljeAxS8cZgVAd+HZhti?= =?us-ascii?Q?W8uDCn0Vrid3AYma/T9L/ozJNyMzfV1GC0/80FEahQE2hs+6H7heEjVvWE66?= =?us-ascii?Q?F6z0RVdwUjjXyBpFDYAWz8tq0jph5Suw4qZjD8NXTUsJqtxLEZ/JLxf75NaX?= =?us-ascii?Q?AJ5sTCzTP0fbguPpAOrlTvDBNy4qv36a4aM4x6q5zuR+OuKra3RjYIZVwqpO?= =?us-ascii?Q?VAnAYUuxJV6FnGpG3/nQxmEewQ5fbGZrXAH16v9c991SaYpNktxkHYM1umao?= =?us-ascii?Q?xYjyBnOVBCmwSNTCCHhDBRTSqzobG2De+wUsqaiWi+Cl1+217ci8S1w875r5?= =?us-ascii?Q?iA2+pYYaVMViaCljqt2f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WhN1yk?= =?us-ascii?Q?mXAeMRA1PurbM4P8y6Fx/+eZrHrOyIqskv5e8S6FL6dR4BtID7LPsvnwgCAD?= =?us-ascii?Q?IJIq37fvBVLiG+duHY7rDMunitDci52J5NP41JwEwb7jftHQVky/FrasVZnn?= =?us-ascii?Q?TIX4ELuRnZ9vqVPUr5qmt7NtlP7cb9nUqoKDXd/P01aJ/RxS4dRx6Q069wen?= =?us-ascii?Q?TA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c26f004-18c9-493b-f906-08dc900a7f40 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 02:49:54.1673 (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: irVTdNq/71rMMLdnotvN1g6djL4NPwThfTc3oqfHvgHJqJUsO9WkwA/CaSIwHtYHSk6b49KNXlgo6+THQW4moO6Ao8TXRFzJBY3cio/Zm84= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR13MB6166 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Long Wu Use Rx offloads flag to control VXLAN offload configuration. Signed-off-by: Long Wu Reviewed-by: Chaoyong He --- drivers/net/nfp/nfp_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 3e148b6956..219265035d 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -283,6 +283,7 @@ nfp_net_start(struct rte_eth_dev *dev) struct nfp_net_hw *net_hw; struct nfp_pf_dev *pf_dev; struct rte_eth_rxmode *rxmode; + struct rte_eth_txmode *txmode; struct nfp_net_hw_priv *hw_priv; struct nfp_app_fw_nic *app_fw_nic; struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); @@ -364,10 +365,13 @@ nfp_net_start(struct rte_eth_dev *dev) update |= NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING; + txmode = &dev->data->dev_conf.txmode; /* Enable vxlan */ - if ((hw->cap & NFP_NET_CFG_CTRL_VXLAN) != 0) { - new_ctrl |= NFP_NET_CFG_CTRL_VXLAN; - update |= NFP_NET_CFG_UPDATE_VXLAN; + if ((txmode->offloads & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO) != 0) { + if ((hw->cap & NFP_NET_CFG_CTRL_VXLAN) != 0) { + new_ctrl |= NFP_NET_CFG_CTRL_VXLAN; + update |= NFP_NET_CFG_UPDATE_VXLAN; + } } if ((hw->cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) -- 2.39.1