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 62DA843795; Tue, 26 Dec 2023 08:28:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 051DD4029F; Tue, 26 Dec 2023 08:28:47 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2093.outbound.protection.outlook.com [40.107.212.93]) by mails.dpdk.org (Postfix) with ESMTP id DC18340298 for ; Tue, 26 Dec 2023 08:28:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eyqr5PbGQxrFkVodQ8fyn1vJ3Myf1BAGMYi2+glk4nYfI4ML/QnlOesBARMTUZJPjqGiYW+oJO4QotexqiPV3Fu52y1C+iahZmqoqunZzZeXOgcvX+nc7p7tHvK0nvzYmp9c3Vf9PIm75Rb5sNQI8ENcybe/lyg16THN89XBIEKrNvKNF8OX/gSlVbt5xuifmn5TjJwIVo+gW4j2+qRAjVBcScerig54Hl3NTpJMAdPRWLWcmnEVi1Zg40GQyEqj6IIm8pJk309jfKseDnhSo88tyUceduChMH5kAhRGkRhb5y5PKYiwD6s5k+qZ53b+LFaUwsmc6hgjh3PBNALk3Q== 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=j3Kizctqd75NSUjRLs/5zNQg22+E7fiLFUoHoQqP3u8=; b=akOn65mz6Kc25WbDAsaXJKE63RZAqhnKljv/k/84IORgjZN7MrQR7iLp1Mqu6JCNdlcDV7f3/PMnR3A6cp8HLm9r+i5qcYBMhltPrUDBYXtJxTX0WMfcFYbsGdfnrlL/7Q9rEO27KP2FczipJ1HUhpKia6l+EFnEq0suDxqXBzlC5qFagiphfLIr4Im1TbxDdIfyIh7vqzRz+ENy1foYxDZHitkgoYmu1CtzhdvYm0HMFDYN+E7lHM8RpeUvJr6D5JVdZliL0NQR8vztJev0vlGJVOyUZ0FOkeYXPKDKAAGLGg0bgV3EBwMPXjNs5tzTAodTpFhZNbN0aOT0bbHNgA== 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=j3Kizctqd75NSUjRLs/5zNQg22+E7fiLFUoHoQqP3u8=; b=UwBE7l5zxLO/Qi1uR6O8RzS2+UeHSiExPCzAloezjPvHGk6l4pfSGN6omJsudhFJ/5ImOoEJlzrtxSvq8DhKL28fEgn7dVJ3I9xOIzv3eP8IMH5molXVrd7G3YHiqw6hPRJLnSJb80e+a8W4KTT5yvf6XaqfXhx+3ELx5HWBHzw= 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 CH3PR13MB6506.namprd13.prod.outlook.com (2603:10b6:610:1a3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Tue, 26 Dec 2023 07:28:42 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.7113.027; Tue, 26 Dec 2023 07:28:42 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH v6 00/14] Enhance the bond framework to support offload Date: Tue, 26 Dec 2023 15:28:10 +0800 Message-Id: <20231226072824.3163121-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231226023745.3144143-1-chaoyong.he@corigine.com> References: <20231226023745.3144143-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0239.namprd03.prod.outlook.com (2603:10b6:a03:39f::34) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CH3PR13MB6506:EE_ X-MS-Office365-Filtering-Correlation-Id: 02697183-0a36-4f85-c011-08dc05e4497d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sn98m9O17Negr84sPxyE2zdoxuXy3H6Q88oiIVnpVo4ZSzqNy3Cwe1pxpKikLMaPESAvR4zEwGP1ANQt/k0FMYorUUQEAWBHzgmfgJMmmPnQnnb19x3140NvoWN7mj/DDC3WY2Ncm2xaAGbF2rlILNm760PRp685ghINmOTR9NhP/YU0HCRAnaWwybRSgkr53oj/zw3+1PSTsyPNgj7j+qkvzI9HXSb+9rtahwv7Ox+KdQ+yJuJP4QUrw5NfxlZ97rsVZ7tfNQ7wRLVt8qlm1njCC+wmzv0MslEfeRof4xPaxz20x0JS29s7gXLfR1+L9s+be4YtGwepJqmZOagsKMobbMdsVErLMO8i/9zkJIcoPYDurdjr+jAa9AZkzBTRyDRKdvHSwgpo85T3P0Pays9Czs1XgL6CQEUE8QoJ4eXM0hvqndUHl+EXJ1EFxD+YzliUO5QHCbAK9QoYWUnIbAMCcdAaQBI4vw+dBo8yKvxpfKewaSUS3umXfvf0USCN96MPO4ZsS657c9EZQih1DMGLxbjhvK5NpivSrfWwyQaz0DLo9loZWY9wirnNT3p8q2UPGaAm9MsOnmlnNxv9ZEBZw79GPZeYZpxG4Cxwj4RvQoagodQxNXdM3eXsAxdY6CaRduMNRdLcbfMC98O7yxE0ZkTWr52dK+cyZO3pS0M= 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:(13230031)(376002)(346002)(136003)(396003)(366004)(39840400004)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(107886003)(26005)(1076003)(52116002)(6666004)(2616005)(6512007)(83380400001)(5660300002)(44832011)(4326008)(8676002)(41300700001)(2906002)(8936002)(6486002)(478600001)(316002)(6916009)(66476007)(66556008)(66946007)(6506007)(86362001)(36756003)(38100700002)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?v+IDDfM+S32CLCNGqBSaqtlVDXsaNPZYc7QoaKcPb+FHhOzx9V+yxSsW2fUt?= =?us-ascii?Q?7HL8Z24z7GkSPzA8XEUQCen7uKB6tdL4EV3I/FOwT4icy0Ufe+5mmslR/5Ea?= =?us-ascii?Q?0Pc+s1NNiW0kTw0+VC7WV1wGbJYmZJvt2IyNQJEiFPrcg/n1L1UqLGrtRi24?= =?us-ascii?Q?56b2qWYfrumHkRDYuhaNC7WB5y3ne3QKFLw9pUYodfubrz9poNlFEYiGDMjQ?= =?us-ascii?Q?aXO/7Lye2rjkQqynECeHYOF0nwZ3ze+aoEwsGNHDR6X5vYpDzhulm/gI8yWj?= =?us-ascii?Q?6lYa72XRFDB5al7wldmGGFIZpIm2I3Tr3SCozFNcfz9fjZ5Uv8lnyknhK6S+?= =?us-ascii?Q?0gYujkE8cM54k7TpB+8qz3aDCPZshzSipntPF5dVNsUGqCjC7kPpJqXWylpq?= =?us-ascii?Q?S5JWtlASOKwUrDpEvg55486eEJLAzq4vphbVsgcxGVNZYTf2tCjqDfcLO0lP?= =?us-ascii?Q?ghJ5XgtndOjksr8899vO+5pSE/ZBE+lVnhveJVDP59RpGadeylSuCd+6whtX?= =?us-ascii?Q?VQ8lEabjCnsJglIbaWrMB0ze5i3C5h+Is6CkJNU33RDiYI81uBu60PW1wi3K?= =?us-ascii?Q?OO1hXHLT1QBrEwQxSsyDpy38MUuKuKstX4cKchSBAhyRhMuhCigXEBkTxdkd?= =?us-ascii?Q?Y6821x3R1jgpFSXL0lMNqf5eSicqwJObIre3jxWTPtZjrt5AgG5m6eTTbVAK?= =?us-ascii?Q?furzPXdBEYMsSh/8zfkEqgt4EKWgGNmUprohDPkedm3rMtzc53Gi/bhmiRaD?= =?us-ascii?Q?lt5SGLRgN4BuUQUwq4AVHEJ4Oka32QrT92aXF33JsBNMln/E4mhp6jYtzqSD?= =?us-ascii?Q?Nr9AxLzakQII6lpcStY7Ru2MGw09qEQzduppw5m1uxMoz3/gKmcaASQDakEx?= =?us-ascii?Q?reN8D1mC1bLnhpUqzWSnb2Ryj+rNBvT6opCWJPTiaSJOHg5MnNfsqfDim/Ep?= =?us-ascii?Q?iqlSuowcSDw4LxNC1Hh7eqaDuTY5ZZjlTc5AtWikMBlCqB+70tBzsPb+bXl/?= =?us-ascii?Q?LXKDONrL5k27gPmxWjB6RRhf3GNqp6ig5s++5UDd46O9ECrof24wlR3xh0PK?= =?us-ascii?Q?xX733VW7SOk1ZCWWJ+smFfW4+LBHisSX2RzWOfatT+ElE8OHguD6Md6aN36M?= =?us-ascii?Q?am3iCIMASUghPD1jqYE9rfSdgMf9TDbgeZpmKtUU6o+aYycYYe+Ys38f7I08?= =?us-ascii?Q?I/fQD+KNv7pMvPV8/n7rbLqRWrcgEA8zRl9Zyl6LPfkTUuWqDoAB5J0JNM9i?= =?us-ascii?Q?R63pFScXJrDg3IL7ZloqvONIQQaLcFv7CzR9hRPxZxoNox2fRJGigJ5iRvyQ?= =?us-ascii?Q?TE13PiiPhuXalVHAD6ryaHDunW8fAbx2UpLt7+r393SAf7SpJV/ISGcRUxud?= =?us-ascii?Q?t+nua4O9vlITx2C9JhT40RvY2Yh1QfhvArhYnOhXvgg8+/OiRzcP4VjJdkPL?= =?us-ascii?Q?XQ8kkFj/mx2YHdIIzeXrA4kA5O7UN8oc02q/FHa7UyswAQdWxse9zij4qQhE?= =?us-ascii?Q?dtk60OadluJudLbCdvUU07vQ3Vx0sCGJeRk3D4TMJrWtIjvlkj/hvUYLVElG?= =?us-ascii?Q?aJbIHvgA2A7ASoiE61f4O2V56UmW4Do9+QqT205rdNnxOjk+ZPDyLGSA2MCB?= =?us-ascii?Q?YQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02697183-0a36-4f85-c011-08dc05e4497d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2023 07:28:42.6820 (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: njpjO1J3NbDnKRH2DZky1VmaF4MBUYGjKxHjJuJ9hMlpXMQrukVUPD5LmdYYwxP4LRuJ6u3F7O1+52mGZ0dx2wfbhzNJx0aXbwAp5TYELpw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR13MB6506 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 This patch series try to enhance the bond framework to support the offload feature better: * Add new API to make the member port can access some information of the bond port which belongs. * Add new API to get the result of whether bond port is created by the member port. * Add two command line argument to control if enable member port notification and dedicated queue features. * Add logic to support add ports which share the same PCI address into bond port. * Also modify the testpmd application to test the new APIs and logics added by this patch series. --- v2: * Fix compile error on github-robot by removing the redundancy function declaration in the header file. v3: * Use the hole in the structure for the new added flag data field. v4: * Drop two commits not necessary for this series. * Modify some logic as the review comments from reviewers. v5: * Add a new 'rte_eth_bond_flow.h' header file. * Add the patches of NFP PMD as the example of support bond flow offload. v6: * Try to solve the CI build error. --- Long Wu (14): ethdev: add member notification for bonding port ethdev: add API to get firmware creation of bonding port net/bonding: add bonding port arguments net/bonding: support add port by data name net/bonding: support checking valid bonding port ID net/bonding: add commands for bonding port notification net/bonding: create new rte flow header file net/nfp: add bond firmware creation initialization net/nfp: reset bond configuration of firmware net/nfp: handle link event of bond firmware creation net/nfp: support bond member notification net/nfp: handle bond packets from firmware net/nfp: support getting bond firmware creation net/nfp: support offloading bond-flow .../link_bonding_poll_mode_drv_lib.rst | 18 + drivers/net/bonding/bonding_testpmd.c | 128 ++++ drivers/net/bonding/eth_bond_private.h | 24 +- drivers/net/bonding/rte_eth_bond.h | 88 +++ drivers/net/bonding/rte_eth_bond_api.c | 122 ++++ drivers/net/bonding/rte_eth_bond_args.c | 47 ++ drivers/net/bonding/rte_eth_bond_flow.c | 1 + drivers/net/bonding/rte_eth_bond_flow.h | 22 + drivers/net/bonding/rte_eth_bond_pmd.c | 94 ++- drivers/net/bonding/version.map | 5 + drivers/net/nfp/flower/nfp_flower.c | 87 ++- drivers/net/nfp/flower/nfp_flower.h | 13 + drivers/net/nfp/flower/nfp_flower_bond.c | 691 ++++++++++++++++++ drivers/net/nfp/flower/nfp_flower_bond.h | 165 +++++ drivers/net/nfp/flower/nfp_flower_cmsg.c | 35 + drivers/net/nfp/flower/nfp_flower_cmsg.h | 12 + drivers/net/nfp/flower/nfp_flower_ctrl.c | 106 ++- drivers/net/nfp/flower/nfp_flower_flow.c | 232 +++++- .../net/nfp/flower/nfp_flower_representor.c | 35 + .../net/nfp/flower/nfp_flower_representor.h | 2 + drivers/net/nfp/meson.build | 3 +- drivers/net/nfp/nfp_net_common.c | 25 + drivers/net/nfp/nfp_net_common.h | 1 - lib/ethdev/ethdev_driver.h | 38 + 24 files changed, 1951 insertions(+), 43 deletions(-) create mode 100644 drivers/net/bonding/rte_eth_bond_flow.h create mode 100644 drivers/net/nfp/flower/nfp_flower_bond.c create mode 100644 drivers/net/nfp/flower/nfp_flower_bond.h -- 2.39.1