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 A876343843; Sat, 6 Jan 2024 06:47:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A67F402B1; Sat, 6 Jan 2024 06:47: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 D5BCA4021D for ; Sat, 6 Jan 2024 06:47:25 +0100 (CET) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4065Sdk7018799; Sat, 6 Jan 2024 05:47: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=DTmeRfJStxNWnznJ0Wleb/RNZFll84mAP9bXVRP+WW4=; b=GzKTM0vz2gR0blceT/3deGObvE/4/pfIY5lxwc6G+zYXoRL0uZdQY8gHaDe4qZFmHDBv ebt1ywQ0zJ3abDGb7qkIxGqpxNp4BYx+c8Mf6MowSik9BdXJgS34ve40+eyzJ8CnCHtd VeYWvAh2ZVr3uW94lExX5zHjhxlA7LyF7fh1LPr8+GNpV2Hdk5cZCxv1KtPF2fr1PhX3 tGn8O3Liuy6dtGAz6VJba/ljxFelSUyyuaM0g3OhwmhTndGKZt94De/R5DJTA+/sFKWf dU/+QM7ntAJdka92xdVK8YUjfTkp93BSGz08nFhiWOTlGQURbF1Wh+WC23lZM/zECg4a fw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vf0rb80en-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 06 Jan 2024 05:47:23 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 4064cdON003590; Sat, 6 Jan 2024 05:47:23 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3vewa9npqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 06 Jan 2024 05:47:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FuaNSfVdH+57j3qkhaSUaqiUU4wvX2QYMuRLgZIy0ILQzUn4Gti4k47Q7YaiaJAaWsN7N5FX1SIoaqJFglq8ykJHGqMCSzsAnmqXLVuYbP7PZ8pSluJQj72ahQO8lit4Wm3Lj5t2UGyVNbH53smSlCtAsa48AurQYHF+OCce7s4H5xbYfrwLmsCReIypHde86BoiNtIo30DhAdFGdmKKp9C1SJqRL9NQBy7QpczQxPgO+13f32Hc+jqyKy52Le/qL7gNjdZnRReDRnsWPCGZ5F/fMhpPWE76EfCGRMrSM+9ZOS8SMdDNd1UFXgUNzkLfzfa0ibwfvSXtL7CONedXxA== 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=DTmeRfJStxNWnznJ0Wleb/RNZFll84mAP9bXVRP+WW4=; b=Tpn+KUhz2OnfQmOFucVOVC7LJ+NRcun/FZBbreX5NMLFReT7tfc5V7XH7am/uvcYa7fAh0l/4XJZHzN3eqCy2x2eOfLOCuJ/sC5103uNClEgigAyQ78Fbf59/HFN1NP/vZjyF0reE5zkxSpmlLDNFw/3d9M2xzuuMyBW9Z3O5afjsZ4L5ypsZCbc+Fv8tdRvRsrB7plG98/1m9BnBBaS5Up1Ys7SlEZA1TcMKiHDaLBUnURVyR02raKovCr1ZRph1bex7hZg21enHHlA67Y4T+QVgrCEJHldedIZZd73VhfqLNRoja6XE0lzonmnmwAs5x0u/kkHVWLdcEqkSqN4ug== 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=DTmeRfJStxNWnznJ0Wleb/RNZFll84mAP9bXVRP+WW4=; b=Lgbt3WInyFWpIvR+qoz2rCvQkwB0TGwyJagVjHcd9jZCopYH7F7LINWuHe87uOLjG7f/i5Moh+K2iI/1vSBQ0eLub+TYLG6+Al1+UcPVS41cJ2M4a6OMwUTAkv0r0K/BcP7OJXDYmfjqpTwQVDeGAXTO5XOk3dTn47RKejHYbNM= Received: from SJ0PR10MB4798.namprd10.prod.outlook.com (2603:10b6:a03:2df::8) by DS0PR10MB6799.namprd10.prod.outlook.com (2603:10b6:8:13f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.17; Sat, 6 Jan 2024 05:47:21 +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.018; Sat, 6 Jan 2024 05:47:21 +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: AQHaPzO4tzDzcCULFEKTKYP0ti3cpbDKIr2AgAEnpNCAADOCAIAAyIVg Date: Sat, 6 Jan 2024 05:47:21 +0000 Message-ID: References: <20240104172756.2213-1-madhuker.mythri@oracle.com> <20240104125705.3171fe53@hermes.local> <20240105093934.1a0b59a8@hermes.local> In-Reply-To: <20240105093934.1a0b59a8@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_|DS0PR10MB6799:EE_ x-ms-office365-filtering-correlation-id: cad27028-6ab2-49f8-3850-08dc0e7af36e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1rRVaisuKd1PwtL/yT3mRBRPFOzkmFqJMYTt9LIRm/A7iXnVQiUOiKHoowXq8oVBd3qpb1mgqJLdKIFCCgoIoqHA7wKGHf0JH+xj4vAwSaOI8JAAmBW0GDv2mP3dMMZBuij3EfbzpdJU/8JEmwJVeHa/4aM5MRUmJJ3UvZv9Pf9sz/NesBOyasRobX1E+edu01yqrZPA9hdXHtVsArfb+zSKlp1hGjHnf0mB6QZbjV0klfiTWMZjWIm8zVg8Fl0N/6ZqNdsVk/UdyYqxO/8tyxGjhFDDg6JfRfnM4xPdwqVRoajFJIfVmWMZGtNnTlarlWj8XwZaM+TFnoVbk53ewJMFri0+I2xlFhb/x6vT2s3CRwpeQyBpmaJUJcLc1fW4Q3jcWYwbMLqLXdWVQsFdXAQ0aPp8CVzHZ0IkO3SZxt9vjooltIN1dVwDPp37GVsHaeNWAsoxh9+BD/B8SQ/EetJJeeVhXg0YZhbM5R/vG1kYir8R/iPjwHKxUk8HFuhhhzVwkgXCMUBPLG2jOwq7gBBjpsllXSBtiXSeXS5TZ95HSKLYF7kgY/vPlbvcOMfPwy5o8HTGKi0UEjoobjkezTu2kBSP/gkh0FiDK8+DgoAXoVU4ZktBpBEYKZl9rgdThVCTeYDl/aDSOHO6+eC6Xg== 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)(366004)(39860400002)(396003)(346002)(136003)(376002)(230273577357003)(230922051799003)(230173577357003)(186009)(64100799003)(1800799012)(451199024)(55016003)(83380400001)(66946007)(76116006)(86362001)(33656002)(38070700009)(41300700001)(53546011)(122000001)(38100700002)(316002)(55236004)(26005)(9686003)(6506007)(966005)(64756008)(66556008)(44832011)(54906003)(66476007)(66446008)(7696005)(71200400001)(8676002)(2906002)(478600001)(6916009)(5660300002)(4326008)(8936002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vmMXZJ1V+FFODvtkSRzHyt098fWi0rAml4YeLe/BWkZQIEVqn9NjK8wJbeV+?= =?us-ascii?Q?0BYEupgPuQ8vRzpUV1CIKDCdyl12tfRIRo8lcQ8AzAc7dxPEpUXccf7gMEi4?= =?us-ascii?Q?XeVwk+s3643//OnB3NJG0UvNYz9VvYNl20if+MGf7vKvT+EHVEedY3ByM7F8?= =?us-ascii?Q?NDobifmpTu44tinJtUo3c1Vg29Z3We6lHaG2r8Xdu83R39ziVU0y0ozfwNjB?= =?us-ascii?Q?23evny8PXq4au8Ed76CDWwVg49K0FN/VgcX7vxz53ynYiGekgYxlsBxiQKp0?= =?us-ascii?Q?tkCAqOT8bT4wScVM4F1xCwEdYNT7Qcvu1vNKuhmiZhQDS0d5NLHkKWO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mUsqCESiujWDOYO1DmfsLHRHnU4znTYBBMeW+c?= =?us-ascii?Q?h5TEi8KUajAwXY60rbVLB7+nQaIQNPnBBCoKFXocPdzlquWTlsQeT9dWDiDo?= =?us-ascii?Q?+xtlZL2Opq+4CSYfhtVt9tyQ4lbCrdLj9iGd1LxU2+qhiV9jrYjCIY3yN11L?= =?us-ascii?Q?jqT0AMtdJAI3OuRGSIyMjxnVGoQKCFvgOcWYxKXeaQM1v6SCEf/WvgGT+DEk?= =?us-ascii?Q?dlIgjT3hYBxQZZ8RL/OnvxxXTybH03GnSlLbqaFJUjjUGZA+jTN317qSv2eU?= =?us-ascii?Q?WiNdBLpIyACg7EPRUHxkEAVas1wFaLalKzDmDXWycIusP8eNqtN+uPcyeFRB?= =?us-ascii?Q?mFtQuJWdn3W4rwZ390nlh+VkU7cpE2DCLm3bB/rbHQJpKf+AeqGoY5Lg6w4/?= =?us-ascii?Q?pw=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: /j+jiOmfskHo0bfYP1S26iAUuS8Nob8mKIeY5Ib94BDq84Y2UH8/5bGdZu2dd0RxWlZIlLTOBvv7IaxD4WvQ7UyQ5fxqd4Q76J+G7Tnms2kst61ElGMWJNJOV4BNwB4iefZui7t75TbVYpbvWFhK0XtZwmUma+VpEcrlA9LvV/2rU6uQo6D1hLxS1vo4bx4WrBrjxOSLCS6UKQtspzrgpMpN4EOo/JGYR9kC+Ol+Zu8/EnfxZvD+vIszLP/MkbDapCkz40zfezUFNSdTRXLYb28weG19zShlbhsQD/HEfBdVQ+G7DGHhM0n5gx1edsZXWU6kgBiVG3lgrwhOxZ5fvUPZ9fJWp9Iaic3jE8n9wLL/m/gpcPdtB3+UVURFkkt76D3CfdOZYa+JlaZxxAwTWlpg9kY9hzUeFza+d3IG4hWocavE9EP4YVX17EqPhklA2/bQf6PgtNYkh+b924BDZ3MOu3OUZKvFRb3fToyYKCGYcglimgCm4ywIZ22itlUfhBpob8K11SHC4ITWKe1CcGTAMpo55saSKO8yIWPlgYrNrsSHDzg86vYTYu92kLza8i091qDbI4xlFFFeAv++wX6lJQcrMNjQcpBA5S+MCHE= 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: cad27028-6ab2-49f8-3850-08dc0e7af36e X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2024 05:47:21.2419 (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: pwLNtFxhSxdZUxSr0O9MpAHyZEa4TH2/IlonnElve6hZryfLiFHCLYEFbwsLCDR6hBOF/3eaOYlvwrgYCSBXG8Enc1xv8AP26dfLBrbnTi4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6799 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 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401060037 X-Proofpoint-ORIG-GUID: Sh6IZZmAEmvjqqTDKV5p02nmxyZ5nhkS X-Proofpoint-GUID: Sh6IZZmAEmvjqqTDKV5p02nmxyZ5nhkS 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 I had tested with 5.4 and 5.15 kernel-versions with this new changes and wo= rks well. I found that the helper functions were introduced in Kernel 4.7 version. So= , thinking this code should work from Kernel-4.9, as mentioned in the TAP P= MD link: https://doc.dpdk.org/guides/nics/tap.html. Yes, I understand BPF program code is very sensitive and difficult to debug= . However, as per testing this work well(able to load the RSS BPF instructi= ons) on Azure/Hyper-V platforms with failsafe/tap PMD. Thanks, Madhuker. -----Original Message----- From: Stephen Hemminger =20 Sent: 05 January 2024 23:10 To: Madhuker Mythri 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. On Fri, 5 Jan 2024 14:44:00 +0000 Madhuker Mythri wrote: > Hi Stephen, >=20 > The BPF helper man pages implies in that way and the SKB data pointer acc= ess was working till 5.4 kernel also, however from Kernel-5.15 version, we = do see eBPF verifier throws error when we use SKB data pointer access. > So, I had used this helper functions and able to resolve the errors. This= is helper functions are safe to use and also protects from any non-linear = skb data buffer access also. >=20 > So, I think using helper functions is better and safe way to access the S= KB data, instead of pointer access. >=20 > Thanks, > Madhuker. Using the accessors may mean it won't work with older kernels, but that is = not a huge concern given how fragile this code is.