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 8F9AF4383E; Fri, 5 Jan 2024 16:03:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A73F402E2; Fri, 5 Jan 2024 16:03:59 +0100 (CET) Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by mails.dpdk.org (Postfix) with ESMTP id 47082402CC for ; Fri, 5 Jan 2024 16:03:56 +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 405EqKR0013813; Fri, 5 Jan 2024 15:03:55 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=Lrcs/Q1nmrc1Zn3m8hZrpKjBeD8KLRLLg7+PdenG9Nk=; b=G3bBNKA/niWKlphjk5qpGBHHyO4wGIipYmi+LxzUugRYSsbfQ96j0iC5sD2K2YNQfZSW gG9mvvmKo89KcHigJP5NlOD0t9oZ7Srw96KsqePqUbhYW6Tfnu9j47fyb+FC4CzfMQNf CjmUnKXvYS/fcAanAS0WIjjKLAd6wlAJKF3Yb8OH4A/R1yIhvIcb77xvs1TmQcvbOfYA OmeTNuZrodaMd0gUEUOy7EklOJhlLmlxn3zWty5yH80czMnlEo5nr79KYo97OFNWN1eE c/DOST70fpRpo0+2QHsvlS6xCpU10xZBlbotR1B/PYizzPeP6POFE3fKMmYVghBjabeu eQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vekwm811t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 Jan 2024 15:03:54 +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 405E0oho009315; Fri, 5 Jan 2024 14:58:54 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ve12hsrw9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 Jan 2024 14:58:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O83JyEu2N1II2VsDbasvtad/MeLvCgL8MeIVgXps3lXuxGwZYMzQs3rzmVn+w50NaWT34ylJNW/LIfvCrLh564tfxRx7E1AYzFHTPlDFn0qFcTAhrB/YPXbEHbM8NTeXVLjW3qxF6DuDXoNNS4aXzPSAEfkVoWnSS3B31WiG4bK3udd/NXX9NGhb62A4g819HUYUGRze28jjGQMbZH1MCtcJENs8aVMbwyXoy5xfHFxTuD4qWGYrBneG0zRK/vfOCfdibypEktQW3pFe2T+zPSmp1vy8nVRAb3CQR8NPyabEKq/zcSJYzT+Zhluk9WJFIQ2zKNTeV6dDW4nZODDoAg== 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=Lrcs/Q1nmrc1Zn3m8hZrpKjBeD8KLRLLg7+PdenG9Nk=; b=j1vRl14xs86sHQiycgGtCKzLewkreYb1XXqs9gtQrSBFTiiASu6EAR2W4VYl/GTwF9UZMtcBkgHGvCio1Cl9a4WeizKjU0d+6crirxfnh3qEzVVLszme7qIkcEXKmAyLadHaIIqNdghnev1alj677JWJKNXJcU8NlpNDWx9ZaDgGCah4sTfeOWLDiPH1QXvYpEKoEQpTqKndk9ezjv4Rfcuh0dZl11a2YdZB9fZEQbVVfvp31iBrzTUB6fMcnXV6RDI9gBt5zcX8TOFIa2Hc6aztmaWA28O5roRQ/kMfwXpL6NLlD6VPs6J5nOX7Y2m2W9KmtXKknQwFA/oyPylSTg== 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=Lrcs/Q1nmrc1Zn3m8hZrpKjBeD8KLRLLg7+PdenG9Nk=; b=MjUSQtPcqoojPHHm5Ud+nRc0azTt3UoHhLhDrBapijAi5trRpdRvhvG0Byad0pMNvOGh8hhFWTV9OdDFbQJrTiNXERCGZL5WTVg0tXxDtR/xtefpueXgAA+5ydRUmPO7kal+xdy2MDTuAjjEF6iI6NRWK+tp/+axfhEMDgq2pqY= 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:51 +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:51 +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: AQHaPzO4tzDzcCULFEKTKYP0ti3cpbDKG7sAgAE1KYA= Date: Fri, 5 Jan 2024 14:58:51 +0000 Message-ID: References: <20240104172756.2213-1-madhuker.mythri@oracle.com> <20240104123200.740ddfd8@hermes.local> In-Reply-To: <20240104123200.740ddfd8@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: 2df8cef6-f2b6-40d5-ef30-08dc0dfed440 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Mug2sah7PRcv1oxg16IPHQsG6pEoXwPP6xbncQiV8E6Y5GaU7VcZN/NCs+lQvUnBIp1mvQq1ij1vpjmctBdOpAr2ucuyUgrQPn8RD7pvBAzh8zWzUpOiPvQtRFy/QL8nX6OqXrv36ZcUiMbiNDgNn7KDmB8yND+7ZBEWjNSn2+txvoxisju5Auj4V57gH5hadnb4Jl3xp1GXP+F0zoJ63OrI+W5Ci/pq88xs3jqGVdzO9VGcYuCB7grqIzMD6uepMpJ7QhxsUMm9iYWCEzPhRn4o5sdhGSRKiFq5y30f7QOl6K6ZFLWceYMT0L1DSKuZd+WFkhxYbc/ePSHlFnOMfq9tC5MWe12mI5WyKiBfDqy7NBKwiyijbewkygvOQiBgnnNP2bb2QCUZnA51c9N9cfz75EydbLEOHgfcjrkSyLZQmKJ02BYySteo7HQPE1Mtc4xY80ttWf6T5ol57aQAThP6OYGgkYhYtjnxtk5ViB+CZr0JNIhV7v+ZjZmZuelDDZTlL/fftKFpk8ZSxt5pVms6b+26j5UaHcjgxMYK/+mYA1jRa/Ef/4jAgfy9Rsjgltq5mgduuzXJo75+71fVYS69ziGepVfmtBh1d4r36X+uqteVhak9Tt+M/3WqPp9SjZKr8uClS12/y8LO7zt6FkUeuvy6M37jmrPuNLRYeKM= 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?MTuERqFM8aEFw1o435CirwYDl07XxMKvY7GDQBiVO5wzjBPTPS/WYBH30W3U?= =?us-ascii?Q?Q7hZq3yl6MFF5C/6tijy+WRix4fOzsvq9A7GPcjr+ObEyf62xV5A2mKM4QAJ?= =?us-ascii?Q?1k6/WLl4S2keXIXgI1EKbnfEEMQrzN/h9W+Oo+jR9c4K8FQYMX61b2RFsuZ1?= =?us-ascii?Q?/Rck/DAVm5+txss1jYwFIsqVPgojd5gCkIKEkNGsaqqwuCHsqzt+Vp596Ziv?= =?us-ascii?Q?8qZFnc9YqiUdimY7KHtGOvQNWiNLVTIHCi4rzWPZVyb+N4lB7/riOkbBJnao?= =?us-ascii?Q?t4+b0LA8lVn8rI3hm5ED+mnn2Klb/zaq1uOirxKL3TkwvAWyBHph1Hk+iNPJ?= =?us-ascii?Q?P/b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a0T01?= =?us-ascii?Q?PBfq846pkvefa2pk510nucos+4KfExYHMrOyI/tM/ZRf/jlacoRsCniIuUzm?= =?us-ascii?Q?vBLMbvz+e7FySaRc/n17xcJMpkQANkesonMAUlJFzeXMem/B0ESkeJVV7zgM?= =?us-ascii?Q?oXv24HcxO4a+xkoFZVCqKFeokB5IBRaohBJo6SsM8Yi0Mr1q/SS9Qd0QsPKd?= =?us-ascii?Q?Kao3e5dXmK4UZhVLd+XArHcoPd08pSNZb3vGMSCLfZGLR6vC2znaobi7Sm1k?= =?us-ascii?Q?61e2VlvRea3pGHRI1hrRlNrs0LDEkiP6jQkQFilFxdI3/Ve3yJMSu9g6qdZZ?= =?us-ascii?Q?NLDvr0CYmJK8ICs4G55rA+dQQN4w6u5BI+InpQHIo4U+Jepv9j6OPVKyKqP4?= =?us-ascii?Q?tg=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: EfJtwiwpx616hhiLF0sjcH3eJ1LRMmYAiEU/zno6h1wawBXuwiGJ6nvWhDuI6PU/4oz7952B66vVN9T3pBTmXunVNyesnXBTKJcDbcJqi9YkW4+rNq439m4raQ59nwUnxlblVLU9TU5+p8JiKi8TyDJeMYjzw4TyNcBEpBqVhNL7/+oees7ok2Oh+yZet2vi9XRHiVcvXv1qIzElM2KRliQzghvUFxoY7KJ+Y9XksJBxB4wEWoOcwORzwESU4suv2jxdvTg/t22sEML8CUafPo4fFVjlkMFrH2gZY+KY8vbHJY95IoJFYlfIbyC7eUpM0hG9l0ikQMf9ldY1phCDjiGfa+M7VTyIYvoE2+sOzOuuiCwo4cNIVPhE78zhgo/9mIbqDEgm+7HSJ9PmwnsVeWQWmsTltgY47ucvYTkX/cAUHI7E3rPIf30iYtfYlnzZMYfPfxqPh0G/9qvs1IVJA1BsbsT9ySAfgHrch3Z7+pJgl6bX6rYRxymTWpiHHmle5U9ufRClRiq1MWRPtZvd1REBxrL3hdSLqddSUyiOa6Zkui9aqOpzPngId6yGc10JnUcZfFQ4zz2oLB/dDEOxT6H5SI5bk39rGsdBADl62yY= 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: 2df8cef6-f2b6-40d5-ef30-08dc0dfed440 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jan 2024 14:58:51.3193 (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: b22dInbT/MTLr2NEVmRXub7VXFbZ0A854ZKnd4N+VWJxdtn5hP7YWUq6bOHz5/KAvBtycStYIHsO4yqKv0Bon+52z94zepwCImFCrHrZ1MM= 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: 3TuDX9nzzH9xsVOff_YM5eUgB7porLWy X-Proofpoint-GUID: 3TuDX9nzzH9xsVOff_YM5eUgB7porLWy 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 Sure, will update accordingly. Thanks, Madhuker. -----Original Message----- From: Stephen Hemminger =20 Sent: 05 January 2024 02:02 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: > From: Madhuker Mythri >=20 > When multiple queues configured, internally RSS will be enabled and thus = TAP BPF RSS byte-code will be loaded on to the Kernel using BPF system call= s. >=20 > Here, the problem is loading the existing BPF byte-code to the Kernel-5.1= 5 and above versions throws errors, i.e: Kernel BPF verifier not accepted t= his existing BPF byte-code and system calls return error code "-7" as follo= ws: > ------------------------ > rss_add_actions(): Failed to load BPF section l3_l4 (7): Argument list to= o long > ------------------------ >=20 > RCA: These errors started coming after from the Kernel-5.15 version, in = which lots of new BPF verification restrictions were added for safe executi= on of byte-code on to the Kernel, due to which existing BPF program verific= ation does not pass. > Here are the major BPF verifier restrictions observed: > 1) Need to use new BPF maps structure. > 2) Kernel SKB data pointer access not allowed. > 3) Undefined loops were not allowed(which are bounded by a variable value= ). > 4) unreachable instructions(like: undefined array access). >=20 > After addressing all these Kernel BPF verifier restrictions able to load = the BPF byte-code onto the Kernel successfully. >=20 > Note: This new BPF changes supports from Kernel:4.10 version. >=20 > Bugzilla Id: 1329 >=20 > Signed-off-by: Madhuker Mythri > --- > drivers/net/tap/bpf/tap_bpf_program.c | 243 +- > drivers/net/tap/tap_bpf_api.c | 4 +- > drivers/net/tap/tap_bpf_insns.h | 3781 ++++++++++++++----------- > 3 files changed, 2151 insertions(+), 1877 deletions(-) Patch has trailing whitespace, git complains: $ git am /tmp/bpf.mbox Applying: net/tap: Modified TAP BPF program as per the new Kernel-version u= pgrade requirements. /home/shemminger/DPDK/main/.git/worktrees/libbpf/rebase-apply/patch:98: tra= iling whitespace. // queue match=20 /home/shemminger/DPDK/main/.git/worktrees/libbpf/rebase-apply/patch:243: tr= ailing whitespace. /** Is IP fragmented **/=20 /home/shemminger/DPDK/main/.git/worktrees/libbpf/rebase-apply/patch:326: tr= ailing whitespace. /* bpf_printk(">>>>> rss_l3_l4 hash=3D0x%x queue:1=3D%u\n", hash, queue); *= /=20 warning: 3 lines add whitespace errors.