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 7005B438B5; Sat, 13 Jan 2024 18:50:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DE4740268; Sat, 13 Jan 2024 18:50:27 +0100 (CET) Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by mails.dpdk.org (Postfix) with ESMTP id CBE50400EF for ; Sat, 13 Jan 2024 18:50:25 +0100 (CET) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40DA3LUn023465; Sat, 13 Jan 2024 17:50:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=AwiFBTyldShF08FtE5b0m0z9RnRI40sTt1lIZ3hrFYg=; b=Fmaw/eNSWtj4ceLWQF+c1b1J533nbsKwzFTuystkwSqoFFhRrMofjM3WTqVAeQ4T79S0 ujCtCnlFLjohS6hjoRNkhUsnHIgcOJ95T7WyVsSRDC0WGu7wATxyzxdPd9XxUTw+Hq6i 9bgoFSU3W7GQEfIsnRu2pZ3hUJZEA1csyr9OEf7P+6hZk/xKm2eDy8JQizGcfltOPcl8 DxPsZnt5ZTTWV6guCXYj5UEw83GYIwRUkawkFpNxzsK1b8XqC8qcXQIycEXHeSdEz9mP 3/9S4OSqMLz+IEma3m82VWC2zf9F1fSV2AV+7zdpKva6zG9yDNteJaRQNBU9IeDB8Apx Cg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vkm2hgd6d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Jan 2024 17:50:23 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 40DDZ9dj020061; Sat, 13 Jan 2024 17:50:22 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3vkgy3u6qd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Jan 2024 17:50:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gfc+suTxIDZUSLGBHfFYP38xxzaeNNhYfHqKpT5Wb1pe4V54ftrvUka8npsKQUGHjtQPn5Qubz6uq0IU6oukLeUZr+iIZ1cVRSvE+lDfyagCV9VJgPd6qnoU6hn4ZqZj41ZXUZiD+cCD2ne5hZTuxWf93xFC5wdXIQ2XFXbSKKQNOu/KBXfiEK46rwb4501Klg04ID6+hfPkzIEdL2JFawrK7wnTn6m7jSG9Wk06IzkzRCJn3mw3qByFnrng+ZMvTxXM4JVTnmWTDgcvlxY1Y5XnVrR5BxlZepGnAg/unrp3o8TriFR8KdZKp65F1Ol6A+wGAI6dDVCSj7Hc91nSHA== 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=AwiFBTyldShF08FtE5b0m0z9RnRI40sTt1lIZ3hrFYg=; b=jCA64d6sKZZsyb5iqJT49G9SQA7sq8zOQ/lhngJwdbLG3juEaeKthqyJevMPJ9E+fgZqT03dn2AZUTRt6c0+A1lFjsRyLJauYl/Z61guwuzSZSVxiiy21NwFkTzAn7+bE3A6Prst/pqwx8bjC3uxMV71VmZIH5WkgVmNkr1OQbCmp2fnMVNAeXMVAoIGr0eAFmuG/3iITF7W7P0fW+dT/l8Urxd7lFOyG9MSw8c2l9Q0N7PwR0C3pnzZMU3Beho6e64PxmEOdycsM98D70hHvl6ZG7EEk/RespqKHSLynEZ1JZUYzFrgANpxkIavpTRoz6DfJrHe92Ruaz8dzbJ2yQ== 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=AwiFBTyldShF08FtE5b0m0z9RnRI40sTt1lIZ3hrFYg=; b=sfpX+T4pU6OgVQ+BhiHmhpPucYM3dtrPAQ+ShXgHplrz24trgx72cvx5Kb1i/gX/nwlskcDOYC51NVafHP9fQ+OdM7/LICvEBhCP8gE0xsJnH3R1obwA5I3BqvdRWFsxpgYt0z9O9XfyUN04dil+oSvvYcEAU4/RqbObMpxPq1c= Received: from SJ0PR10MB4798.namprd10.prod.outlook.com (2603:10b6:a03:2df::8) by CH2PR10MB4389.namprd10.prod.outlook.com (2603:10b6:610:a9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Sat, 13 Jan 2024 17:50:20 +0000 Received: from SJ0PR10MB4798.namprd10.prod.outlook.com ([fe80::bfe7:9456:17cb:cb09]) by SJ0PR10MB4798.namprd10.prod.outlook.com ([fe80::bfe7:9456:17cb:cb09%7]) with mapi id 15.20.7159.020; Sat, 13 Jan 2024 17:50:19 +0000 From: Madhuker Mythri To: Stephen Hemminger CC: "dev@dpdk.org" , "ferruh.yigit@amd.com" Subject: RE: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the Kernel-version upgrade requirements. Thread-Topic: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the Kernel-version upgrade requirements. Thread-Index: AQHaRV4Rf7RgLGk4B0C7Hxjh8lHukrDWYaiAgAGkFuA= Date: Sat, 13 Jan 2024 17:50:19 +0000 Message-ID: References: <20240112134821.2067-1-madhuker.mythri@oracle.com> <20240112084131.1786113c@hermes.local> In-Reply-To: <20240112084131.1786113c@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB4798:EE_|CH2PR10MB4389:EE_ x-ms-office365-filtering-correlation-id: caef82fd-c08b-4748-f439-08dc14601bcd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KpKG73ryNE7CH3aCgCKXlQWrgmJAWupjfWjqoqzg/KrJsSPE8k0vSbqqYMl+MmDpNRJ9hiw6iHakUtZez1yexKpz5RbpE/fdJKtpYnnn1+GlAm8Q2Lo+0/GFAiVvgQ3XdRIfG6NT8pCElhMUeEQZHYD6twXRUNTNNWXj0FLaHPAhPNxRE+toC2hIe0dW8YJQENA1eBNLFrG11EMQGFzmgZwwk0tf/j0TrFLa+TKguW2gnOFcstm5uH0ciMZvvAOqsYlFrelevdaDS527uBQSmZP0FW4A6b4ZqFfXMZOeTKY0Mp54ldkC024SuBEBi2Tckb4wFKgZS/5tysFDks6v7P0W3pSKo08RRBK1fQ+Tu5cmW1LriupDfoAXU6GCAlQ6D/nkkATfJCfh3xuB60iOx9/88h5Qx/LnAOxyS+V3MT34889AIiIaU0f4e/E1fTZr0j7HxgauqKBVDqylIqJlkUyuFKtA+Fbb8RhwU+0whFgpPKfqlCsjVVIP5fi401+HYeJn1oL9zYzUaLd0cKl1YL/le1fagXK67KkZ9Gwe1rs8jGzGnyZED0kULAxnhzKrf6EyDkEsd0/df9mmTJALpA23DUWflKfYfWqi3u0y8wcFiZuQTm5lEYNUoU/gMqbeekJop9WtvyO4RzQvLSI2TmUHCSUAA7n97Wmxr7HcZKA= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB4798.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(376002)(366004)(396003)(136003)(346002)(230273577357003)(230173577357003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(6506007)(71200400001)(26005)(478600001)(7696005)(53546011)(9686003)(83380400001)(5660300002)(2906002)(44832011)(4326008)(76116006)(316002)(66476007)(64756008)(66556008)(6916009)(8676002)(54906003)(66446008)(66946007)(8936002)(52536014)(41300700001)(86362001)(38100700002)(38070700009)(122000001)(33656002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?CpJXD01BTD6GzP6MJnh2I4CoXf14TdrO26UGj1kFcoanMUNHP7jqGz8HZcKG?= =?us-ascii?Q?JGS1FB6xG7lZsb5aKU9ZT81Xh43MJmY6LWAD6+us8eFBT+jvqvnQPPVW8lHx?= =?us-ascii?Q?EH02/NR/xQgJm37PSepPLISZzvdxCTdb2cZQ2jhm2QufrOmePbvQTRRRfd0k?= =?us-ascii?Q?HpEM/WEmbc9Xs5/qLY3CxKHnRTghLcIsJpIKZTnRP7MdBIhp7iGHF0B9JWgu?= =?us-ascii?Q?jKLkVWbTKibyOMhY4R0q2is6t4RU1lDzW7Bsc6EyPth22NiIsN2ctX+FklS5?= =?us-ascii?Q?JNWM47C50V9H+ir/sZvvG52td4sTVSf9G2TnWOCzATbzc/LJ/javegDUp4xf?= =?us-ascii?Q?7llDjQBhdt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-ascii?Q?gif8UtWGNzWD1nAFwKx0Av/GBaTypO91r5fRm2En/QPe7q0KxqKaaP8K8oNl?= =?us-ascii?Q?BW8gaFZv/BaP5/cEYBu/KQlqrZBrhYQPMeqQknUuOEuw6d/z4qoylWnCTPT6?= =?us-ascii?Q?KWd2wIGxDXBzkRTK8YfxGwZIcKZhlh1yQehA96h3r4PQ9qh2mcjeCWVx3+/6?= =?us-ascii?Q?XfVqT5Qz7ht10E4DKHgRqCDOjpKrd/mryHfKeTsQpuhvWXtPqY9MTJtm9h4g?= =?us-ascii?Q?GJI5FA/V/Fn+FJpNVgAXtmINJYa46wWLREddSKRP8oPv5ua2t6QchvILTpVQ?= =?us-ascii?Q?T25reVMsTvu38Wn+Sllkhc54xHdWdTMoVuCl8MrEVPmRVbt8dYgjELZxiKE7?= =?us-ascii?Q?tA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: rCwfRwrK5ev/2DAkX1K+XCLNqo7nLr2fwVFt9j/eF+1H9OoXVoEnv0px84MUBUy3tWR/6hIu/OIJVKV7WG4BsIvq2uuLO3Qdt9EWjWnwZl5n0OUCeML3Sc4GeSQJeT9okxamIZV+S8uVjqfz/P1luO8TYskEu/7rPNkEI2U51IzQvGJ5OCgqnp98WkTBbDveiqtpcOYRcgf2FfsTXRBoTqihO4abQZNbHKxIkWBdG3rVRUHYKQi+QUMRTToPpNL/svkA5I/gcyzkIIlJZYN7XrMqR1VC8nF/BfZ2khfud5ami/5QA93Y9voRcv+adBBi6yyfiVCOqNUMSEmuE+ghaeFz5wxXuot2nVvoEOZVpXhevCj3BPcixTv8SEMZx+P5xLdOQi6yrXVDZJznOorTyFqEtgePshzK5TBie/FCFgODsIL4FcZIPTqNethHLdmNrlwTXrpvtSlne7glbxt2qGZ9iIONA6irlic51vgZ12Obzf1MlsOMPbPZ7dEgstnWl/xtD0izoyk9j+PdoVFFD/pzQ4Ue+69jfWBWQ4b1myC1j/Bj2X/HjEvlv+gIH+QLp3Z0bus14tQrtknHyzAJzrRc/5moD5da+73VtBZro7w= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4798.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: caef82fd-c08b-4748-f439-08dc14601bcd X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2024 17:50:19.5420 (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: 7piA4yPyd1x3IKltVRJvFUXMbg6ijEPF6ClH/9PdL8bO/SlhHadrJ5bE4eaegFQ9k4tONp9rPrY0IyXRAsHy7skn4Abwo8BleRkeKo43Ux0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4389 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-13_07,2024-01-12_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401130150 X-Proofpoint-GUID: BEwCYh42lvY6H2iIJOEAfBrkQSU0Q0EZ X-Proofpoint-ORIG-GUID: BEwCYh42lvY6H2iIJOEAfBrkQSU0Q0EZ 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 With the original code BPF verifier throws error, due to undefined array ac= cess and thus could failed to load the BPF instructions onto the Kernel. For safe execution on the Kernel, the array access with such undefined valu= e throws error. So, came up with this loop which has Max-queues as limit. Thanks, Madhuker, -----Original Message----- From: Stephen Hemminger =20 Sent: 12 January 2024 22:12 To: Madhuker Mythri Cc: dev@dpdk.org; ferruh.yigit@amd.com Subject: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per = the Kernel-version upgrade requirements. On Fri, 12 Jan 2024 19:18:21 +0530 madhuker.mythri@oracle.com wrote: > - queue =3D rsskey->queues[(hash % rsskey->nb_queues) & > - (TAP_MAX_QUEUES - 1)]; > - skb->cb[1] =3D QUEUE_OFFSET + queue; > - /* printt(">>>>> rss_l3_l4 hash=3D0x%x queue=3D%u\n", hash, queue); */ > + hash =3D (hash % rsskey->nb_queues) & (TAP_MAX_QUEUES - 1); #pragma=20 > +clang loop unroll(full) > + for (k =3D 0; k < TAP_MAX_QUEUES; k++) { > + if(k =3D=3D hash) > + queue =3D rsskey->queues[k]; > + } > =20 Why introduce another loop here. Original code was fine and bounded.