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 1C94E4383C; Fri, 5 Jan 2024 15:58:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BF07402E4; Fri, 5 Jan 2024 15:58:29 +0100 (CET) Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by mails.dpdk.org (Postfix) with ESMTP id 0B78A402E2 for ; Fri, 5 Jan 2024 15:58:27 +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 405EqRZP014237; Fri, 5 Jan 2024 14:58:26 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=7GfhK8th6ERxPQmYyB1TPtROVr4IqYdI88JM2AW6hLs=; b=A7jf127gkDlYKpBw+erWCrKnQiOCOSf6LcrI2mKL9lkHFQakBVZu9A+/iMeXkK1aH4AH P2Q1n+8jm3ZcAmTOFHiTHvpUyXLP/KgfzqeFHXUw5gvfcc6H391Fh4dCum5JYsPFJFw5 X1kb6JZ06OF9eWv6J/34+iGSyckYv7XJZgapMeiv3Q9fYwjVVm5emO80ZQw54g55xpLn R0j+dG/3P2RhSi7QHCulW3NqvHYclpBs5EVM5q+TdybFw4cfEOCmehhTih/3g7a7ioml 5xd00lqlIL6t4o8rIMalFshMC3M8E/l61598IooNTHI7vndYGX9hhLlQeTZCccWf+X4e jA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vekwm80ee-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 Jan 2024 14:58:25 +0000 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 405E595D009365; Fri, 5 Jan 2024 14:58:25 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ve12hsrej-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 Jan 2024 14:58:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lEcSV5sDRlAJfI6BdFQRrQ0iCVTL9cVrqLfkP6c8FkDQAJtOXlcutQ/8jUItv+oSLViMRzjmw8hOZooFq7CaY0UGeD/5dshnEZZUQGOWjIAUzaqzZwwHlimXvECFavZeiaSiA2pM7zOQGBKx+qEFX9gCB1y4hC/dRVOJ/+JRZLebOnhKR5coLs1mprdIAITVZhji1uL5fR1nSSS+TI2MZYz1CiOR4IkoGgLtY/gBGSjr6hGHo1Y/CNHXT356lS2t0aARlNXecGq0H9D0PL1qxzEK2aaHuvkGGcirhFR/Nxw6qBlOoN2RyLr+L5oYLdsFmyOohxz2ULWuXIt69i2Wwg== 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=7GfhK8th6ERxPQmYyB1TPtROVr4IqYdI88JM2AW6hLs=; b=j99Akylq8Yir2ajCJ50rWviun+NQSVhIUvxfMKigv7enB8G3vAsd0W1T/ZFESorzf96s2t0GRqUhiPeqjayTJUiANRCVBeB9eGlHub60yeh/xyku3O04rmfZcrlMhF9sPmr0Qkq5FTvIt/x+qLAyhQn0Y6a53nkeYezQ+IDHYTwwDZh7nL2Lq9JgAqWdVBn9p0iPl2PK98XtgJagMpGRh6ZdsfGYrgZNhIfOxTzCgxjgBinmvKKE3VHUcIXnBObgYkWBDtHMceJGRkul+6jP+W4xkMK3FV4tnNs+8p2blCl/kGhgIqnmiHCuwnlSDZUkhzuSvlOnTIfXntiHrxkVCg== 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=7GfhK8th6ERxPQmYyB1TPtROVr4IqYdI88JM2AW6hLs=; b=WcKNXBRhil7ZWBydIgKBIfQO7Xn9OaXI6V50qEmB5+PMmGmuRHMAK5xEHdHUARrW2J2Bvz5Icec3vWL4cTao35YMfJTH78lrbJiC5w2APcOElMSXiBLFrvPFGWsStGF1WNNVcdw6qh0HdDBbUD8l8zVcxCuwOnvo71MYl7a/PNA= Received: from SJ0PR10MB4798.namprd10.prod.outlook.com (2603:10b6:a03:2df::8) by LV3PR10MB7914.namprd10.prod.outlook.com (2603:10b6:408:21e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.16; Fri, 5 Jan 2024 14:58:22 +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.015; Fri, 5 Jan 2024 14:58:22 +0000 From: Madhuker Mythri To: Stephen Hemminger CC: "ferruh.yigit@amd.com" , "dev@dpdk.org" Subject: RE: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the new Kernel-version upgrade requirements. Thread-Topic: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the new Kernel-version upgrade requirements. Thread-Index: AQHaPzO4tzDzcCULFEKTKYP0ti3cpbDKHaeAgAExllA= Date: Fri, 5 Jan 2024 14:58:22 +0000 Message-ID: References: <20240104172756.2213-1-madhuker.mythri@oracle.com> <20240104123853.7ade1ec7@hermes.local> In-Reply-To: <20240104123853.7ade1ec7@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_|LV3PR10MB7914:EE_ x-ms-office365-filtering-correlation-id: 13d32258-7888-4dc9-c0d5-08dc0dfec2e4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hNoSNuq7x2IEYTSTkVp+Z2CJNqkdYSzCBaSnKKCsc/HPBCbRRTm1NxopFFbcyKglAsneLGizOLHmaFg/2W+Aj2XADTFnVMSL9/Gm2TJzKhx7/SFTUaEZutRtqVHcr6BjcBt2EEHckymYrKXixzSGcA1+xaEqcPRucHaAjQqmncfeh+vbt3p679/p9M7rdDf7b/pE/XFpC6aOaa0AUFcZ2laBYKsoQymoTbdxowpWVUMHDqV/Z2JjooYmwWOE81UaC95q5CLT3E69dgSt+fHUB1CJp+Ec0/cbe0u0YeYfiex4LAWurhv+3Fq7rR/eR51laeSWYV7uBdcIxZlyFtccmc70BfflVOJRF49kJa7q+M0icTZmX//ED8Ppb30BgacjkZskP9lG9a2rsZ8D2oCjDO30gOEuvaT3JtSvoy2PAhZr4QP5EC0eUOI/JAHzoevA9BGRXx9YJxm1sZmv7neZjKNOTXK0oWVFf0TUCnx38y0W68uUquVXlJKjK5PI1CAwWGT9S3WRs+TOXYiytvCeorMPQZPXmclz1Ai311r7Hq0DQ6HNqM2/YgbHoigjwZahhxmC3M3IddTIkkjYtEvZBtezSBu6gxtv+pMh9qmWJE52TLs3MWlHmzEvEa/JvIttao5lJ8/iXNuVYrLtsl0nA5c1MF2+wTIX9NNV5LXSmFw= 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)(366004)(376002)(346002)(136003)(396003)(230273577357003)(230173577357003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(26005)(7696005)(71200400001)(53546011)(55236004)(9686003)(6506007)(86362001)(55016003)(83380400001)(52536014)(4326008)(8936002)(316002)(54906003)(2906002)(44832011)(5660300002)(33656002)(478600001)(8676002)(76116006)(66946007)(64756008)(66446008)(66476007)(66556008)(6916009)(122000001)(38100700002)(41300700001)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?641iTXoSOHpIet9ujV2tYgC1qaprk9385kdAmDJI/3/gU22gZ6/7q/zquEuS?= =?us-ascii?Q?BWwSARL1gdyTJhPpvQ/iyt7emM/p4MivSijXqyFS8J8sVLylL2LmfB6x/b4Z?= =?us-ascii?Q?vlDxIKo42BBKhhp4PC3qlbObL+5HzQDreN5Ilba7XHk2RHCojQ8jxoVvygTD?= =?us-ascii?Q?rSAF3N5P3eVQRlLlqAVjrIZQ36li719bjoHN39Ck7ql6Ushj8N0O4xkbigcG?= =?us-ascii?Q?kziFvY+gPHIdh4DESjxeKlvD33EL6ywUIZwOfwbVtLLhDntBpOrzdTQkwMh9?= =?us-ascii?Q?GJILdveJVsr1H5EmoCR1fRs0WUdLIuCBXfz6Yn+Nc48PsrNjofeVBfcyt0HZ?= =?us-ascii?Q?s3GyAszUwJovLsVeaWaXIBQn19mXh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DO6G8+IhZKRMsSktYxSsWfvKWFKodCvbXy49/i5NQMiKdsNPG67dv+PrC9?= =?us-ascii?Q?8jjbY+fnsmqUDTXnuoJFFTdqLQpDoEjIIyR13pI9wUtXFLX9sNSGId7w0RTV?= =?us-ascii?Q?bD1iXDjQU8GtugL54pPRe8JTie+UiER6G3wB39V90Dd/YqWfIYVDq2GfOTn7?= =?us-ascii?Q?jX6qmFOm3nRqKjNf5j3FKPULnqUZOiuaIV8zGaR5uLuybsA7uu1jMEPRBkLp?= =?us-ascii?Q?EyM7eH5040KMFjiLKKwZaGSJG1JkdVwaOG9I4pNT1DgAqCRlWzFiEV+j/r3W?= =?us-ascii?Q?DGQQ2cdq29fw2frSXKXJKXr8yo8GRuDV6RPRfsajulnkoaRiW7KLd4Gd/UHf?= =?us-ascii?Q?Zw=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: p2NnE/hJ7q1v01AkUNvv0k3pEu41kkDALD9j7l4jBiecHNfKtqQm1nLGaETHsOA3J/ThO8ygqGRUQdO0pbOo+Tq5lsyDgl5ZnDWp/cDXMsB8hEYnRmq0aeWfuohqtpbCiZNxGYv/+sIA8RkeJsJl3PHa0KMMNOGtPwbL3TrdYgIgwGz6ugGoRDEKh5Mq8N+Q60JXb4qSNcHX+DAptZo3l1iJGlpboaplJn5C/H2g9Mit/x80xEY6D7G+kRXN0rvr/cpQTL5tat6fBe/UNbIx6QVBraM75+PfC9Q/pHjjIDuyDZvwyYAlLIDAkkcak6NCwXIbMNMrWxy48RLN2n7NAo0TUSsz8nDvGRTMiVjosiZMqBZMvuP4dm74U/vddrerzM7hVzZu24zaUEdxm8N46Q9FamPMEmfjumIcO09ow4q4+QqY7VYOVZ/GkeNeo/EwoSH/Qhcbi2/USlOtyrHGKX/QVsb+Xom4wU192UcngVwUg71iavRCCDspsQMMAUuM5RtlmiU3NdtGFywrGjN+aT6gP3cWRw/LP6W+0b+vSRW2sIV4J9Yr8mXLdPEIJtU6zTzjzMhVqhUgOIUmdHtoABBYNjRcg9baRBl/B3MDJWI= 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: 13d32258-7888-4dc9-c0d5-08dc0dfec2e4 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jan 2024 14:58:22.1863 (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: aW5PHqW5tR45kZoRw598KEgZZ+iVHcK/IhFUvnmm/VsmsncbVW9rDtHCDSN/EUbVDhtzmcRZk9wLK4a2R+VYcmh2RhUbvNAvA0JFragH5kY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7914 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-05_08,2024-01-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 suspectscore=0 phishscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401050126 X-Proofpoint-ORIG-GUID: DSvyazwLEeUsjbkOh8oc7urC6oWgx20o X-Proofpoint-GUID: DSvyazwLEeUsjbkOh8oc7urC6oWgx20o 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 Hi Stephen, As part of hash calculation logic, the hash value is going beyond 32-bits a= nd thus the eBPF verifier throws error with the 32-bit hash variable. So, I need to modify as 64-bit hash variable to resolve the BPF verifier er= ror. Here, in the code this rte_softrss_be() function is returning the hash vari= able, which is a 64-bit value, so modified the return type from 32-bit to 6= 4-bit. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -static __u32 __attribute__((always_inline)) -rte_softrss_be(const __u32 *input_tuple, const uint8_t *rss_key, - __u8 input_len) +static __u64 __attribute__((always_inline)) +rte_softrss_be(const __u32 *input_tuple, __u8 input_len) { - __u32 i, j, hash =3D 0; -#pragma unroll + __u32 i, j; + __u64 hash =3D 0; +#pragma clang loop unroll(full) for (j =3D 0; j < input_len; j++) { -#pragma unroll +#pragma clang loop unroll(full) for (i =3D 0; i < 32; i++) { if (input_tuple[j] & (1U << (31 - i))) { hash ^=3D ((const __u32 *)def_rss_key)[j] <= < i | - (__u32)((uint64_t) + (__u32)((__u64) (((const __u32 *)def_rss_key)[j + 1]) >> (32 - i)); } @@ -119,137 +107,78 @@ rte_softrss_be(const __u32 *input_tuple, const uint8= _t *rss_key, return hash; } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Thanks, Madhuker. -----Original Message----- From: Stephen Hemminger =20 Sent: 05 January 2024 02:09 To: Madhuker Mythri Cc: ferruh.yigit@amd.com; dev@dpdk.org Subject: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per = the new Kernel-version upgrade requirements. On Thu, 4 Jan 2024 22:57:56 +0530 madhuker.mythri@oracle.com wrote: > -static __u32 __attribute__((always_inline)) -rte_softrss_be(const=20 > __u32 *input_tuple, const uint8_t *rss_key, > - __u8 input_len) > +static __u64 __attribute__((always_inline)) rte_softrss_be(const=20 > +__u32 *input_tuple, __u8 input_len) Why the change to u64? This is not part of the bug fix and not how RSS is defined.