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 B9A38A00BE; Wed, 20 Apr 2022 12:39:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90C9540C35; Wed, 20 Apr 2022 12:39:27 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2082.outbound.protection.outlook.com [40.107.21.82]) by mails.dpdk.org (Postfix) with ESMTP id F209040687 for ; Wed, 20 Apr 2022 12:39:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4oaSFmqCuXGMGh0WOZIxmmTPp57KgF4gcCtqwugUi7y/xriUjxckcPQtK0QyPbcM6wTtbrIjefM8gyjBdr9zph73gLBnWFsxKCL3RBWq0/QVcW5QIvHwU7c/B26rnvTsd3KnH4CAivBziHYese4dO8WDbBoXcIyD3oTQ+umwiNfwg/2u3C7FiVMH3KMeo2zhSxCR219UWxeJhqvR4LI9kYXGtiX1PVmPcVqmQShklU/+Nrl072fofFuSrY8OR/um3Ix/+yFt5oa1ZpSrTmU8Tvr4EKFTq+VLf2YVISIIXx7EtMgYNPKCAgiKulB+bL0b8yWW9wD2B14TVpCk34WYQ== 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=TAZCc+aP0FgM2RXFrR5c0uDnHsO+xwV+jw5msp8+hzg=; b=O77SKA2oIuSnDrmIIfS0wQR/YkQwXkUjN0qUNpbHtybIQl5kCZy4Gj/uAyn879k+MNlIb5oEVMsjRT3dMO3iNWP7/pJ4EtqZLAgci7e98RLWwvJuHa9N43KNJG8qWf3cfstRaY+JEbajTZKJ5lFYGkKuVlZphLM4CkjFcn6dXqt8MJaBQsyh3nz+rACP1c2fleNj2lBamyUE0aMNxNYz7GfeVwv1PxrKc03/huy1M7yNtors+ctY0aL8AtkaQenc83NrEmj1aGP5QuX7Jz+9WbNGl85oNM3MzluQzrbmmVElXCNIHOO9igNvrkV8J9Cj5lVGFtxC+tA2Q9MU27XyYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TAZCc+aP0FgM2RXFrR5c0uDnHsO+xwV+jw5msp8+hzg=; b=cl9/5u+SR+0Ubs2sqNTTb3RndxR5u1wr97pdWqedVRUkLlAM8QAA/OZPQaHlaH4UiZL3IEcUxHFV+OwrOfdvGjldxNIeTLGHX2ehgPZ+wfOZ4aYQVrW0EJu9R/T+o30VQszcSQ+UWTsm2IIoRu6cFA1kyhhLN/2zzUWsjryX34o= Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by AM6PR04MB4182.eurprd04.prod.outlook.com (2603:10a6:209:44::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Wed, 20 Apr 2022 10:39:24 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::95b4:26a1:d97d:6916]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::95b4:26a1:d97d:6916%7]) with mapi id 15.20.5164.025; Wed, 20 Apr 2022 10:39:24 +0000 From: Gagandeep Singh To: "Wang, Haiyue" , "dev@dpdk.org" Subject: RE: [PATCH] kni: update kernel API to receive packets Thread-Topic: [PATCH] kni: update kernel API to receive packets Thread-Index: AQHYT/p6D0Wwt90vhE+TCVFyPdRjMqz4R+aAgAAtPoCAADCIUA== Date: Wed, 20 Apr 2022 10:39:24 +0000 Message-ID: References: <20220414122319.3519271-1-g.singh@nxp.com> <20220420050309.1055593-1-g.singh@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b21877e9-09a3-4b80-a918-08da22ba0990 x-ms-traffictypediagnostic: AM6PR04MB4182:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pcVeuVoe7rykvcxV0OdCRFTZlH++ZBoiDd7tJuASM6v8151uDsRXdkpPClrMjjOgpNXY0hLnNADRp0zK1S1jOjj9DGRpwUJ9a16aHdrqgxRfWO30rR8Mhonlbh+wbqmdDm7ZElme7FyzyL5sc00I+tC5rM24xzzbdXA6s4YBqmfRYqJW1GzKlA0qmazYst8N+0muH+HVh5/S/ogkkabknfP0VnTd88RIXbevcCPtcT5rHMoZi1nrkPxfIwpa34VXBs+Kh4tPFTdFawfGKELd193EJdiZIH+/VnDSpHaY7IgJo90ioNvad0wk8EMVMZ5/GUsEUhjmwwQ3NYsuRanlzV7HLDhHWoRv2Oy22/FY9N40eHipx9cuDBNHbjtaqayu6lZukDZCDOC9aSeIdEgT2byo7zTYGVhUZOfJJlL7PP+ZPWbDh+sFWh3/eRAyPeRRbJjPWloUm7cBYBOH1wIKZH42bXTApVosNYPTXeZz2pBY84wS1XLWq1m+gw8iuq9NoLNEsnWMVTdlQWdk34Iy3BpFhCEkhPIEw7NdjOAna04pGN/GBQnrCcv7yIbOYpQxP3jR7HXYlKEuJpXKU58nM/zMbbmyvDXystmZo1qD4W9noZesZOfQslX2VXrd3pmCS3tRrjK9PqsJASlir2DWDYTVNKvXh4D3Qmbo4vutkYw4BoQBQdhPIOg4/XH3F3vYN6JaBfDjv8Ga5WKAQi6M+hgLTQVQkj0Wp2I6cmsRZqHpPNjDO4Xv9aA3zogSNCiy2sddtQVrNWbjFvBDmiUhXWJMkJaARA61DRVh6Y2uEMo= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(6506007)(110136005)(76116006)(316002)(9686003)(52536014)(26005)(64756008)(5660300002)(53546011)(8936002)(71200400001)(508600001)(66556008)(55236004)(966005)(122000001)(7696005)(8676002)(66946007)(86362001)(66476007)(45080400002)(38070700005)(38100700002)(83380400001)(66446008)(186003)(33656002)(15650500001)(55016003)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qo7oMM+zy6oDx2046yKyOCKXV4crefUjHOCIZUfMxhiwPrqdVb8BpGE5zN+t?= =?us-ascii?Q?Z3+eVnUOCGm5xyvySoKNRJCQlruhnDKp6io7/82przZN8/r39cetgPZSDThU?= =?us-ascii?Q?iq59osG27e1ejT0WZxwHuHxFDaSNxuZUm8KYdIkN93vrwZAP+Epzii8eBd64?= =?us-ascii?Q?Uu3r8WX75pja9PmTPRoRsxUUKck+3hRZiAOEwmQe6bZArjafJQaqh38s9zjh?= =?us-ascii?Q?/zyQADO16mhAJX16m4KtK/rEGAxQaeVDdai+tgREC20qpFTOtazydKf5ResW?= =?us-ascii?Q?IheZVfnp81I+6i39Sxf1UUoiCXGVe+s+sxFncfgkc2JFnJTPZtZgmotmVBg2?= =?us-ascii?Q?raYswJWskvisVUoV5yn9kw11r92q9FfNNu/5BTA1RXujsfVdmh5bQ3PebRjk?= =?us-ascii?Q?avxh4I3VuW4k3acVDjjIJg/QscJBxnpYpf/L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Q?JYD9WCoqxOLt0sMtFAPumR2aWtjnpr7CJSM35xcR8hq492nf5DxPx4ZlxSRS?= =?us-ascii?Q?awalS1tFcLggGxLma0+6KPHJopQHVtTklXc7kcH4rsDrkJ0axwxoBIOCjvt1?= =?us-ascii?Q?/yk2sTO0m1MmsvfszbFHCSGP20Z3/gOUW2v84PrJxz3xBZ/JJ1zbDq1a/+cQ?= =?us-ascii?Q?AEf5zzUTYAzYSv/Kp6oWAUh7jBMtS0Zzoz8Ib4CXl9wVystCPNBHugBEHElm?= =?us-ascii?Q?a/0RAi44YowYymDzKvtHF3RyXGtlQnHeWBwm8FioGP12oz2oNzbQOZUs9zGE?= =?us-ascii?Q?oEC7qkTClvOfN0ZD8xPI+pQ7kR7Y0sGPETB3xe9BOtHx2yQgWr/ALdXMdPkN?= =?us-ascii?Q?KI+5Q+NhMSFA2jNrlKVBVw1wPPdM+AjIiH24t5+QT2zWLwlL?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b21877e9-09a3-4b80-a918-08da22ba0990 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2022 10:39:24.5145 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KeaaSe61zjr5OfmsrbbBb/vzjaiao0AFn8LWk9x4Ay0o3y/fByXG+OmYlKCUEFh8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4182 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 > -----Original Message----- > From: Wang, Haiyue > Sent: Wednesday, April 20, 2022 1:15 PM > To: Gagandeep Singh ; dev@dpdk.org > Subject: RE: [PATCH] kni: update kernel API to receive packets >=20 > > -----Original Message----- > > From: Gagandeep Singh > > Sent: Wednesday, April 20, 2022 13:03 > > To: dev@dpdk.org > > Cc: Gagandeep Singh > > Subject: [PATCH] kni: update kernel API to receive packets > > > > API 'netif_rx_ni()' has been removed in kernel with commit: > > baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any > > context.") > > >=20 > It should be 5.18: > git describe --contains baebdf48c3600 > v5.18-rc1~136^2~356^2~1 Thanks, will be updated in next version. >=20 > https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgit.k= ernel > .org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git%2Ftree% > 2Fnet%2Fcore%2Fdev.c%3Fh%3Dv5.18- > rc1%23n4917&data=3D05%7C01%7Cg.singh%40nxp.com%7Cd048462d38074 > e9f595a08da22a1f464%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7 > C637860376235475257%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM > DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C > &sdata=3D4S9btzMbli3YF5vA15i4RruVMJAzW1byT9gja0NEyFk%3D&rese > rved=3D0 >=20 > vs >=20 > https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgit.k= ernel > .org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fstable%2Flinux.git%2Ftree%2F > net%2Fcore%2Fdev.c%3Fh%3Dv5.17.3%23n4836&data=3D05%7C01%7Cg.sin > gh%40nxp.com%7Cd048462d38074e9f595a08da22a1f464%7C686ea1d3bc2b4c > 6fa92cd99c5c301635%7C0%7C0%7C637860376235475257%7CUnknown%7CT > WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV > CI6Mn0%3D%7C3000%7C%7C%7C&sdata=3DFRnN7H0aXinhQNXQ932FCNFZ > G%2B1kau01qMIvNc%2FPW10%3D&reserved=3D0 >=20 > > The API netif_rx() can be used for any context to receive packets from > > device drivers. > > > > This patch replaces the API netif_rx_ni() with netif_rx() for kernel > > version 5.17 and above. > > > > Signed-off-by: Gagandeep Singh > > --- > > kernel/linux/kni/kni_net.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c > > index 29e5b9e21f..764ac0b225 100644 > > --- a/kernel/linux/kni/kni_net.c > > +++ b/kernel/linux/kni/kni_net.c > > @@ -441,7 +441,11 @@ kni_net_rx_normal(struct kni_dev *kni) > > skb->ip_summed =3D CHECKSUM_UNNECESSARY; > > > > /* Call netif interface */ > > +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(5, 17, 0) > > + netif_rx(skb); > > +#else > > netif_rx_ni(skb); > > +#endif > > > > /* Update statistics */ > > dev->stats.rx_bytes +=3D len; > > -- > > 2.25.1