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 1D74E43843; Sat, 6 Jan 2024 06:36:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF3AF402B1; Sat, 6 Jan 2024 06:36:24 +0100 (CET) Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by mails.dpdk.org (Postfix) with ESMTP id 111B54021D for ; Sat, 6 Jan 2024 06:36:22 +0100 (CET) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40659xaF021050; Sat, 6 Jan 2024 05:36:21 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=dHjac2RoKyRcSTj20fg/Q+NRlDvxozony7FEbfmHhfE=; b=m9ul4xHt4NlSiGztkv3Pq9Ua3YH4aqZlYPlxi8HK1KPQqwJ4VenoPmDVbWq0tZnRvUbs R9pHYmIEy7Mjksy1IoJDbpwP3e2hJV5tp2ibF7L764qF7WcpvFRzF8hFjzyGqOhxlpxW nKn4wstXj7fSf/8McCcuNDd1RCGvC94+Q5NAq1GtTg3ZvfC0pefotFPt3R8AaQx+R8VD Jp3BbrI1QQUYM7qVZBaWFYF4aeMiNn6H+z6h7OAOAPdJy/WF4rjD8YoAnO16C0E6vt9n TuZP4IosQreSJra9lpWdY+L94bjumcdnPe07xv4QrL6A8PlAFAALz/jmppFdBO31PpfM QA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vf0fd80uk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 06 Jan 2024 05:36:21 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 4064chP6033611; Sat, 6 Jan 2024 05:36:20 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3vewa9p065-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 06 Jan 2024 05:36:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YXQJGVJBH7K1/MR2W43kUiNdjFdhfP9a6sId4arQa62T9l0WlRohlLNlWGE5SnJcOont3/itB4iR4v1UX0l0BjKV98G6VZ5nL34HmFQp4pywKHwEC9CrPo8LVXVbsJwwnN7/AmlTwPaloykYAA7sUuIzLybjnBHjf+Y/7/tcgpDgAxQUs/I1PUKf7MZV8oTQKdoNvbljjLxomLhXAMNAfutqO4SKIHB+LDmXI5Jbv3ZyFF6JCPwy6K5c7YOKFFl31+JqvX5OHX7sQeOhozVKEEj3VFb6CYKC0SzcG/hLojyghBguJAo5YxkqrkxSXbsp1YAqv4bQJlqFF3wtl63cmg== 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=dHjac2RoKyRcSTj20fg/Q+NRlDvxozony7FEbfmHhfE=; b=NV/QsLVeXCCjuwCJA7D1VI4+6MopcWSELJ5oKpE+ZzXvg5ByjDGaYUAAm8mmeLjwP5OcaPmvWtAxS1O/uML+ccxvg361o2/iHPaJ2cd/kxiUGgrMPfx6j/VGX0lP8025afTnRwFK5JZZOXbLH0BIG0ehnSMsjPST0P3WgN+v/vkpcgN8F9N1CcSJGsFwfgsAelcQ0Y8rba2dHirJU7OVSLtoVJlf/lElQhrv2gjmX9P+nYUCij/VjAQW1W2deubdmIk9YXBFkJ7ASGN1HcEWPpHzWHkUfVbTZXXaJ0xu/HOdVRejm+DVwM0LHZa0STRPLhVOisUe4HXPLhBN4J/+Gw== 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=dHjac2RoKyRcSTj20fg/Q+NRlDvxozony7FEbfmHhfE=; b=aGdd6remj3eFucHNFW07SxREaQRGBElLjd3qQDokV58xTpWhx3tbJEVdDkxUfM8nRM/tiapUPreiSSCrBW6MXt+Fg8xTwS4Pq6JmY59rbR9yCd9tgKGLFIwf2gYEuM44QaGf25eRLPZN6aZdr5Fg3DSe34zWbxtIRKMK2JyO7eM= Received: from SJ0PR10MB4798.namprd10.prod.outlook.com (2603:10b6:a03:2df::8) by CY8PR10MB6489.namprd10.prod.outlook.com (2603:10b6:930:5f::22) 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:36:18 +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:36:18 +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: AQHaPzO4tzDzcCULFEKTKYP0ti3cpbDLnP+AgACn7iA= Date: Sat, 6 Jan 2024 05:36:18 +0000 Message-ID: References: <20240104172756.2213-1-madhuker.mythri@oracle.com> <20240105113055.54190838@hermes.local> In-Reply-To: <20240105113055.54190838@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_|CY8PR10MB6489:EE_ x-ms-office365-filtering-correlation-id: b97ea114-6962-47fe-27a4-08dc0e796857 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GLEO2Eg+q/pEpHt15NAeRZgZP52aLCTrt5VQE6BJgN75BsqK5M9z/Vi97+M1F+/JM49BZ+360FU+Biw2XuZi4ax5N2wFa0cjdfm1oixGVz9M2ULykQI0F3o/tI/YrR3EzsANfHYDRLohgtn0jIHv6WGRoHsDtXCMNve60lDE2MuJCjk9EpuXB+nvSeTUo/+fA/0JWYYHkiJq4PtHQu6/yQhMj8B2C1WbrKVP+d9Zxh3U+1Ymb09uxRs8N5WeZXf3txlwFSa9SnbPivb2teXASHYDU5WDo97dlrKPj9xHhH747KV3jokkXzeM68L/5ht2jFr0RyswUVd/flDp/12bLTXD2Txc/3OdpJxVjaWNsYetNUTqfGysR5wE1gSVkAlKIssXcKozaa/lrZFyzezqt+103g8GYDmwQLzXE026kiEVeSJfyitKxd7sKa2rkVjWrZsJeX0p1rtBBQsKgqCQDWfNYOvU3YsUlfr5Jqb3pS3Fb7/sQ0ySYyo2XkXvTCqOD2DMX4n0R4yIVpRw9QJb1wn7oN/pej3KVcJaHyTJXw+yd+rPmjyUmOoglr57YSBDUh95ZY4uXY2sqT2GEpOv+XoIHcCAenTxVfd7CKpdgDZrXbsn4PyqkWz7JTMrnkgb1X/4XI3YzW9Hu2xWtEEiOg== 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)(376002)(366004)(396003)(39860400002)(346002)(136003)(230173577357003)(230922051799003)(230273577357003)(451199024)(1800799012)(186009)(64100799003)(83380400001)(55236004)(71200400001)(44832011)(4326008)(52536014)(55016003)(6506007)(53546011)(7696005)(38100700002)(478600001)(966005)(26005)(122000001)(316002)(76116006)(64756008)(66556008)(66946007)(66476007)(8936002)(66446008)(8676002)(6916009)(54906003)(41300700001)(38070700009)(33656002)(86362001)(2906002)(9686003)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?bh2wY2lN49CUXdrhAUa4ossujHIUR0ud/1kJGocNQALAtqrwqjxn/Mx2O1Ee?= =?us-ascii?Q?DmpqIeHFcJMVrH5TYY83N+RvalliY6/LkPMN/YwstYaqqb4GhuKjMYUQlHd0?= =?us-ascii?Q?hJqMxMpRqREmKoTLVm4b3qZ6574p1TwXRK8O08+fdJ2kvhESePvdLvY7Lab/?= =?us-ascii?Q?M44GSIwTcxyJYqNLsXmCGv4NWDP7Yl7F+UZ0wE1U5huykU/RW0v/rgs6feBk?= =?us-ascii?Q?2esywZOUwKW4/WALtI50d0/rn+7SmYxfRurDRzHqrNAPLPosTnJS27BOOpqz?= =?us-ascii?Q?oBq+68UwmgYMBxSjQwnResIZhUSUNb6CuazGfwn4KbmHaqoFhphslU0zLVQc?= =?us-ascii?Q?396wG/vL5DhOnV4wNQcIumpJaw8YRAf1Jb+9gKRiyQBshixHCZ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retVRXvt/sPYh2Au5cjV0+j6OnQWa77LZDlXXR?= =?us-ascii?Q?b3g9QFFlT19uKtbGCp9OAsEYia8TmRHrw9TQ6yRLW+dF5ysJ3e6nzW/odYJk?= =?us-ascii?Q?qOFF3xvi+6Huc3ePJapmL/gP3zBy+fbUVcylahHizGJ4WTQ2bb1DPVT+z0tD?= =?us-ascii?Q?qNHNbv7H/r3BRlkWHnUcCm6KAwpImPRW3B8S6vWoGE7MefoPrDGuwLm3lDTF?= =?us-ascii?Q?FfN6BB+lTyDzad1G8MJnKnKBYhfcA5T2mP7hw6hLj3LqjdFaW1PSXTen5EGo?= =?us-ascii?Q?dGT1pIL7GJ96lQ6jC2/dz3EvFkGmC4s7RcRNV82EnxdlAoUi6Ymd6Jr9oEhW?= =?us-ascii?Q?Ug=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: mwl81kVNZCp+uOfBKvaQAs/oMcW1+Ei6+K/5J3QHR1gjgT7IgqkFjW/KWChMUFpqUxcvzIGmizahoU7kWkqBHuQGjSFXcX9aNoSa+3R8Hm6tF2L3iHbG+0q+jvhvK/xntiFWQiDsemzX+tYb31WSus0RkpfoVLbiKrhBMrLmS2UyxRIn3YuweTWaP2VYrtW8s08lOsH6wpbSZ8dUxVJQs1NTvTxL5l7uSbUHAuBLUJaQlZp4X75qYAcWzuHOqWk3NgDHW1rNvZz7JWuXBrWy22u3Shnz8lsxQdJc3y/q37EUQPBY5cC3ioky6eUJA7YlwD987deJN/748U2cEXPvDMB5frAdLZBjlgIyeQ/mAC8DvdWrqVgkI/M0exXN7FxmiGmc5s/AL8vLuSfDUQcmLKTQpvv2pC/gfy/3fwYrnQipN4/5YgUmBGD85+7EV02HIIZynHWnkU5nXO2ftZLja3muMtHAna9N8Vz5Rw31qmQBi9keIEoPGR6Zw1iCjRU/DvBlIkqkvzWeDEcbNfizdG+hPHBrFMYhsdSuMkyelIAZ28oEiLr0lhWL6GaRwya2IKGC4smBMI7+5UAHGCkhzqVeF1uEKRPyXhldprxRXr0= 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: b97ea114-6962-47fe-27a4-08dc0e796857 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2024 05:36:18.4056 (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: IyFMewmktuvQLfdBZStljL691HubBsDTJb6tyEBQkjuCI4hfzoUmAI2QST/GmHaX00N62RRoo8Ob6Fukb6MAQlMGTxYTV1/xzjGQDNQaR7E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB6489 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 spamscore=0 adultscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401060035 X-Proofpoint-GUID: H18y3RAi1CAT_tYhX4p56UeT-gE6IqAF X-Proofpoint-ORIG-GUID: H18y3RAi1CAT_tYhX4p56UeT-gE6IqAF 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 The flow creation worked well for us on the Azure/Hyper-V platform using fa= ilsafe/tap PMD, using Kernel-5.15.0 and 5.4 versions. So, does the original/existing code works well on Kernel-6.5 version ? Thanks, Madhuker. -----Original Message----- From: Stephen Hemminger =20 Sent: 06 January 2024 01:01 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: > adhuker 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=20 > too 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 I tried this version on Debian testing which has: kernel 6.5.0-5-amd64 clang 16.0.6 If build and run with the pre-compiled BPF then it will load the example fl= ow (see https://urldefense.com/v3/__https://doc.dpdk.org/guides/nics/tap.h= tml__;!!ACWV5N9M2RV99hQ!I6LFEsrAnlW2WMQlCy7Sxw-9MxJ_Qtchg-aZdal53Np6QtmC1wW= sMdG_uT3zc57Yu7kvJANA-dQIirEUr-BWfaVXhGtd$ ) But if I recompile the bpf program by using make in the tap/bpf directory, = then the resulting bpf instructions will not make it past verifier. With modified tap_bpf_api can get the log message as: testpmd> flow create 0 priority 4 ingress pattern eth dst is=20 testpmd> 0a:0b:0c:0d:0e:0f / ipv4 / tcp / end actions rss queues 0 1 2=20 testpmd> 3 end / end rss_add_actions(): Failed to load BPF section l3_l4 (13): func#0 @0 0: R1=3Dctx(off=3D0,imm=3D0) R10=3Dfp0 0: (bf) r6 =3D r1 ; R1=3Dctx(off=3D0,imm=3D0) R6_w=3D= ctx(off=3D0,imm=3D0) 1: (18) r1 =3D 0x300 ; R1_w=3D768 3: (63) *(u32 *)(r10 -84) =3D r1 ; R1_w=3D768 R10=3Dfp0 fp-88=3Dmmmm= ???? 4: (bf) r2 =3D r10 ; R2_w=3Dfp0 R10=3Dfp0 5: (07) r2 +=3D -84 ; R2_w=3Dfp-84 6: (18) r1 =3D 0xfd ; R1_w=3D253 8: (85) call bpf_map_lookup_elem#1 R1 type=3Dscalar expected=3Dmap_ptr processed 7 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak= _states 0 mark_read 0 port_flow_complain(): Caught PMD error type 16 (specific action): cause: 0x= 7ffcef37e678, action not supported: Operation not supported