From patchwork Wed Jun 26 01:28:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 13712152 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 DDF56D2FE; Wed, 26 Jun 2024 01:28:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719365336; cv=fail; b=qdOQiyjIiBHld+X2uOzVTy0ykgAVk/Dz/Qebfe83vUq0QvndBp5eYdqDkBLqMqKocYINlAe+Ehbs7ujW/Bl6BJDyVNOy+W6DvF/2sSyOsUVwHyIFkZRCMh8tp5D/XNnj7P2qd+cc6QJCBYQI/uVmuINsXwl6mIjevvC48hYnreY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719365336; c=relaxed/simple; bh=dT8bHORSQArmW5ObutG45Gd9W4ZJDznbpdpFkRD1lw0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=H6hUcEcQceVodLv0y+8C0EZfsI1aeIto4UK5KrijK5jyBi3HxVH8XfJIlMOHpN3jiSWWnvMXHbPI53XTJYhBGFY6A8nMbAf+wbmMQuNxg/DKyvP2u+DLkwvJ03P6thWzv625d7ivQZc3yFowQ0X2Of3WJmbtMmE/ysJG2LSVXl4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=B1L3hbpm; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=DlTWHN3g; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="B1L3hbpm"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="DlTWHN3g" Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45PMBWx0022430; Wed, 26 Jun 2024 01:28:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=46y0gUo0UIxpsHUC2NN6BJbOnltYGX0sUUFMBccxVqk=; b= B1L3hbpmxDN9stZZIqwPJmiHGPNw5msFgM3JvcXECcJsvShqi16ZqhPFACp7tt5j 2YJ/+aP9BvGs7pi+BnuC34zsIP6CRlfb7fbtrCBQgFzsUVcRL7JkueuAZ1w8lDVz PpzrxBLppUmnbJTO0pQvFkw5lQJkPdOUWofw8iEmhMuJIJD5316zSPFwkmEjs3vn Yyc3Yi0B12n8V5s32XuBkFWE91FDJXBaSRuvvKxp74BJvrFAUEaHN+SgixyoHIsf OP4Nty++6INmBLIIEWfXJjszTkLt4qqCO7UNGa/z2FJf+4ZYfBNkE80+lRBdSf8n X7BN3OonZxgwwHv4if4eKQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ywnhb238s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 01:28:51 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45PMxQNK010948; Wed, 26 Jun 2024 01:28:50 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ywn2ev3dc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 01:28:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mehi6pVRL5z5U7KI6bVlYz7zQGvSbtujb84cCxF8xq9XszCnJWOjnjZH8H6RTKaSzj83/PIJA4qFy9WNXoGYc6sWzg+XDBFP1GoI4nSP0FwqslRy0dPm06zjW/ywgM4ZsnBJ+r/DKVtQ1TarwWweZDpNSA5crdUpe8C3B5PCgH2Crvkcv7ezSULirvHedD0RozZBrYrDRk+UpirVwO7Q41nIDS1ZDaO0C5DhFoep8N1+GBtR2oRcLjGwjjR9Jz4AxIQ3SRh0Lpj9tRVRqum54Urbyl//Ce2Cnr+6iTRZWQPbdAuKMLLOADMln4hZaCkvOL4fb/zDJvCIOZHgxwFo1w== 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=46y0gUo0UIxpsHUC2NN6BJbOnltYGX0sUUFMBccxVqk=; b=kl4g9AzedsYjzOPDgbHDU1H2VItwOGQQ3NYRRK51Dw1yBh0atdAbSwiYZf4MlXu8C/9pOYmkPyeB6viKrhAoILq1VLB800bZ3ram710G++pPzYonzgBEIvHoU9JJ3F4AhiKq4PvE6GosSG9jtZv5KJz4aTAXipKeYOUjAjqBgMWB9iX02+2ssHaT+LvghhMp+G6IgvG3jt4YZy53hmw5bP7bdfK8BUg7GnDRganYqFU4R+7Zjps43c5h2pyrJBsIaKt/v99HwVAv9rToIJ8wXS374Kk4GunfVaCt8Q8E3uTtGYQUQF2oopwvmTN5HKRpmJoGKy5r5WlVFB7iNKlnqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=46y0gUo0UIxpsHUC2NN6BJbOnltYGX0sUUFMBccxVqk=; b=DlTWHN3gBqcPhLBt2ofVFXWvW2kbi7F4FOXDJN4m2W27H2G7yb3udfwAW7m82xwmU0OWVJRDOhJXA5ZHCiPRigJDkmKs6XFOrlYZ+HXmU2RL99v42AkA11MdL61pPEf2nhgwZvvZpHBB/k4nkkWUxQXviFm7I0bVA5KUob/XhBA= Received: from BY5PR10MB4306.namprd10.prod.outlook.com (2603:10b6:a03:211::7) by SJ2PR10MB7057.namprd10.prod.outlook.com (2603:10b6:a03:4c8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.29; Wed, 26 Jun 2024 01:28:48 +0000 Received: from BY5PR10MB4306.namprd10.prod.outlook.com ([fe80::b78:9645:2435:cf1b]) by BY5PR10MB4306.namprd10.prod.outlook.com ([fe80::b78:9645:2435:cf1b%5]) with mapi id 15.20.7698.025; Wed, 26 Jun 2024 01:28:46 +0000 From: allison.henderson@oracle.com To: netdev@vger.kernel.org Cc: linux-kselftest@vger.kernel.org, rds-devel@oss.oracle.com, linux-rdma@vger.kernel.org, oberpar@linux.ibm.com, chuck.lever@oracle.com, vegard.nossum@oracle.com, Allison Henderson Subject: [PATCH net-next v1 1/3] .gitignore: add .gcda files Date: Tue, 25 Jun 2024 18:28:32 -0700 Message-Id: <20240626012834.5678-2-allison.henderson@oracle.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626012834.5678-1-allison.henderson@oracle.com> References: <20240626012834.5678-1-allison.henderson@oracle.com> X-ClientProxiedBy: SJ0PR03CA0203.namprd03.prod.outlook.com (2603:10b6:a03:2ef::28) To BY5PR10MB4306.namprd10.prod.outlook.com (2603:10b6:a03:211::7) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4306:EE_|SJ2PR10MB7057:EE_ X-MS-Office365-Filtering-Correlation-Id: fb7d1ac9-aa39-4065-9d58-08dc957f527d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|376012|1800799022; X-Microsoft-Antispam-Message-Info: zmGSgQEUWhIgCGlI/uPoX89D2vBX4k2ubVxPDFk71LV9kXy53JB1NGglN7g50Bx8qJm/lSPKbP0lpCRNChYs80K16lqt4QCEzBLOpfdt1YbbqXtwFbAjNmQ+GqQU2JayqjEeW6gtfqFJkEi7JfzhtdkHshOw15OsBW1q3NIBojr2l+nWcMW69gbYixm8U75udH2iQ8pIq3DEOf+KvH7nK6M1jaiHGpRSNPN5Tji3fxfpO69RBmgJJ57WVVhGHNiGv8jkpUDRZw47iAqEudtP4g7KHyQWtybWbr+pzNUlJCuoLjBJqglPxEbiABDeisy5FpA3XQg9uceYjrIQeXJgxSBF2u8+nGYd0yNZhsBwykmyDeaSzWdALDTWWcLqzSUl+3YsbZfmYrO44md3zgSpKNSsyc/7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jleJ8yd9NZ2N0vlEFTHfGEt2NyD5fgnAtlcFjXoDcU9qlqFkCRupZYfdNdzQYt+mPE/EAl3jwBaNEAKBp6ZUvZAMmtjuNI54WKM+mNxaOjiElDv2IQ9Qb5EtEyMCY3u/MGUWiy0CKoFLTOlhDMs2p7jR66ly2gozSYHEJbPFjQpCrRjMFKBPlgbhtrwvjncOAwP3wkMsx1jK+YbhzRtfzI8vVWB/hoAKSYiQw6gJTu5DBeRUvaECMU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb7d1ac9-aa39-4065-9d58-08dc957f527d X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4306.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 01:28:45.9512 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9q/Aw/jxtBPSfeEcTxUDF5kkEXu1zCnVFc1wLiwzBwbCsp92X/a9gjEHWO5pkAXgA+I/J1Cg9mJbI/7Sz7WC+JG3UIfJw/hW408to3Q0dLY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7057 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-25_20,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406260010 X-Proofpoint-GUID: Cd63ySH20lELtFrPsiU35n3vrmugAGF9 X-Proofpoint-ORIG-GUID: Cd63ySH20lELtFrPsiU35n3vrmugAGF9 From: Vegard Nossum These files contain the runtime coverage data generated by gcov. Signed-off-by: Vegard Nossum Signed-off-by: Chuck Lever Signed-off-by: Allison Henderson --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c59dc60ba62e..8ff1b4138c56 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ *.dwo *.elf *.gcno +*.gcda *.gz *.i *.ko From patchwork Wed Jun 26 01:28:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 13712153 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 82B0FD2F0; Wed, 26 Jun 2024 01:29:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719365354; cv=fail; b=JNX0UKD+cPgWNGHrQ3Zrxzv6cuuqdCT2d92kDXbNfAgO0R0X66c+exEyJhPxm7mu/HGG0qJnzm1vOiT3T/pBxH+0rzMUbj2Hcv0LQm2Bpb6hyKryOl2/muJDtWcWETlQQ9FH7CVhHcyaqDs8DD0G0wMly6I9FCyQiVR10MEay4o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719365354; c=relaxed/simple; bh=a6USTozOOk4ibYusmm6Puwl18qksV8SbIIp78SZ7XBU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=uA7AB5FAsJKC87eOP33WWRQ2NkhbAfh4/Pq9DCi4e646ZzfIOC2kwVduKFiaBWJSxUnyUHBgaOOchKcxgdhcIgN63GXjCJajh+o6tB7Kyilq/jcbaKIkOgYeDc5aMTKOsRw+YC3O/Wa/8RyhDw6XRY35pUaYrTkEYm4OeGzTI2w= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Gjli2Brs; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=qi82yCqt; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Gjli2Brs"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="qi82yCqt" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45PMBVSC003074; Wed, 26 Jun 2024 01:28:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=QNakxFB1cm04kNOyVqQ+Uuqbdo8PfCWEd5SF7Z8r2Ys=; b= Gjli2BrsHqBiodzCQ9ZLnSQa0UgxyTbpi+7cuBn/qGtxJ6C8rCHByyd2oCAi54bf ArtqLRvAzCaoS5lGOBDY+c8UoZYk3ouD4phT7tlrFLB72cpCrG3Ri5p+ApHU7f+D SY5x/gGGvV7/q84UnkiBGcaKoxlx0Fn/KPXWb+oYkBymq1Hr5cWkSPR52T/2yjzT WXxfx7voZAhLj8eddytf4QEd4gtCHoJoAu9CKQ2DVLVyr3WA33jZdqP62MmF6pkm tekuGbvlM/krcuN/XVShdih2RZqOS5pD26YgZfJJ2LiyrpnLvPDNtSJb0O7rHmQJ sjb4l7zNPdnRi3tvIcjI4w== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ywpg99u7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 01:28:52 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45PMxQNM010948; Wed, 26 Jun 2024 01:28:50 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ywn2ev3dc-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 01:28:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NdNSGCbtIB8dGeni+Aq3uf1Z3tmaEuAMPT24YIvAw8FqOSPzAPn6mDIkTUfWNnUjJt6nLid2GZhJe1h0ub20eGkARXFjrjzR34gWIyypYsSROc/rZPPNdzEalwcVSda2+CbpUuCMpbctBJ0UW7OCge8PX7ZYMXWHZ9mPyA1Wp2rbSvBg3R9oc5nzEDpWVBtes8QYFaPd5vSE3KHv4J9WHe6HiEKNZWiw+sWs5vMCzpiiwMaDyo2yrQZ5cJ3xRgBxjzrj6EbJMdAJoJcOhApZ4NnAg/oYWZ4ePoQwIf0qaM2ysZLNo8mK92svMqZvQDRaXf7WUk72BJcnQWLlNXMn8w== 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=QNakxFB1cm04kNOyVqQ+Uuqbdo8PfCWEd5SF7Z8r2Ys=; b=hbCupJipr4IJDvf3SFBQGOAgxdI9Y3tw/MiW+BQx5CLC2WErok4yWvbPKvTxERdiqjdOz7B/QUE5mF1HyGWzAzbM3jtYbLWxMF8LrPdTaisrLElUlEQrEKkcLh5gzyN2Cp++T9qlltpBcyzDMJVqQJ+MnHdIBm5s8z0qODtwOEayloEudysOrsOnS5KI9d8s9uzy3cGnKAX7PFkpzJKrC2WQW0aly8/7z4auNKTHZ0Ne7wNtPR+LNnMT7nz8YymHBv6fxeQGqarl+IgHoetbNe8JSoZv3IeOjeRByvr0Hvo7FepxBUBJfCfNdrj/+NctPVLUQUOunCBRQ3s8IknY4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QNakxFB1cm04kNOyVqQ+Uuqbdo8PfCWEd5SF7Z8r2Ys=; b=qi82yCqtV5JHYhxWLgDQu+F+hXrE5qyWPqRKFy2UTnNSuj+C2xXkq48ITe3p7ZtuemPxQyr2Hd9N8Horxrmw0ZUQexLKLvSuYViPMp3Apt2GDa4Fks5e++wQs8HH2zn4oi4uHt2d9EcGsWkLiePQarQVH+twoANYnhVXjIW/lkE= Received: from BY5PR10MB4306.namprd10.prod.outlook.com (2603:10b6:a03:211::7) by SJ2PR10MB7057.namprd10.prod.outlook.com (2603:10b6:a03:4c8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.29; Wed, 26 Jun 2024 01:28:48 +0000 Received: from BY5PR10MB4306.namprd10.prod.outlook.com ([fe80::b78:9645:2435:cf1b]) by BY5PR10MB4306.namprd10.prod.outlook.com ([fe80::b78:9645:2435:cf1b%5]) with mapi id 15.20.7698.025; Wed, 26 Jun 2024 01:28:48 +0000 From: allison.henderson@oracle.com To: netdev@vger.kernel.org Cc: linux-kselftest@vger.kernel.org, rds-devel@oss.oracle.com, linux-rdma@vger.kernel.org, oberpar@linux.ibm.com, chuck.lever@oracle.com, vegard.nossum@oracle.com, Allison Henderson Subject: [PATCH net-next v1 2/3] net: rds: add option for GCOV profiling Date: Tue, 25 Jun 2024 18:28:33 -0700 Message-Id: <20240626012834.5678-3-allison.henderson@oracle.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626012834.5678-1-allison.henderson@oracle.com> References: <20240626012834.5678-1-allison.henderson@oracle.com> X-ClientProxiedBy: BYAPR21CA0027.namprd21.prod.outlook.com (2603:10b6:a03:114::37) To BY5PR10MB4306.namprd10.prod.outlook.com (2603:10b6:a03:211::7) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4306:EE_|SJ2PR10MB7057:EE_ X-MS-Office365-Filtering-Correlation-Id: f61d1dc8-14e6-4df8-14cc-08dc957f53a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|376012|1800799022; X-Microsoft-Antispam-Message-Info: ig/VcK1kc9vodLVoEzp4UeO4fPT5pgQ7vrzXfwszYQhW1sCQ+YXjyXypRYKRV/cfVUeuwD/eskDTKkozNPg5COnr2SAbulj7n5rdcjUEtwkvO6BMIQ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ec1wF4GwkuN+GuU1TmwFrW0TSgaPgY80xYSH5KkV/kmsR3PE6K9fEHmGG93q3XJkeg3aIQ9hDURQPPlcdJ/9KPnQw0GWCRitozof/9HPX0C9fAw3JT2KDB1+yDBmNsm4xSB31bs4AmnjjAyBIj1tm7JbH7hRmmmXww7NCFFt8q86S7cQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4306.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230038)(366014)(376012)(1800799022);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: o7bAL34Rr86htxqAJNzFjv/SfUvfI+jbKUesyDWgWA7Y0UuTLbpTocRuEXT0s1DMlvZlMPOQZoGigrQRPLyjDGMrmx5+BxV4tz0ex19jFCRF/gAgZISJ5VBBAArolad8MXTPDHUu/HJzv3rHaaWJs34SQCQvn8rQ/7Fjv8nH4xyOyDDyXB25MQpZx5cea7PNt5u8tkxKZuQWB4k1GA8Lne2UX3ac3IviJsLo6/Yj2AKv+o7Ns/fPwnwQu+pgk1Jaxxv5ca3J+3mVXLYAMrQFV8MVD1zwZnaF75IOr8KIdXXXUnwsdaGYnmKRYf2ctTKFN6H/dSEj/fvpv6vz2/Tap42H7pPMCrFQezLNIfgrDihXUvExtvPD1l6QycdHXIH2Qg7WeDy4DVAS4GYiKgraAYjkFnG9L/PgbuGBDuJI4s+OatNariWNktxaXlBcVsmoU5tKf5/R0qmL+RVInGKAxcEMQpW74MIKlqEH4lZEcALpj4tHL0RL6b10gXU5m3mSjdAdhiDJMAnheFhfVDgbODAr0I/cUYPAHS1rNARsK4WOn3St6rR3H0ltyO1yrRV4wkftjDoNEVILSu6AcMVeScMjoiaoB38ZFqcUq1uUzwLDUrqPU+Ifx3iQe7v7b1eAAmuMHqBBk63MEUkRlggWbH8s9f+H/5ghlUJjKWf9ga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AvdekM0rXC2n3MxeAimurm2xfRBcVlZeYrO9HhUesoOe7pQoftAiLpTnQ0mIgalvqnZ0GNhRJJNGhDNqkcZ5f5Vg24CeHqm1Uz8II5f4RT8a5ehNZKwvrNfQYaCHcUFb0rTDHkAcI07dQzErU6h0g99gBHKPxa/TZBYdRhuMyeQ+dngi8o9kOjnp6RPP6z542/9Hs92xCfL3pZBdiiun9d+cisfLRL7F6ITy+6fVpffeyL7YPTqhk7cRoTjIC59pFymjnxJlUs2N+3OFlfoYro3+rg2SOEgJMN9fvui99+Pt4nAQ/ne7dZKCF5qikuNKjFmADX8CE8Lin3oF/6nKPqJacQwbtY4q/gQr8+mGnup/mBENxBncmmU0EY73E0h9NV7mipdV3gWYIJa/wEHivUzmrPAnoXQgD423dYv+ok+9PKfgPVxHagijuTrA+zU4Erx89PhPq3aRTQdrLCqHGVncVfaDsIUty2TycyRpp8bvZw6CdlLGh2r5k1Ta2pfKrbFyCIvFKYVquOidtF08LSafJlBGinRSzPFcIZ/IzfpWHdc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f61d1dc8-14e6-4df8-14cc-08dc957f53a2 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4306.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 01:28:47.8555 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cmTfg0w7wGxpIuEi6pZFWAI1tHLwQ3BGUK8Nn0MiiqDfUbKNXgMTaA/dRq+0MTfiST/+mTl00e8AzhmU89/OAqDsfMFFL8I/fY+SljCHn2c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7057 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-25_20,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406260010 X-Proofpoint-ORIG-GUID: Va2MESJab62c_eFSRSeH45ZWYDR_itOi X-Proofpoint-GUID: Va2MESJab62c_eFSRSeH45ZWYDR_itOi From: Vegard Nossum To better our unit tests we need code coverage to be part of the kernel. This patch borrows heavily from how CONFIG_GCOV_PROFILE_FTRACE is implemented Reviewed-by: Chuck Lever Signed-off-by: Vegard Nossum Signed-off-by: Allison Henderson --- net/rds/Kconfig | 9 +++++++++ net/rds/Makefile | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/net/rds/Kconfig b/net/rds/Kconfig index 75cd696963b2..f007730aa2bb 100644 --- a/net/rds/Kconfig +++ b/net/rds/Kconfig @@ -26,3 +26,12 @@ config RDS_DEBUG bool "RDS debugging messages" depends on RDS default n + +config GCOV_PROFILE_RDS + bool "Enable GCOV profiling on RDS" + depends on GCOV_KERNEL + help + Enable GCOV profiling on RDS for checking which functions/lines + are executed. + + If unsure, say N. diff --git a/net/rds/Makefile b/net/rds/Makefile index 8fdc118e2927..3af1ca1d965c 100644 --- a/net/rds/Makefile +++ b/net/rds/Makefile @@ -15,3 +15,8 @@ rds_tcp-y := tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \ tcp_send.o tcp_stats.o ccflags-$(CONFIG_RDS_DEBUG) := -DRDS_DEBUG + +# for GCOV coverage profiling +ifdef CONFIG_GCOV_PROFILE_RDS +GCOV_PROFILE := y +endif From patchwork Wed Jun 26 01:28:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 13712154 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 82B48DDC9; Wed, 26 Jun 2024 01:29:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719365355; cv=fail; b=QHC5PwJIa/UQMq2HOFo7CR2W9tliUviR3+CBd0xJvQmncEPQnoZpNRFq1uD2dcaT9bbKr/SF4SiBVpEekAh01ahfuc3hw60oSeE1A2a8VQw9NtYrt19aAKVjwpym/T2LOwGHi9A0wh5wGlM06iIaPFGsqJKEq8jjcsinvGAXKfs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719365355; c=relaxed/simple; bh=bHfOJRpmcl1dxD+DXwQwrl8nqV0HxhdoKYrrNML5wiU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=X1ah7eON1Y9nVfY+umxAwSjoE0kmiB7Z8opgx3I9cgWLWZwkUSFYGrwDdzWIXgjPHx35Vrb4V49xFyO0VrFlMerTwQZKhkTWIUY2gPA9zbOqF3UUQVrjkOvJwYTr2dmZWQraJqI3YxA7u95L5BuUGL9i/B2F1zOwkLk6KClWCQU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=J/bZa1jn; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=wyUETCTB; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="J/bZa1jn"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="wyUETCTB" Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45PMBaQt022455; Wed, 26 Jun 2024 01:28:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=qhzt+kqXKapR2+G2HsiEcWFO0zurdU79OWMvj+7lipw=; b= J/bZa1jngrYHRV8AagC6dzXxaIlll23FFO7AtTdPdWcUOG4q+FmHecFK5r/1BlBf 9t1aPHOHmKUQWM1SQneW8P7H8nhT2Zp3XG9zs7koDN4HuPB/ps8EFA/1y26UW3aZ VKblh1zqKJzZNPVrX/rXOpxFIzUkIOakV2PqY4X5rwEX4zADQM+xF9jnxQBOjZwI iyCn4UzymzWOVDILM2idc8/b/9WVIOBOukF4Bc9ez9Y/yEK8dPSBPztGfkAO84lr qjnq/yPYUXjPYi92tplqipuy5JemgAKboGSbTapw40Q+BeRjCuFDmX3anXAzdzGJ RNiZC7MJ9kVQfWqVLZu+oQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ywnhb238v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 01:28:53 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45PMxQNO010948; Wed, 26 Jun 2024 01:28:51 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ywn2ev3dc-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 01:28:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Obns7ilreE1LobOnr9+Pv5+5ZoNzZNLq2ZkWD8ujsfhUrgck2xM8tcoX6liLCWM3MWryCnBgRY62ktFUjajTFJw8XztfvTCsZpV9Ngjj5DH/PM+bNXCMIof/G1QY3WpudTscWgIKmIsT9z2iOf4qNAN4DLWGsBSN9GVnW6z8rUOvhUv5UKexQRFJd9enFudIPriIfu+YxtUWQfqeab+pt4wqgMy7GTJ4DGRPSvOeQdsf+Wk1dEyub44dwHpAidhoVJvYo/5r7lNkp3JblWycoUofDp2EDz9BTVq5G9O2lxkSwhjtA76C9RlIo4rRN1CEVLArpxEkHn7c9lZca7q6Dg== 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=qhzt+kqXKapR2+G2HsiEcWFO0zurdU79OWMvj+7lipw=; b=PCGgb63dSWmvYDubDJ49YByGjexyruDhDo2mZJ8DLbRlYiq5+rUM74anv7JVT53mUac2dPaEnGLTcEg2nnaSB9X9FSE5v1OgG8Z35QpVBEzY4CNJ1/3HwfX3lJAUN9SWD5pHKHBtuYlrYGZ2HlSYLF4KbdIzH1ZpJ9UTjv2phleyU7c93GAt56J0cv9nkmYJWqL5VA6Igl4KVEBdFbAHLflH5ECJZHVoqTvIsUvOdsB47fOPTTatfQ69uCCr9o/QTtr6283q4m3mOIadhjc2Owiz6r0vcqH4AJrDemAtkEp20wbs7H3wkL1oDHMHq46v5gC8pJYzpJ6vCOZZ7BhQ4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qhzt+kqXKapR2+G2HsiEcWFO0zurdU79OWMvj+7lipw=; b=wyUETCTB4ej9acJsl18WOv0Sdg54QVV9iOF5wU7VTOXeHBEEEuG3YUShriP/wT5ftVfwylsOxDhzXfnWhDED31UqwUkWe0Bk7LOtQW7I4lToC4hayE4XppPin1raEpSXtnzsmPFUsFpHzbyKWx5+XF++SeEPHhuyNL87TcgbQGc= Received: from BY5PR10MB4306.namprd10.prod.outlook.com (2603:10b6:a03:211::7) by SJ2PR10MB7057.namprd10.prod.outlook.com (2603:10b6:a03:4c8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.29; Wed, 26 Jun 2024 01:28:49 +0000 Received: from BY5PR10MB4306.namprd10.prod.outlook.com ([fe80::b78:9645:2435:cf1b]) by BY5PR10MB4306.namprd10.prod.outlook.com ([fe80::b78:9645:2435:cf1b%5]) with mapi id 15.20.7698.025; Wed, 26 Jun 2024 01:28:49 +0000 From: allison.henderson@oracle.com To: netdev@vger.kernel.org Cc: linux-kselftest@vger.kernel.org, rds-devel@oss.oracle.com, linux-rdma@vger.kernel.org, oberpar@linux.ibm.com, chuck.lever@oracle.com, vegard.nossum@oracle.com, Allison Henderson Subject: [PATCH net-next v1 3/3] selftests: rds: add testing infrastructure Date: Tue, 25 Jun 2024 18:28:34 -0700 Message-Id: <20240626012834.5678-4-allison.henderson@oracle.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626012834.5678-1-allison.henderson@oracle.com> References: <20240626012834.5678-1-allison.henderson@oracle.com> X-ClientProxiedBy: BYAPR21CA0022.namprd21.prod.outlook.com (2603:10b6:a03:114::32) To BY5PR10MB4306.namprd10.prod.outlook.com (2603:10b6:a03:211::7) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4306:EE_|SJ2PR10MB7057:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d7e8de9-a289-4aa0-cca2-08dc957f54a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|376012|1800799022; X-Microsoft-Antispam-Message-Info: 9F17SKFf0zP277mi36tdYWKeyCEAyKXIvUhDFoGfAbl0wYZdz9fRBH+gcS1w2TwpFylQgBhvUTsJxs7OdemyNDI0LlNZHhDO9vLuX303g8HE+1b0ejjmC35tv0dEjcckn4fQfCB5FUgfNtcq+mdD6i1b2P9+8kq7jRBxSf2aWZOWKbsT/E6dRv5VuCtICs5kEt1dI+4NWG0ffBOfeaPHvIsuZ2HXXWYFy7bdl9Fv1CgVzn9KaRwNvz+VdFHjdwJUDeMajAXOB53tC0xD35ssXILuOOHgI7LgsW++/2/fuftC0AgqFLeRA4G66C7iq/Ri00oO+wjBXhJcGry3F1Wm5xG+qeAIB/l1B9edbBcNIRg3Us0B+0OYDnkaF5T8L1Yt02MuDqfl5H1OLCcLytsN+FZaWIcEU4CsCj1DUv4b2yuZnLkG4x4pkVnd7W2zM6LlEAygQ0RmPLEWY+gw3kmS6TPFd5/67pLDFNfE4RxQGOm33l448AOoJ+8YXgFRoKOID6jWWZgl73dr+GE5VZXXjulXIImz+cyLxfHkQD+1kXuvz77QwZk294csCTLhFzOjKcWuCIFF/OiATsaPvior5kaDAribjThf7N10rrrua+zg/GAMFVi42fnODWV1aSZD/WVREwD2cWp3QcGVgVTwflkgNKjVSAHsgBi2kGCJfnkUS0TFv/fojQ+l78lbiTLlrX/AjlZzKc5mEhrtECm6nudnNAev1MQ37bnEc/Z1DY//dgorogMUgRaCuPFjqx080gUQ9n/6BihV0RM0zinFx71ggFJinwuFvBfuZ7Ehlf9kjMU3Cb3xd1KXnmY06SEh2KLFftbZwmPmqbSGoVnppbeISCpJ/6mgTffPcVS2ixF49h25wkQKSlwviqpfYQaNmO86ovXzXy1uvRieL0ad+VKQ0KOo9+BRCRzy+LdnhJ25dyaW/jhkgpb4ayrD41Vu4TqH8w0E7rDFxwzzffI9LD/qpd5TAtRG5PEXo3OatTxMMmMdZ1bf3rev7cTDxNFGC06YEs7rCq5sgnSK80lTS2MCmrPGYv7y44/juaqY/OBLoM/rg3JawVrEMj7l8fsEBKP4kU4R9+i9cSJFjtHbaNRi4A1FDlhn61I2lDDDhVBCAsnGrwrAXF4qtE5Ak2Ily5wxhjS7CcTrNXFiP6t+VC6TlcBwBx6LoSU1u7kBR+tybaHLJns3tufpn9XXTdtY14/859KOWUVjAtv0nolCAj/VWTNhgVp+RB20vxO/mNwRv5AaLPnFxTrKDHUt6+FWmblN7HEulT+Dj5JKUXjf/US7fWc6Dst35G/oCBx1DxQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4306.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230038)(366014)(376012)(1800799022);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bW/c9N/Q2LVS0CY018WJK1Xz5Sbg8+40FFyph3rcChsqdmZ0pyQSOo6i9D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AJs83umgRFj3aw/IK7nPWY+80s5Mhd7GGUgt0cYv/pnA++MNvBBfDSd1onr+ykmRP85EnE8pq8Kn3NwNgFln4NTBa/7lhe8gyryjNTNhaujCftPnuVmVwM4v7YYM= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d7e8de9-a289-4aa0-cca2-08dc957f54a7 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4306.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 01:28:49.6123 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MnrFbUeyeb3zo7Yzd70ziXkMasBDmP+h+Gpsx3TbkOB/wuQpf2IFAPXxlOrP4Kte4yYYoSaAyk7YP15XIkJ48sqVvNwJTvoCXa03XbHshX0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7057 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-25_20,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406260010 X-Proofpoint-GUID: 2Ce0AgJg4XCxIoMvrOi8ykPmlFaPbi7z X-Proofpoint-ORIG-GUID: 2Ce0AgJg4XCxIoMvrOi8ykPmlFaPbi7z From: Vegard Nossum This adds some basic self-testing infrastructure for RDS-TCP. Signed-off-by: Vegard Nossum Signed-off-by: Chuck Lever Signed-off-by: Allison Henderson --- Documentation/dev-tools/gcov.rst | 11 + MAINTAINERS | 1 + tools/testing/selftests/Makefile | 1 + tools/testing/selftests/net/rds/Makefile | 13 + tools/testing/selftests/net/rds/README.txt | 41 ++++ tools/testing/selftests/net/rds/config.sh | 56 +++++ tools/testing/selftests/net/rds/init.sh | 69 ++++++ tools/testing/selftests/net/rds/run.sh | 271 +++++++++++++++++++++ tools/testing/selftests/net/rds/test.py | 251 +++++++++++++++++++ 9 files changed, 714 insertions(+) diff --git a/Documentation/dev-tools/gcov.rst b/Documentation/dev-tools/gcov.rst index 5fce2b06f229..dbd26b02ff3c 100644 --- a/Documentation/dev-tools/gcov.rst +++ b/Documentation/dev-tools/gcov.rst @@ -75,6 +75,17 @@ Only files which are linked to the main kernel image or are compiled as kernel modules are supported by this mechanism. +Module specific configs +----------------------- + +Gcov kernel configs for specific modules are described below: + +CONFIG_GCOV_PROFILE_RDS: + Enables GCOV profiling on RDS for checking which functions or + lines are executed. This config is used by the rds selftest to + generate coverage reports. If left unset the report is omitted. + + Files ----- diff --git a/MAINTAINERS b/MAINTAINERS index d648af07cbd6..861dbd2f15fd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18849,6 +18849,7 @@ S: Supported W: https://oss.oracle.com/projects/rds/ F: Documentation/networking/rds.rst F: net/rds/ +F: tools/testing/selftests/net/rds/ RDT - RESOURCE ALLOCATION M: Fenghua Yu diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 9039f3709aff..5b01fe3277e2 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -66,6 +66,7 @@ TARGETS += net/mptcp TARGETS += net/openvswitch TARGETS += net/tcp_ao TARGETS += net/netfilter +TARGETS += net/rds TARGETS += nsfs TARGETS += perf_events TARGETS += pidfd diff --git a/tools/testing/selftests/net/rds/Makefile b/tools/testing/selftests/net/rds/Makefile new file mode 100644 index 000000000000..52fe54006eba --- /dev/null +++ b/tools/testing/selftests/net/rds/Makefile @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 + +all: + @echo mk_build_dir="$(shell pwd)" > include.sh + +TEST_PROGS := run.sh \ + include.sh \ + test.py \ + init.sh + +EXTRA_CLEAN := /tmp/rds_logs + +include ../../lib.mk diff --git a/tools/testing/selftests/net/rds/README.txt b/tools/testing/selftests/net/rds/README.txt new file mode 100644 index 000000000000..dddf9d33848e --- /dev/null +++ b/tools/testing/selftests/net/rds/README.txt @@ -0,0 +1,41 @@ +RDS self-tests +============== + +These scripts provide a coverage test for RDS-TCP by creating a vm +with two network namespaces and running rds packets between them. +A loopback network is provisioned with optional probability of packet +loss or corruption. A workload of 50000 hashes, each 64 characters +in size, are passed over an RDS socket on this test network. A passing +test means the RDS-TCP stack was able to recover properly. The provided +config.sh can be used to compile the kernel with the necessary gcov +options. The kernel may optionally be configured to omit the coverage +report as well. + +USAGE: + run.sh [-d logdir] [-l packet_loss] [-c packet_corruption] + [-u packet_duplcate] + +OPTIONS: + -d Log directory. Defaults to /tmp/rds_logs + + -l Simulates a percentage of packet loss + + -c Simulates a percentage of packet corruption + + -u Simulates a percentage of packet duplication. + +EXAMPLE: + + # Create a suitable gcov enabled .config + tools/testing/selftests/net/rds/config.sh -g + + # Alternatly create a gcov disabled .config + tools/testing/selftests/net/rds/config.sh + + # build the kernel + make -j128 + + # launch the tests in a VM + tools/testing/selftests/net/rds/run.sh + +An HTML coverage report will be output in /tmp/rds_logs/coverage/. diff --git a/tools/testing/selftests/net/rds/config.sh b/tools/testing/selftests/net/rds/config.sh new file mode 100755 index 000000000000..3454f4856d69 --- /dev/null +++ b/tools/testing/selftests/net/rds/config.sh @@ -0,0 +1,56 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 + +set -e +set -u +set -x + +unset KBUILD_OUTPUT + +GENERATE_GCOV_REPORT=0 +while getopts "g" opt; do + case ${opt} in + g) + GENERATE_GCOV_REPORT=1 + ;; + :) + echo "USAGE: config.sh [-g]" + exit 1 + ;; + ?) + echo "Invalid option: -${OPTARG}." + exit 1 + ;; + esac +done + +# start with a default config +make defconfig + +# no modules +scripts/config --disable CONFIG_MODULES + +# enable RDS +scripts/config --enable CONFIG_RDS +scripts/config --enable CONFIG_RDS_TCP + +if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then + # instrument RDS and only RDS + scripts/config --enable CONFIG_GCOV_KERNEL + scripts/config --disable GCOV_PROFILE_ALL + scripts/config --enable GCOV_PROFILE_RDS +else + scripts/config --disable CONFIG_GCOV_KERNEL + scripts/config --disable GCOV_PROFILE_ALL + scripts/config --disable GCOV_PROFILE_RDS +fi + +# need network namespaces to run tests with veth network interfaces +scripts/config --enable CONFIG_NET_NS +scripts/config --enable CONFIG_VETH + +# simulate packet loss +scripts/config --enable CONFIG_NET_SCH_NETEM + +# generate real .config without asking any questions +make olddefconfig diff --git a/tools/testing/selftests/net/rds/init.sh b/tools/testing/selftests/net/rds/init.sh new file mode 100755 index 000000000000..5d2577625769 --- /dev/null +++ b/tools/testing/selftests/net/rds/init.sh @@ -0,0 +1,69 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 + +set -e +set -u + +COLLECT_GCOV=0 +LOG_DIR=/tmp +PY_CMD="/usr/bin/python3" +PLOSS=0 +PCORRUPT=0 +PDUP=0 +while getopts "d:p:l:c:u:g" opt; do + case ${opt} in + d) + LOG_DIR=${OPTARG} + ;; + p) + PY_CMD=${OPTARG} + ;; + l) + PLOSS=${OPTARG} + ;; + c) + PCORRUPT=${OPTARG} + ;; + u) + PDUP=${OPTARG} + ;; + g) + COLLECT_GCOV=1 + ;; + :) + echo "USAGE: init.sh [-d logdir] [-p python_cmd] [-l packet_loss] [-c packet_corruption] " \ + "[-u packet_duplcate] [-g]" + exit 1 + ;; + ?) + echo "Invalid option: -${OPTARG}." + exit 1 + ;; + esac +done + +LOG_FILE="${LOG_DIR}/rds-strace.txt" + +mount -t proc none /proc +mount -t sysfs none /sys +mount -t tmpfs none /var/run +mount -t debugfs none /sys/kernel/debug + +echo running RDS tests... +echo Traces will be logged to "$LOG_FILE" +rm -f "$LOG_FILE" +strace -T -tt -o "$LOG_FILE" "$PY_CMD" "$(dirname "$0")/test.py" --timeout 300 -d "$LOG_DIR" \ + -l "$PLOSS" -c "$PCORRUPT" -u "$PDUP" || true + +if [ "$COLLECT_GCOV" -eq 1 ]; then + echo saving coverage data... + (set +x; cd /sys/kernel/debug/gcov; find ./* -name '*.gcda' | \ + while read -r f + do + cat < "/sys/kernel/debug/gcov/$f" > "/$f" + done) +fi + +dmesg > "${LOG_DIR}/dmesg.out" + +/usr/sbin/poweroff --no-wtmp --force diff --git a/tools/testing/selftests/net/rds/run.sh b/tools/testing/selftests/net/rds/run.sh new file mode 100755 index 000000000000..823631507230 --- /dev/null +++ b/tools/testing/selftests/net/rds/run.sh @@ -0,0 +1,271 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 + +set -e +set -u + +unset KBUILD_OUTPUT + +current_dir="$(realpath "$(dirname "$0")")" +build_dir="$current_dir" + +build_include="$current_dir/include.sh" +if test -f "$build_include"; then + # this include will define "$mk_build_dir" as the location the test was + # built. We will need this if the tests are installed in a location + # other than the kernel source + + source "$build_include" + build_dir="$mk_build_dir" +fi + +# This test requires kernel source and the *.gcda data therein +# Locate the top level of the kernel source, and the net/rds +# subfolder with the appropriate *.gcno object files +ksrc_dir="$(realpath "$build_dir"/../../../../../)" +kconfig="$ksrc_dir/.config" +obj_dir="$ksrc_dir/net/rds" + +GCOV_CMD=gcov + +# This script currently only works for x86_64 +ARCH="$(uname -m)" +case "${ARCH}" in +x86_64) + QEMU_BINARY=qemu-system-x86_64 + ;; +*) + echo "selftests: [SKIP] Unsupported architecture" + exit 4 + ;; +esac + +#check to see if the host has the required packages to generate a gcov report +check_gcov_env() +{ + if ! which "$GCOV_CMD" > /dev/null 2>&1; then + echo "Warning: Could not find gcov. " + GENERATE_GCOV_REPORT=0 + fi + + # the gcov version must match the gcc version + GCC_VER=$(gcc -dumpfullversion) + GCOV_VER=$($GCOV_CMD -v | grep gcov | awk '{print $3}'| awk 'BEGIN {FS="-"}{print $1}') + if [ "$GCOV_VER" != "$GCC_VER" ]; then + #attempt to find a matching gcov version + GCOV_CMD=gcov-$(gcc -dumpversion) + + if ! which "$GCOV_CMD" > /dev/null 2>&1; then + echo "Warning: Could not find an appropriate gcov installation. \ + gcov version must match gcc version" + GENERATE_GCOV_REPORT=0 + fi + + #recheck version number of found gcov executable + GCOV_VER=$($GCOV_CMD -v | grep gcov | awk '{print $3}'| \ + awk 'BEGIN {FS="-"}{print $1}') + if [ "$GCOV_VER" != "$GCC_VER" ]; then + echo "Warning: Could not find an appropriate gcov installation. \ + gcov version must match gcc version" + GENERATE_GCOV_REPORT=0 + else + echo "Warning: Mismatched gcc and gcov detected. Using $GCOV_CMD" + fi + fi + + if ! which gcovr > /dev/null 2>&1; then + echo "Warning: Could not find gcovr" + GENERATE_GCOV_REPORT=0 + fi +} + +# Check to see if the kconfig has the required configs to generate a coverage report +check_gcov_conf() +{ + if ! grep -x "CONFIG_GCOV_PROFILE_RDS=y" "$kconfig" > /dev/null 2>&1; then + echo "INFO: CONFIG_GCOV_PROFILE_RDS should be enabled for coverage reports" + GENERATE_GCOV_REPORT=0 + fi + if ! grep -x "CONFIG_GCOV_KERNEL=y" "$kconfig" > /dev/null 2>&1; then + echo "INFO: CONFIG_GCOV_KERNEL should be enabled for coverage reports" + GENERATE_GCOV_REPORT=0 + fi + if grep -x "CONFIG_GCOV_PROFILE_ALL=y" "$kconfig" > /dev/null 2>&1; then + echo "INFO: CONFIG_GCOV_PROFILE_ALL should be disabled for coverage reports" + GENERATE_GCOV_REPORT=0 + fi + + if [ "$GENERATE_GCOV_REPORT" -eq 0 ]; then + echo "To enable gcov reports, please run "\ + "\"tools/testing/selftests/net/rds/config.sh -g\" and rebuild the kernel" + else + # if we have the required kernel configs, proceed to check the environment to + # ensure we have the required gcov packages + check_gcov_env + fi +} + +# Kselftest framework requirement - SKIP code is 4. +check_conf_enabled() { + if ! grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then + echo "selftests: [SKIP] This test requires $1 enabled" + echo "Please run tools/testing/selftests/net/rds/config.sh and rebuild the kernel" + exit 4 + fi +} +check_conf_disabled() { + if grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then + echo "selftests: [SKIP] This test requires $1 disabled" + echo "Please run tools/testing/selftests/net/rds/config.sh and rebuild the kernel" + exit 4 + fi +} +check_conf() { + check_conf_enabled CONFIG_NET_SCH_NETEM + check_conf_enabled CONFIG_VETH + check_conf_enabled CONFIG_NET_NS + check_conf_enabled CONFIG_RDS_TCP + check_conf_enabled CONFIG_RDS + check_conf_disabled CONFIG_MODULES +} + +check_env() +{ + if ! test -d "$obj_dir"; then + echo "selftests: [SKIP] This test requires a kernel source tree" + exit 4 + fi + if ! test -e "$kconfig"; then + echo "selftests: [SKIP] This test requires a configured kernel source tree" + exit 4 + fi + if ! which strace > /dev/null 2>&1; then + echo "selftests: [SKIP] Could not run test without strace" + exit 4 + fi + if ! which tcpdump > /dev/null 2>&1; then + echo "selftests: [SKIP] Could not run test without tcpdump" + exit 4 + fi + if ! which "$QEMU_BINARY" > /dev/null 2>&1; then + echo "selftests: [SKIP] Could not run test without qemu" + exit 4 + fi + + if ! which python3 > /dev/null 2>&1; then + echo "selftests: [SKIP] Could not run test without python3" + exit 4 + fi + + python_major=$(python3 -c "import sys; print(sys.version_info[0])") + python_minor=$(python3 -c "import sys; print(sys.version_info[1])") + if [[ python_major -lt 3 || ( python_major -eq 3 && python_minor -lt 9 ) ]] ; then + echo "selftests: [SKIP] Could not run test without at least python3.9" + python3 -V + exit 4 + fi +} + +LOG_DIR=/tmp/rds_logs +PLOSS=0 +PCORRUPT=0 +PDUP=0 +GENERATE_GCOV_REPORT=1 +while getopts "d:l:c:u:" opt; do + case ${opt} in + d) + LOG_DIR=${OPTARG} + ;; + l) + PLOSS=${OPTARG} + ;; + c) + PCORRUPT=${OPTARG} + ;; + u) + PDUP=${OPTARG} + ;; + :) + echo "USAGE: run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]" \ + "[-u packet_duplcate] [-g]" + exit 1 + ;; + ?) + echo "Invalid option: -${OPTARG}." + exit 1 + ;; + esac +done + + +check_env +check_conf + +check_gcov_conf +gflags="" +if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then + gflags="-g" +else + echo "Coverage report will be skipped" +fi + +#if we are running in a python environment, we need to capture that +#python bin so we can use the same python environment in the vm +PY_CMD=$(which python3) + +rm -fr "$LOG_DIR" +TRACE_FILE="${LOG_DIR}/rds-strace.txt" +mkdir -p "$LOG_DIR" + +# start a VM using a 9P root filesystem that maps to the host's / +# we pass ./init.sh from the same directory as we are in as the +# guest's init, which will run the tests and copy the coverage +# data back to the host filesystem. +$QEMU_BINARY \ + -enable-kvm \ + -cpu host \ + -smp 4 \ + -kernel "${ksrc_dir}/arch/x86/boot/bzImage" \ + -append "rootfstype=9p root=/dev/root rootflags=trans=virtio,version=9p2000.L rw \ + console=ttyS0 init=${current_dir}/init.sh -d ${LOG_DIR} -p ${PY_CMD} ${gflags} \ + -l ${PLOSS} -c ${PCORRUPT} -u ${PDUP} panic=-1" \ + -display none \ + -serial stdio \ + -fsdev local,id=fsdev0,path=/,security_model=none,multidevs=remap \ + -device virtio-9p-pci,fsdev=fsdev0,mount_tag=/dev/root \ + -no-reboot + +# generate a nice HTML coverage report +if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then + echo running gcovr... + gcovr -v -s --html-details --gcov-executable "$GCOV_CMD" --gcov-ignore-parse-errors \ + -o "${LOG_DIR}/coverage/" "${ksrc_dir}/net/rds/" +fi + +# extract the return code of the test script from the strace if it is there +if [ ! -f "$TRACE_FILE" ]; then + echo "FAIL: Test failed to complete" + exit 1 +fi + +set +e +tail -1 "$TRACE_FILE" | grep "killed by SIGALRM" > /dev/null 2>&1 +if [ $? -eq 0 ]; then + echo "FAIL: Test timed out" + exit 1 +fi + +tail -1 "$TRACE_FILE" | grep "exited with" +if [ $? -ne 0 ]; then + echo "FAIL: Test failed to complete" + exit 1 +fi + +test_rc=$(tail -1 "$TRACE_FILE" | grep -o 'exited with.*' | cut -d ' ' -f 3) +if [ "$test_rc" -eq 0 ]; then + echo "PASS: Test completed successfully" +else + echo "FAIL: Test failed" +fi + +exit "$test_rc" diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py new file mode 100644 index 000000000000..4da3bb933842 --- /dev/null +++ b/tools/testing/selftests/net/rds/test.py @@ -0,0 +1,251 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0 + +import argparse +import ctypes +import errno +import hashlib +import os +import select +import signal +import socket +import subprocess +import sys +import atexit +from pwd import getpwuid +from os import stat + +libc = ctypes.cdll.LoadLibrary('libc.so.6') +setns = libc.setns + +net0 = 'net0' +net1 = 'net1' + +veth0 = 'veth0' +veth1 = 'veth1' + +# Convenience wrapper function for calling the subsystem ip command. +def ip(*args): + subprocess.check_call(['/usr/sbin/ip'] + list(args)) + +# Helper function for creating a socket inside a network namespace. +# We need this because otherwise RDS will detect that the two TCP +# sockets are on the same interface and use the loop transport instead +# of the TCP transport. +def netns_socket(netns, *args): + u0, u1 = socket.socketpair(socket.AF_UNIX, socket.SOCK_SEQPACKET) + + child = os.fork() + if child == 0: + # change network namespace + with open(f'/var/run/netns/{netns}') as f: + try: + ret = setns(f.fileno(), 0) + except IOError as e: + print(e.errno) + print(e) + + # create socket in target namespace + s = socket.socket(*args) + + # send resulting socket to parent + socket.send_fds(u0, [], [s.fileno()]) + + sys.exit(0) + + # receive socket from child + _, s, _, _ = socket.recv_fds(u1, 0, 1) + os.waitpid(child, 0) + u0.close() + u1.close() + return socket.fromfd(s[0], *args) + +#Parse out command line arguments. We take an optional +# timeout parameter and an optional log output folder +parser = argparse.ArgumentParser(description="init script args", + formatter_class=argparse.ArgumentDefaultsHelpFormatter) +parser.add_argument("-d", "--logdir", action="store", help="directory to store logs", default="/tmp") +parser.add_argument('--timeout', help="timeout to terminate hung test", type=int, default=0) +parser.add_argument('-l', '--loss', help="Simulate tcp packet loss", type=int, default=0) +parser.add_argument('-c', '--corruption', help="Simulate tcp packet corruption", type=int, default=0) +parser.add_argument('-u', '--duplicate', help="Simulate tcp packet duplication", type=int, default=0) +args = parser.parse_args() +logdir=args.logdir +packet_loss=args.loss +packet_corruption=args.corruption +packet_duplicate=args.duplicate + +ip('netns', 'add', net0) +ip('netns', 'add', net1) +ip('link', 'add', 'type', 'veth') + +addrs = [ + # we technically don't need different port numbers, but this will + # help identify traffic in the network analyzer + ('10.0.0.1', 10000), + ('10.0.0.2', 20000), +] + +# move interfaces to separate namespaces so they can no longer be +# bound directly; this prevents rds from switching over from the tcp +# transport to the loop transport. +ip('link', 'set', veth0, 'netns', net0, 'up') +ip('link', 'set', veth1, 'netns', net1, 'up') + +# add addresses +ip('-n', net0, 'addr', 'add', addrs[0][0] + '/32', 'dev', veth0) +ip('-n', net1, 'addr', 'add', addrs[1][0] + '/32', 'dev', veth1) + +# add routes +ip('-n', net0, 'route', 'add', addrs[1][0] + '/32', 'dev', veth0) +ip('-n', net1, 'route', 'add', addrs[0][0] + '/32', 'dev', veth1) + +# sanity check that our two interfaces/addresses are correctly set up +# and communicating by doing a single ping +ip('netns', 'exec', net0, 'ping', '-c', '1', addrs[1][0]) + +# Start a packet capture on each network +for net in [net0, net1]: + tcpdump_pid = os.fork() + if tcpdump_pid == 0: + pcap = logdir+'/'+net+'.pcap' + subprocess.check_call(['touch', pcap]) + user = getpwuid(stat(pcap).st_uid).pw_name + ip('netns', 'exec', net, '/usr/sbin/tcpdump', '-Z', user, '-i', 'any', '-w', pcap) + sys.exit(0) + +# simulate packet loss, duplication and corruption +for net, iface in [(net0, veth0), (net1, veth1)]: + ip('netns', 'exec', net, + '/usr/sbin/tc', 'qdisc', 'add', 'dev', iface, 'root', 'netem', + 'corrupt', str(packet_corruption)+'%', + 'loss', str(packet_loss)+'%', + 'duplicate', str(packet_duplicate)+'%', + ) + +# add a timeout +if args.timeout > 0: + signal.alarm(args.timeout) + +sockets = [ + netns_socket(net0, socket.AF_RDS, socket.SOCK_SEQPACKET), + netns_socket(net1, socket.AF_RDS, socket.SOCK_SEQPACKET), +] + +for s, addr in zip(sockets, addrs): + s.bind(addr) + s.setblocking(0) + +fileno_to_socket = { + s.fileno(): s for s in sockets +} + +addr_to_socket = { + addr: s for addr, s in zip(addrs, sockets) +} + +socket_to_addr = { + s: addr for addr, s in zip(addrs, sockets) +} + +send_hashes = {} +recv_hashes = {} + +ep = select.epoll() + +for s in sockets: + ep.register(s, select.EPOLLRDNORM) + +n = 50000 +nr_send = 0 +nr_recv = 0 + +while nr_send < n: + # Send as much as we can without blocking + print("sending...", nr_send, nr_recv) + while nr_send < n: + send_data = hashlib.sha256(f'packet {nr_send}'.encode('utf-8')).hexdigest().encode('utf-8') + + # pseudo-random send/receive pattern + sender = sockets[nr_send % 2] + receiver = sockets[1 - (nr_send % 3) % 2] + + try: + sender.sendto(send_data, socket_to_addr[receiver]) + send_hashes.setdefault((sender.fileno(), receiver.fileno()), hashlib.sha256()).update(f'<{send_data}>'.encode('utf-8')) + nr_send = nr_send + 1 + except BlockingIOError as e: + break + except OSError as e: + if e.errno in [errno.ENOBUFS, errno.ECONNRESET, errno.EPIPE]: + break + raise + + # Receive as much as we can without blocking + print("receiving...", nr_send, nr_recv) + while nr_recv < nr_send: + for fileno, eventmask in ep.poll(): + receiver = fileno_to_socket[fileno] + + if eventmask & select.EPOLLRDNORM: + while True: + try: + recv_data, address = receiver.recvfrom(1024) + sender = addr_to_socket[address] + recv_hashes.setdefault((sender.fileno(), receiver.fileno()), hashlib.sha256()).update(f'<{recv_data}>'.encode('utf-8')) + nr_recv = nr_recv + 1 + except BlockingIOError as e: + break + + # exercise net/rds/tcp.c:rds_tcp_sysctl_reset() + for net in [net0, net1]: + ip('netns', 'exec', net, '/usr/sbin/sysctl', 'net.rds.tcp.rds_tcp_rcvbuf=10000') + ip('netns', 'exec', net, '/usr/sbin/sysctl', 'net.rds.tcp.rds_tcp_sndbuf=10000') + +print("done", nr_send, nr_recv) + +# the Python socket module doesn't know these +RDS_INFO_FIRST = 10000 +RDS_INFO_LAST = 10017 + +nr_success = 0 +nr_error = 0 + +for s in sockets: + for optname in range(RDS_INFO_FIRST, RDS_INFO_LAST + 1): + # Sigh, the Python socket module doesn't allow us to pass + # buffer lengths greater than 1024 for some reason. RDS + # wants multiple pages. + try: + s.getsockopt(socket.SOL_RDS, optname, 1024) + nr_success = nr_success + 1 + except OSError as e: + nr_error = nr_error + 1 + if e.errno == errno.ENOSPC: + # ignore + pass + +print(f"getsockopt(): {nr_success}/{nr_error}") + +print("Stopping network packet captures") +subprocess.check_call(['killall', '-q', 'tcpdump']) + +# We're done sending and receiving stuff, now let's check if what +# we received is what we sent. +for (sender, receiver), send_hash in send_hashes.items(): + recv_hash = recv_hashes.get((sender, receiver)) + + if recv_hash is None: + print("FAIL: No data received") + sys.exit(1) + + if send_hash.hexdigest() != recv_hash.hexdigest(): + print("FAIL: Send/recv mismatch") + print("hash expected:", send_hash.hexdigest()) + print("hash received:", recv_hash.hexdigest()) + sys.exit(1) + + print(f"{sender}/{receiver}: ok") + +print("Success") +sys.exit(0)